Skip to main content
This endpoint creates a task on an event. Tasks are automatically added to the event’s Admin checklist.

Request Body

The request body should be a JSON object with the following fields:
FieldTypeRequiredDescription
eventIdstringYesThe ID of the event to create the task on
descriptionstringYesThe task description
dueDatestringNoDue date for the task in ISO 8601 format (e.g., 2025-10-20T00:00:00Z)

Example Request

curl -X POST https://app.flashquotes.com/api/task/create \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "eventId": "cm123abc456",
    "description": "Call venue to confirm table and chair arrangements",
    "dueDate": "2025-10-20T00:00:00Z"
  }'

Example Response

{
  "success": true,
  "task": {
    "id": "cm456def789",
    "description": "Call venue to confirm table and chair arrangements",
    "dueDate": "2025-10-20T00:00:00.000Z",
    "eventId": "cm123abc456",
    "completed": false,
    "createdAt": "2025-10-13T14:22:00.000Z"
  }
}

Response Fields

FieldTypeDescription
successbooleanWhether the task was created successfully
task.idstringUnique identifier for the created task
task.descriptionstringThe task description
task.dueDatestring | nullDue date in ISO 8601 format, or null if not provided
task.eventIdstringID of the event this task belongs to
task.completedbooleanWhether the task is completed (always false for new tasks)
task.createdAtstringTimestamp when the task was created

Common Use Cases

  • Automatically create follow-up tasks from external systems
  • Trigger task creation based on booking events or customer actions
  • Bulk import tasks from spreadsheets or other systems
  • Automatically create additional tasks after event booking

Error Responses

400 Bad Request - Invalid request body or date format
{
  "error": "Invalid request body",
  "details": {
    "description": {
      "_errors": ["Task description is required"]
    }
  }
}
404 Not Found - Event doesn’t exist or doesn’t belong to your company
{
  "error": "Event not found"
}
500 Internal Server Error - Unexpected error occurred
{
  "error": "Internal server error"
}

Notes

Date format must be valid ISO 8601 (e.g., 2025-10-20T00:00:00Z)
I