POST/agents/tasks/{agent_task_id}/revoke

Revoke an agent task

Revokes a pending agent task. Use agent_task_id to identify the task whose pending status you want to revoke.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter
agent_task_idstringrequired
The unique identifier of the agent task to revoke.

3 status codes
200Returns the agent task object, including its `agent_id`, `agent_task_id`, and deprecated `task_id`.
objectstringrequired
Allowed:agent_task
agent_idstringrequired
A stable identifier for the agent, unique per agent_name within an instance.
agent_task_idstringrequired
A unique identifier for this agent task.
task_idstringdeprecatedrequired
A unique identifier for this agent task. Deprecated: use agent_task_id instead.
urlstringoptional
The URL that, when visited, creates a session for the user. Only present in the response to a create request.
400Returned when the revocation request is unsuccessful.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Returned when the agent task does not exist.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional

Error handling

A 400 is returned when the revocation request is unsuccessful. A 404 is returned when the task identified by the agent_task_id path parameter is not found.