Skip to main content
PATCH
/
api
/
tasks
cURL
curl --request PATCH \
  --url https://recoup-api.vercel.app/api/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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
}
'
{
  "status": "success",
  "tasks": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "prompt": "<string>",
      "schedule": "<string>",
      "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "artist_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "enabled": true,
      "trigger_schedule_id": "<string>"
    }
  ],
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Task fields to update

id
string<uuid>
required

UUID of the task to update

Example:

"aade2bce-55c7-468e-a606-c4e76fb2ea2a"

title
string

New descriptive title of the task

Example:

"Weekly Genre Pulse Check (Updated)"

prompt
string

New instruction/prompt executed by the task

Example:

"Execute this weekly genre analysis workflow and email a summary to the team."

schedule
string

New cron expression defining when the task runs

Example:

"0 10 * * 4"

account_id
string<uuid>

New UUID of the associated account

Example:

"848cd58d-700f-4b38-ab4c-d9f52a1b2c3d"

artist_account_id
string<uuid>

New UUID of the associated artist account

Example:

"1873859c-dd37-4e9a-9bac-80d35a1b2c3d"

enabled
boolean | null

Whether the task is enabled. Can be true, false, or null.

Example:

true

Response

Task updated successfully

status
enum<string>
required

Status of the request

Available options:
success,
error
tasks
object[]
required

Array of task objects

error
string

Error message (only present if status is error)