> ## Documentation Index
> Fetch the complete documentation index at: https://sourcebot-sou-1870-scoped-access-tokens.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke a scoped access token

> Immediately revokes a scoped access token created by the authenticated API-key owner. This endpoint requires a Sourcebot API key.



## OpenAPI

````yaml /api-reference/sourcebot-public.openapi.json delete /api/ee/scoped_access_token/{id}
openapi: 3.0.3
info:
  title: Sourcebot Public API
  version: v5.1.5
  description: >-
    OpenAPI description for the public Sourcebot REST endpoints used for search,
    repository listing, and file browsing. Authentication is instance-dependent:
    API keys are the standard integration mechanism, OAuth bearer tokens are
    EE-only, and some instances may allow anonymous access.
servers: []
security:
  - bearerToken: []
  - apiKeyHeader: []
  - {}
tags:
  - name: Search & Navigation
    description: Code search and symbol navigation endpoints.
  - 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: Enterprise (EE)
    description: Enterprise endpoints for user management and audit logging.
paths:
  /api/ee/scoped_access_token/{id}:
    delete:
      tags:
        - Scoped Access Tokens
      summary: Revoke a scoped access token
      description: >-
        Immediately revokes a scoped access token created by the authenticated
        API-key owner. This endpoint requires a Sourcebot API key.
      operationId: revokeScopedAccessToken
      parameters:
        - schema:
            type: string
            description: Identifier returned when the scoped access token was created.
          required: true
          description: Identifier returned when the scoped access token was created.
          name: id
          in: path
      responses:
        '204':
          description: Scoped access token revoked.
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
        '403':
          description: >-
            The current authentication method is not an API key, or the API-key
            owner is not permitted to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
        '404':
          description: Scoped access token not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
        '500':
          description: Unexpected token revocation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
      security:
        - bearerToken: []
        - apiKeyHeader: []
components:
  schemas:
    PublicApiServiceError:
      type: object
      properties:
        statusCode:
          type: number
        errorCode:
          type: string
        message:
          type: string
      required:
        - statusCode
        - errorCode
        - message
      description: Structured error response returned by Sourcebot public API endpoints.
  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.

````