Skip to main content
POST
/
agents
/
{agentId}
/
a2a
/
tasks
/
{taskId}
/
cancel
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/agents/{agentId}/a2a/tasks/{taskId}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "id": "<string>",
  "agentId": "<string>",
  "orgId": "<string>",
  "fromDid": "<string>",
  "toDid": "<string>",
  "type": "<string>",
  "input": {},
  "output": {},
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "history": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "message": "<string>"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Path Parameters

agentId
string
required

ID of the agent that owns the task

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
taskId
string
required

ID of the task to cancel

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Body

application/json

Parameters for canceling an A2A task

Response

200 - application/json

OK

Full A2A task representation

id
string
required

Unique task identifier

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
agentId
string
required

ID of the receiving agent

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
orgId
string
required

Organization that owns the receiving agent

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
fromDid
string
required

Sender DID

toDid
string
required

Receiver DID

type
string
required

Task type

status
enum<string>
required

Current status of the A2A task

Available options:
submitted,
working,
input_required,
completed,
failed,
canceled
input
object
required

Task input payload

output
object | null
required

Task output payload

error
object | null
required

Error details if task failed

history
object[]
required

Status change history

createdAt
string<date-time>
required

Task creation timestamp

updatedAt
string<date-time>
required

Last update timestamp