Skip to content

Create Task

Create a new scheduled task. All fields are required. The response shape matches the GET Tasks endpoint (an array containing the created task).

Endpoint

POST https://api.recoupable.com/api/tasks

POST Parameters

NameTypeRequiredDescription
titlestringYesDescriptive title of the task
promptstringYesInstruction/prompt executed by the task
schedulestringYesCron expression defining when the task runs
account_idstringYesUUID of the associated account
artist_account_idstringYesUUID of the associated artist account

Request Examples

cURL
curl -X POST "https://api.recoupable.com/api/tasks" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Weekly Genre Pulse Check",
    "prompt": "Execute this weekly genre analysis workflow and email a summary to the team.",
    "schedule": "0 9 * * 4",
    "account_id": "848cd58d-700f-4b38-ab4c-d9f52a1b2c3d",
    "artist_account_id": "1873859c-dd37-4e9a-9bac-80d35a1b2c3d"
  }'

Response Format

The API returns JSON identical to the GET endpoint: an array containing the created task. See GET Tasks for full response details.

{
  "status": "success",
  "tasks": [
    {
      "id": "aade2bce-55c7-468e-a606-c4e76fb2ea2a",
      "title": "Weekly Genre Pulse Check",
      "prompt": "Execute this weekly genre analysis workflow and email a summary to the team.",
      "schedule": "0 9 * * 4",
      "account_id": "848cd58d-700f-4b38-ab4c-d9f52a1b2c3d",
      "artist_account_id": "1873859c-dd37-4e9a-9bac-80d35a1b2c3d",
      "enabled": true,
      "trigger_schedule_id": null
    }
  ]
}