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/tasksPATCH Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | UUID of the task to update |
| title | string | No | New descriptive title of the task |
| prompt | string | No | New instruction/prompt executed by the task |
| schedule | string | No | New cron expression defining when the task runs |
| account_id | string | No | New UUID of the associated account |
| artist_account_id | string | No | New UUID of the associated artist account |
| enabled | boolean | No | Whether 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
}
]
}