Text
Delete Response
Deletes a stored response. It does not cancel generation.
Overview
Deletes a stored response by ID. After deletion, the ID can no longer be retrieved or used as previous_response_id.
This is deletion, not cancellation: it does not stop a response that is still running. You can delete only responses created in your own account. An unknown ID, an ID from another account, and an ID that you already deleted all return 404.
Request
curl -X DELETE "https://api.tokenlab.sh/v1/responses/resp_abc123" \
-H "Authorization: Bearer sk-your-api-key"Response example
Response
{
"id": "resp_abc123",
"object": "response.deleted",
"deleted": true
}deletedboolean
true when the response was deleted. Check this field: the value of object can differ by model.Errors
| Status | Code | Meaning |
|---|---|---|
404 | response_not_found | The ID is unknown, belongs to another account, or was already deleted. |
502 | upstream_delete_failed | TokenLab could not delete the response at the service that produced it. The response is still stored. Retry later. |
503 | upstream_delete_recovery_pending | The deletion is being reconciled. Do not send it again right away. |
503 | response_state_unavailable | The response state is temporarily unavailable. Retry later. |
Authorization
BearerAuth AuthorizationBearer <token>
API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
In: header
Path Parameters
id*string
Response id returned by POST /v1/responses.
Response
application/json
application/json
application/json
application/json