Overview
Create a new task and assign it to one or more team members. Tasks can be associated with contacts or customers, include due dates with timezone support, and have customizable priorities and statuses. Use this endpoint to programmatically create tasks from your application, integrate with external systems, or automate task creation based on specific triggers.Use Cases
- Automated Task Creation: Create tasks automatically when certain events occur (e.g., new lead, customer inquiry)
- CRM Integration: Sync tasks from external CRM systems to Vambe
- Follow-up Management: Automatically create follow-up tasks after customer interactions
- Workflow Automation: Create tasks as part of automated workflows
- API Integrations: Allow external applications to create tasks in Vambe
- Mobile Apps: Enable task creation from mobile applications
Authentication
This endpoint requires authentication using an API key. Include your API key in the request header:Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Task title (minimum 1 character) |
description | string | null | No | Detailed description of the task |
dueDate | string | null | No | Due date (ISO 8601 format: YYYY-MM-DD or full datetime) |
dueTime | string | null | No | Due time (HH:MM format, e.g., β14:30β) |
timezone | string | null | No | Timezone for due date (e.g., βAmerica/Santiagoβ) |
responsibleIds | string[] | Yes | Array of user IDs to assign as responsible |
aiContactId | string | null | No | Associated contact ID |
aiCustomerId | string | null | No | Associated customer ID |
priority | string | Yes | Task priority: β0β (low), β1β (medium), or β2β (high) |
Priority Values
"0"- Low priority task"1"- Medium priority task"2"- High priority task
Response Structure
Returns the created task object:Task Object
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier for the task |
title | string | Task title |
description | string | Detailed description of the task |
due_timezone | string | null | Timezone for the due date (e.g., βAmerica/Santiagoβ) |
due_at | string | null | Due date and time (ISO 8601 format) |
is_all_day | boolean | Whether the task is an all-day task |
created_at | string | Task creation date (ISO 8601 format) |
ai_contact_id | string | null | Associated contact ID if applicable |
ai_customer_id | string | null | Associated customer ID if applicable |
task_status_config_id | string (UUID) | ID of the status configuration |
priority | number | Task priority: 0 (low), 1 (medium), or 2 (high) |
creator_id | string (UUID) | ID of the user who created the task |
task_responsibles | array | Array of responsible user objects |
status_config | object | null | Custom status configuration object |
Example Request
Example Response
Common Use Cases
1. Create a Simple Task
2. Create Task with Due Date
3. Create Task Associated with Contact
4. Create Task with Multiple Assignees
5. Create All-Day Task
6. Automated Task Creation from Webhook
Validation Rules
Title
- Required: Yes
- Minimum length: 1 character
- Type: String
Status Configuration
- Required: No
- Note: Tasks are automatically assigned the initial status configuration from your organization. You donβt need to provide a status ID when creating tasks via the public API.
Responsible IDs
- Required: Yes
- Type: Array of strings (UUIDs)
- Note: Must be valid user IDs from your organization
- Minimum: At least one user ID required
Priority
- Required: Yes
- Type: String
- Allowed values: β0β (low), β1β (medium), β2β (high)
- Note: The value is sent as a string but stored as an integer (0, 1, or 2)
Due Date
- Required: No
- Type: String (ISO 8601 format) or null
- Examples: β2025-10-25β, β2025-10-25T14:00:00.000Zβ
Timezone
- Required: No
- Type: String or null
- Format: IANA timezone (e.g., βAmerica/Santiagoβ, βEurope/Londonβ)
- Note: Required if dueTime is specified
Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid request body or validation failed |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Invalid statusId or responsibleIds |
| 500 | Internal Server Error - Something went wrong |
Common Validation Errors
Best Practices
- Status Configuration: Tasks are automatically assigned the initial status configuration - no need to specify it
- Responsible Users: Validate that all responsibleIds are valid and active users
- Timezone Handling: Always specify timezone when using due dates with specific times
- Description Length: Keep descriptions concise but informative (500-1000 characters recommended)
- Priority Assignment: Use priority strategically - β0β (low), β1β (medium), β2β (high)
- All-Day Tasks: For all-day tasks, omit dueTime or set it to null
- Contact Association: Link tasks to contacts when possible for better context and tracking
Performance Tips
- Batch Creation: If creating multiple tasks, consider implementing retry logic
- Validation: Validate data on the client side before making API calls
- Error Handling: Implement proper error handling for failed task creation
- Async Processing: For bulk task creation, consider queuing and processing asynchronously
Related Endpoints
- GET /api/public/tasks - Get tasks by filters
- PUT /api/public/tasks/ - Update a task
- DELETE /api/public/tasks/ - Delete a task
- GET /api/public/team-members/all - Get team members for assignment
Notes
- Automatic Timestamps: created_at is automatically set to the current time
- Default Status: New tasks are automatically assigned the initial status configuration from your organization
- Creator Tracking: The creator_id is automatically set based on the authenticated user
- Organization Scoped: Tasks are automatically associated with your organization
- Interactive Notes: Tasks associated with contacts will automatically create interactive notes
- Priority Format: Priority is sent as a string (β0β, β1β, β2β) but returned as an integer (0, 1, 2) in the response
Body
application/json
Minimum length:
1Available options:
0, 1, 2 Response
Task created successfully
The response is of type object.
