Skip to main content
PATCH
This endpoint allows you to cancel a running task or rename its chat title. When cancelling, the agent process is terminated and the run status is updated to cancelled.

Authentication

To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:
  1. Go to app.blackbox.ai/agent-api and click Get an API Key (requires a Pro subscription)
  2. Once provisioning completes, you will be redirected to your Dashboard
  3. From the Dashboard, create an API key to use with all Agent API requests
Your API key will be in the format: sk-xxxxxxxxxxxxxxxxxxxxxx

Headers

string
required
API Key of the form Bearer <api_key>.Example: Bearer sk_b41b647ffbfed27f616560
string
required
Must be set to application/json.

Path Parameters

string
required
The unique run identifier of the task to cancel or update.Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890

Request Body

string
Action to perform. Use "cancel" to stop the running task.Must be "cancel" when provided.
string
New title for the task’s chat thread. Length: 1–200 characters.Example: "Stripe Integration Task"
You must provide either action: "cancel" or a title. Providing both is allowed — the cancel takes precedence.

Response Fields

boolean
Whether the operation succeeded.
string
The current status of the run after the operation.
string
Human-readable description of the result.

Use Cases

Cancel with Timeout Guard

Cancel Multiple Tasks

Error Codes