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

# Revoke OAuth Token

> ⚠️ SECURITY: Revokes an OAuth access token. Requires OAuth authentication with scope "write:oauth-apps". Revoked tokens cannot be used for API access.

Revokes an OAuth access token before it expires.

## Use Cases

* User logs out
* Security incident requires token invalidation
* Application no longer needs access

## Path Parameters

| Parameter | Type   | Required | Description              |
| --------- | ------ | -------- | ------------------------ |
| `tokenId` | string | Yes      | OAuth token ID to revoke |

## Example Request

```bash theme={null}
curl -X DELETE http://localhost:3001/api/oauth/token/token_1234567890abcdef \
  -H "Authorization: Bearer <oauth_token>"
```

## Response

Returns `204 No Content` on success.

## Permissions

Requires OAuth authentication with scope `write:oauth-apps`.

## What Happens

* Token is immediately invalidated
* Future API requests with this token will fail with 401
* Token cannot be un-revoked

## Common Errors

### 401 Unauthorized

Authentication required. Provide a valid OAuth token.

### 403 Forbidden

Insufficient scope. Required scope: `write:oauth-apps`

### 404 Not Found

Token not found with the provided token ID.


## OpenAPI

````yaml DELETE /oauth/token/{tokenId}
openapi: 3.1.0
info:
  title: Timbrix API
  description: >-
    REST API with OAuth2 server for managing organizations, members, and
    webhooks
  version: '1.0'
  contact: {}
servers:
  - url: http://sandbox.mintlify.com
    description: Sandbox environment
  - url: http://localhost:3001/api
    description: Local development
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
paths:
  /oauth/token/{tokenId}:
    delete:
      tags:
        - oauth
      summary: Revoke access token
      description: >-
        ⚠️ SECURITY: Revokes an OAuth access token. Requires OAuth
        authentication with scope "write:oauth-apps". Revoked tokens cannot be
        used for API access.
      operationId: OAuthController_revokeToken
      parameters:
        - name: tokenId
          required: true
          in: path
          schema:
            type: string
      responses:
        '204':
          description: >-
            Token revoked successfully. The token can no longer be used for
            authentication.
        '401':
          description: Authentication required. Provide a valid OAuth token.
        '403':
          description: 'Insufficient scope. Required scope: write:oauth-apps'
        '404':
          description: Token not found with the provided token ID.
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````