Skip to content

Update Task

Update an existing scheduled task. Only the id field is required; any additional fields you include will be updated on the task. The response shape matches the GET Tasks endpoint (an array containing the updated task).

Endpoint

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

PATCH Parameters

NameTypeRequiredDescription
idstringYesUUID of the task to update
titlestringNoNew descriptive title of the task
promptstringNoNew instruction/prompt executed by the task
schedulestringNoNew cron expression defining when the task runs
account_idstringNoNew UUID of the associated account
artist_account_idstringNoNew UUID of the associated artist account
enabledbooleanNoWhether the task is enabled. Can be true, false, or null.

Notes:

  • Only fields provided (beyond id) will be updated.
  • Omitting a field leaves the existing value unchanged.

Request Examples

cURL
curl -X PATCH "https://api.recoupable.com/api/tasks" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "aade2bce-55c7-468e-a606-c4e76fb2ea2a",
    "title": "Weekly Genre Pulse Check (Updated)",
    "schedule": "0 10 * * 4"
  }'

Response Format

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

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