Skip to main content
POST
Create a new task

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

Priority Values

  • "0" - Low priority task
  • "1" - Medium priority task
  • "2" - High priority task
Note: The task will automatically be assigned the initial status configuration from your organization. You don’t need to provide a status ID when creating tasks via the public API.

Response Structure

Returns the created task object:

Task 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 UUID strings
  • Format: Valid UUID v4 identifiers (e.g., "228d7a0d-9072-4ca8-939b-959b75cc606a")
  • Note: Must be valid user IDs from your organization
  • Minimum: At least one user ID required

Priority

  • Required: Yes
  • Type: Enum string ("0" | "1" | "2")
  • Allowed values:
    • "0" - Low priority
    • "1" - Medium priority
    • "2" - High priority
  • Note: The value is sent as a string but transformed and stored as an integer (0, 1, or 2) in the response

Due Date

  • Required: No
  • Type: ISO 8601 date string or null
  • Format: YYYY-MM-DD or full ISO 8601 datetime (e.g., 2025-11-26T00:00:00.000Z)
  • Examples: "2025-10-25", "2025-10-25T14:00:00.000Z"
  • Note: Internally transformed to a Date object

Due Time

  • Required: No
  • Type: Time string in HH:mm format or null
  • Format: 24-hour time format HH:mm
  • Examples: "14:30", "09:00", "23:59"
  • Note: If omitted or null, the task is marked as an all-day task (is_all_day: true)

Timezone

  • Required: No (but recommended when dueTime is specified)
  • Type: IANA Time Zone identifier string or null
  • Format: Standard IANA timezone database identifier
  • Examples: "America/Santiago", "Europe/London", "Asia/Tokyo", "UTC"
  • Note: Used to correctly interpret the due date and time. Defaults to "UTC" if not provided

AI Contact ID

  • Required: No
  • Type: UUID string or null
  • Format: Valid UUID v4 identifier
  • Note: Links the task to a specific contact in your organization

AI Customer ID

  • Required: No
  • Type: UUID string or null
  • Format: Valid UUID v4 identifier
  • Note: Links the task to a specific customer in your organization

Description

  • Required: No
  • Type: String or null
  • Note: Detailed description of the task

Error Responses

Common Validation Errors

Best Practices

  1. Status Configuration: Tasks are automatically assigned the initial status configuration - no need to specify it
  2. Responsible Users: Validate that all responsibleIds are valid and active users
  3. Timezone Handling: Always specify timezone when using due dates with specific times
  4. Description Length: Keep descriptions concise but informative (500-1000 characters recommended)
  5. Priority Assignment: Use priority strategically - β€œ0” (low), β€œ1” (medium), β€œ2” (high)
  6. All-Day Tasks: For all-day tasks, omit dueTime or set it to null
  7. 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

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
title
string
required
Minimum string length: 1
description
string | null
required
dueDate
string | null
required
dueTime
string | null
required
timezone
string | null
required
responsibleIds
string[]
required
aiContactId
string | null
required
aiCustomerId
string | null
required
priority
enum<string>
required
Available options:
0,
1,
2
associateToCalendar
boolean
default:false

Response

Task created successfully

The response is of type object.