revoke_token #
On this page
Generated automatically from the published contract sources.
A script calls this action over HTTPS at POST https://dev.turnzero.ai/api/v1/revoke_token, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool revoke_token.
OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts (Sign-in, sessions, and tokens).
Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.
Contract description #
This action revokes one API token by id or ends one sign-in connection by connection, one per call. The management API refuses revoked tokens at once. Product services apply revocation on their next list refresh. An ended connection cannot renew. Its next management request is refused. The storage, logging, and egress gateways can still use an earlier credential check. Other connections stay open. list_tokens gives the IDs.
More about this action #
Use the token ID from list_tokens. An unknown token ID or one outside your account returns HTTP 404 with not_found. If the token is already revoked, calling again returns its original revocation time.
End one connection by its id. The connection cannot renew. Its access token is refused on the next management request. The storage, logging, and egress gateways can still use an earlier credential check. Your other connections keep working. If the ID matches no live connection for your account, the call returns HTTP 404 not_found. This includes connections that already ended.
Access and action metadata #
{
"name": "revoke_token",
"resource": "token",
"tier": "reversible",
"surface": "account",
"addresses": [
"tzcloud"
],
"clients": [
"bearer",
"browser_session"
],
"summary": "This action revokes one API token by `id` or ends one sign-in connection by `connection`, one per call. The management API refuses revoked tokens at once. Product services apply revocation on their next list refresh. An ended connection cannot renew. Its next management request is refused. The storage, logging, and egress gateways can still use an earlier credential check. Other connections stay open. `list_tokens` gives the IDs.",
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"openWorldHint": false
}
}
MCP catalog entry #
{
"name": "revoke_token",
"title": "Revoke access token",
"tier": "reversible",
"summary": "This action revokes one API token by `id` or ends one sign-in connection by `connection`, one per call. The management API refuses revoked tokens at once. Product services apply revocation on their next list refresh. An ended connection cannot renew. Its next management request is refused. The storage, logging, and egress gateways can still use an earlier credential check. Other connections stay open. `list_tokens` gives the IDs.",
"owners": [
"API-L0-05",
"MAPI-14",
"API-L0-21",
"ACS-L0-11",
"MCP-10"
],
"scenario": "API-L0-05"
}
request #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: [] |
| / |
Your token's id, as list_tokens and the minting response give it. One of id and connection is required.Type: string |
| / |
The connection to end, by the id list_tokens answers under connections, in place of id.Type: string |
response #
| JSON pointer | Description and constraints |
|---|---|
| "" (root) | Type: object Required fields: ["contract_version"] Additional properties: false |
| / |
Required value: 1 |
| / |
Type: object Required fields: ["id","revoked_at"] Additional properties: false |
| / |
Type: string |
| / |
Type: string |
| / |
Type: object Required fields: ["id","client_id","revoked_at","sessions_ended"] Additional properties: false |
| / |
Type: string |
| / |
Type: string |
| / |
Type: string |
| / |
How many access-token session rows of the connection your call ended. Type: integer |
| / |
Type: string |
Complete payload contract #
{
"request": {
"type": "object",
"required": [],
"properties": {
"id": {
"type": "string",
"description": "Your token's id, as `list_tokens` and the minting response give it. One of `id` and `connection` is required."
},
"connection": {
"type": "string",
"description": "The connection to end, by the id `list_tokens` answers under `connections`, in place of `id`."
}
}
},
"response": {
"type": "object",
"required": [
"contract_version"
],
"properties": {
"contract_version": {
"const": 1
},
"token": {
"type": "object",
"required": [
"id",
"revoked_at"
],
"properties": {
"id": {
"type": "string"
},
"revoked_at": {
"type": "string"
}
},
"additionalProperties": false
},
"connection": {
"type": "object",
"required": [
"id",
"client_id",
"revoked_at",
"sessions_ended"
],
"properties": {
"id": {
"type": "string"
},
"client_id": {
"type": "string"
},
"revoked_at": {
"type": "string"
},
"sessions_ended": {
"type": "integer",
"description": "How many access-token session rows of the connection your call ended."
}
},
"additionalProperties": false
},
"detail": {
"type": "string"
}
},
"additionalProperties": false
}
}
Shared contracts #
- Refusals: every refusal, by surface, with its cause and its remedy
- schemas/wire_error.schema.json
- schemas/wire_errors.json
- schemas/action_payloads.json (includes shared shapes)
- management_api_contract.md