Skip to main content
PATCH
/
api
/
tasks
curl --request PATCH \ --url https://recoup-api.vercel.app/api/tasks \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data ' { "id": "aade2bce-55c7-468e-a606-c4e76fb2ea2a", "title": "Weekly Genre Pulse Check (rev)", "schedule": "0 10 * * 4" } '
{
  "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>",
      "recent_runs": [
        {
          "id": "<string>",
          "status": "PENDING_VERSION",
          "taskIdentifier": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "idempotencyKey": "<string>",
          "version": "<string>",
          "isTest": true,
          "startedAt": "2023-11-07T05:31:56Z",
          "finishedAt": "2023-11-07T05:31:56Z",
          "delayedUntil": "2023-11-07T05:31:56Z",
          "ttl": "<unknown>",
          "expiredAt": "2023-11-07T05:31:56Z",
          "tags": [
            "<string>"
          ],
          "metadata": {},
          "costInCents": 123,
          "baseCostInCents": 123,
          "durationMs": 123,
          "env": {
            "id": "<string>",
            "name": "<string>",
            "user": "<string>"
          },
          "depth": 123,
          "batchId": "<string>",
          "triggerFunction": "trigger",
          "payload": "<unknown>",
          "output": "<unknown>",
          "error": {
            "message": "<string>",
            "name": "<string>",
            "stackTrace": "<string>"
          },
          "attempts": [
            {
              "id": "<string>",
              "status": "PENDING",
              "createdAt": "2023-11-07T05:31:56Z",
              "updatedAt": "2023-11-07T05:31:56Z",
              "startedAt": "2023-11-07T05:31:56Z",
              "completedAt": "2023-11-07T05:31:56Z",
              "error": {
                "message": "<string>",
                "name": "<string>",
                "stackTrace": "<string>"
              }
            }
          ],
          "schedule": {},
          "relatedRuns": {}
        }
      ],
      "upcoming": [
        "2023-11-07T05:31:56Z"
      ],
      "owner_email": "<string>",
      "model": "<string>"
    }
  ],
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

JSON object with id and optional fields to merge onto the task.

id
string<uuid>
required

UUID of the task to update

Example:

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

title
string

New descriptive title. If sent, must be a non-empty string.

Minimum string length: 1
Example:

"Weekly Genre Pulse Check (Updated)"

prompt
string

New instruction/prompt executed by the task. If sent, must be a non-empty string.

Minimum string length: 1
Example:

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

schedule
string

New cron expression. If sent, must be non-empty and valid for your environment.

Minimum string length: 1
Example:

"0 10 * * 4"

account_id
string<uuid>

UUID of the account to update the task for. Only applicable when the authenticated account has access to multiple accounts via organization membership. If not provided, the task is updated for the API key's own account.

Example:

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

artist_account_id
string<uuid>

UUID of the artist account to associate with the task after update

Example:

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

enabled
boolean | null

Whether the task is enabled (true / false), or null to clear an explicit override depending on server rules.

Example:

true

model
string

AI model identifier to use when the task runs. If sent, must be a non-empty string.

Minimum string length: 1
Example:

"claude-sonnet-4-20250514"

Response

Task updated successfully. Body is a TasksResponse with the updated task in tasks (typically one task).

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)