Create a task

Create a new task.

Request

POST https://superinterface.ai/api/cloud/tasks

Authentication

Include your private API key in the request headers:
Authorization: Bearer YOUR_PRIVATE_API_KEY

Request Body

ParameterTypeRequiredDescription
titlestringYesTask title
messagestringYesMessage payload to send
scheduleobjectYesJSCalendar schedule definition
threadIdstringYesThread that will receive the message
keystringNoKey used to scope tasks
schedule uses the JSCalendar format. Provide a start date, optional timeZone, and an optional recurrenceRules array.

Example request

curl -X POST "https://superinterface.ai/api/cloud/tasks" \ -H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Send reminder", "message": "Check in with the user", "schedule": { "start": "2025-06-01T09:00:00Z", "recurrenceRules": [ { "frequency": "daily" } ] }, "threadId": "60cfe680-fee5-49b9-b386-6a7097eb8497" }'

Response

ParameterTypeDescription
taskTaskNew Task

Example response

{ "task": { "id": "70cfe680-fee5-49b9-b386-6a7097eb8497", "title": "Send reminder", "message": "Check in with the user", "schedule": { "start": "2025-06-01T09:00:00Z", "recurrenceRules": [ { "frequency": "daily" } ] }, "threadId": "60cfe680-fee5-49b9-b386-6a7097eb8497", "key": "", "createdAt": "2025-07-01T09:00:00Z", "updatedAt": "2025-07-01T09:00:00Z" } }
key scopes the task to a pool. Leave it blank to share tasks across all assistants and threads. When using the tasks tool with a key template, the template resolves to this value when the task is created.

Errors

The endpoint may return the following errors:

401 Unauthorized

This error occurs if the API key is invalid or missing.
{ "error": "Unauthorized", "message": "Invalid or missing API key" }