> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcebot.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke a token

> Revokes an access token or refresh token (RFC 7009). Revoking one does not revoke the other, so revoke both to fully disconnect a user. The response is always `200`, even if the token did not exist.



## OpenAPI

````yaml /api-reference/sourcebot-public.openapi.json post /api/ee/oauth/revoke
openapi: 3.0.3
info:
  title: Sourcebot Public API
  version: v6.1.2
  description: >-
    OpenAPI description for the public Sourcebot REST endpoints used for search,
    repository listing, and file browsing. API keys are the standard integration
    mechanism, and OAuth bearer tokens are EE-only.
servers: []
security:
  - bearerToken: []
  - apiKeyHeader: []
  - {}
tags:
  - name: Search & Navigation
    description: Code search and symbol navigation endpoints.
  - name: Connections
    description: Code host connection metadata.
  - name: Repositories
    description: Repository listing and metadata endpoints.
  - name: Git
    description: Git history, diff, and file content endpoints.
  - name: Scoped Access Tokens
    description: >-
      Mint and revoke short-lived credentials restricted to specific
      repositories.
  - name: System
    description: System health and version endpoints.
  - name: OAuth
    description: >-
      OAuth 2.0 authorization server for apps that call Sourcebot on behalf of a
      user.
  - name: Enterprise (EE)
    description: Enterprise endpoints for user management and audit logging.
paths:
  /api/ee/oauth/revoke:
    post:
      tags:
        - OAuth
      summary: Revoke a token
      description: >-
        Revokes an access token or refresh token (RFC 7009). Revoking one does
        not revoke the other, so revoke both to fully disconnect a user. The
        response is always `200`, even if the token did not exist.
      operationId: revokeOAuthToken
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PublicOAuthRevokeRequest'
      responses:
        '200':
          description: The token is revoked or did not exist.
        '403':
          description: OAuth is not available on this instance (`access_denied`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOAuthError'
      security: []
components:
  schemas:
    PublicOAuthRevokeRequest:
      type: object
      properties:
        token:
          type: string
          description: The access token (`sboa_`) or refresh token (`sbor_`) to revoke.
        client_id:
          type: string
          description: >-
            The client that owns the token. Used to attribute the revocation in
            the audit log.
      required:
        - token
    PublicOAuthError:
      type: object
      properties:
        error:
          type: string
          description: >-
            OAuth error code, such as `invalid_request`, `invalid_grant`, or
            `access_denied`.
        error_description:
          type: string
          description: Human-readable explanation of the error.
      required:
        - error
        - error_description
      description: >-
        Error response returned by the OAuth endpoints, as defined in RFC 6749
        Section 5.2.
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`. The token may
        be a Sourcebot API key, OAuth access token, or scoped access token,
        subject to endpoint requirements.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-Sourcebot-Api-Key
      description: >-
        Header of the form `X-Sourcebot-Api-Key: <token>`, where `<token>` is
        your API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.