revoke_token #

View this page as Markdown

On this page

Generated automatically from the published contract sources.

A script calls this action over HTTPS at POST https://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 #

Revoke one API token by id, or end one sign-in connection by connection. Pass exactly one. A revoked token's later uses are refused. Ending a connection refuses its access token and renewal at once. Other connections keep working. Use list_tokens to find the token or connection to end.

More about this action #

End one connection by its id. Its access token and its renewal are refused at once; your other connections keep working.

Access and action metadata #

{
  "name": "revoke_token",
  "resource": "token",
  "tier": "reversible",
  "surface": "account",
  "addresses": [
    "tzcloud"
  ],
  "clients": [
    "bearer",
    "browser_session"
  ],
  "summary": "End one minted token by its identity; every later presentation is refused. With `connection` it ends a connection: End one connection by its id: its refresh and its access token are refused at once, and every other connection remains.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": false
  }
}

MCP catalog entry #

{
  "name": "revoke_token",
  "title": "Revoke access token",
  "tier": "reversible",
  "summary": "Revoke one API token by `id`, or end one sign-in connection by `connection`. Pass exactly one. A revoked token's later uses are refused. Ending a connection refuses its access token and renewal at once. Other connections keep working. Use `list_tokens` to find the token or connection to end.",
  "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: []
/properties/id Your token's id, as list_tokens and the minting response give it. One of id and connection is required.

Type: string
/properties/connection 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
/properties/contract_version Required value: 1
/properties/token Type: object
Required fields: ["id","revoked_at"]
Additional properties: false
/properties/token/properties/id Type: string
/properties/token/properties/revoked_at Type: string
/properties/connection Type: object
Required fields: ["id","client_id","revoked_at","sessions_ended"]
Additional properties: false
/properties/connection/properties/id Type: string
/properties/connection/properties/client_id Type: string
/properties/connection/properties/revoked_at Type: string
/properties/connection/properties/sessions_ended How many access-token session rows of the connection your call ended.

Type: integer
/properties/detail 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 #