> ## Documentation Index
> Fetch the complete documentation index at: https://humanity-eaeda8f6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth · Revoke tokens

<Callout>
  **SDK equivalent**

  ```ts theme={null}
  await sdk.revokeTokens({
    token: refreshToken,
    tokenTypeHint: 'refresh_token',
  });
  ```
</Callout>

Invalidate refresh or access tokens when a user disconnects Humanity or when you need to force-logout compromised sessions. Pass either a single `token` or an array of `tokens`, plus optional hints (`authorization`, `refresh_token`, `access_token`) to speed up resolution.

Revocations cascade through Humanity’s cache, so subsequent `/oauth/token` refresh attempts fail immediately. Pair this with `/auth/logout` if you maintain your own tenant-scoped sessions.


## OpenAPI

````yaml api-reference/openapi.json post /oauth/revoke
openapi: 3.1.0
info:
  version: 0.1.0
  title: hp-public-dev-api-server
  description: NestJS CQRS + TDD base for Humanity Public Dev API
servers:
  - url: https://api.sandbox.humanity.org/v2
    description: Sandbox environment for development and testing
  - url: https://api.humanity.org/v2
    description: Production environment
security: []
tags: []
paths:
  /oauth/revoke:
    post:
      tags: []
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevokeResponse'
components:
  schemas:
    RevokeRequest:
      type: object
      properties:
        token:
          type: string
        tokens:
          type: array
          items:
            type: string
        token_type_hint:
          oneOf:
            - const: authorization
            - const: refresh_token
            - const: access_token
        authorization_id:
          type: string
        cascade:
          oneOf:
            - const: 'true'
            - const: 'false'
            - const: '1'
            - const: '0'
            - type: boolean
        client_id:
          type: string
      required: []
    RevokeResponse:
      type: object
      properties:
        revoked:
          type: boolean
        revoked_count:
          type: number
        details:
          type: array
          items:
            $ref: '#/components/schemas/RevokedTokenDetail'
      required:
        - revoked
        - revoked_count
    RevokedTokenDetail:
      type: object
      properties:
        subject:
          oneOf:
            - const: token
            - const: authorization
        token_type:
          oneOf:
            - const: refresh_token
            - const: access_token
        authorization_id:
          type: string
        client_id:
          type: string
        user_id:
          type: string
        status:
          oneOf:
            - const: revoked
            - const: not_found
            - const: invalid
        reason:
          type: string
      required:
        - subject
        - status

````