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

# Rotate access token

> Generate a new access token (invalidates current token)

# Adullam Rotate Access Token

Access token rotation replaces an existing access token with a new one to reduce the risk of compromise. Rotation invalidates the old token and returns a new token for subsequent requests; perform it periodically or immediately after any suspected security incident.


## OpenAPI

````yaml post /v1/auth/rotate
openapi: 3.0.3
info:
  title: Adullam Payment API
  version: 1.0.0
  description: >
    Adullam is a payment processing platform for mobile money transactions in
    West Africa.


    This API enables developers to:

    - Collect payments from customers via mobile money

    - Send money to recipients

    - Track transactions and account balance


    ## Authentication

    All endpoints (except auth endpoints) require Bearer token authentication.


    ## Base URL

    Production: `https://api.adullam.dev`


    ## Rate Limiting

    - 100 requests per minute

    - 1000 requests per hour
  contact:
    email: support@adullam.dev
    url: https://docs.adullam.dev
  license:
    name: Proprietary
    url: https://adullam.dev/terms
servers:
  - url: https://api.adullam.dev
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Partner authentication and token management
  - name: Payments
    description: Collect money from customers via mobile money
  - name: Transfers
    description: Send money to recipients via mobile money
  - name: Account
    description: Account and balance management
paths:
  /v1/auth/rotate:
    post:
      tags:
        - Authentication
      summary: Rotate access token
      description: Generate a new access token (invalidates current token)
      responses:
        '200':
          description: Token rotated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    TokenResponse:
      type: object
      properties:
        access_token:
          type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        token_type:
          type: string
          example: Bearer
        expires_in:
          type: integer
          description: Token expiration time in seconds
          example: 3600
        partner_id:
          type: string
          example: partner_abc123
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - invalid_request
                - insufficient_funds
                - rate_limit_exceeded
                - channel_error
                - transaction_failed
                - server_error
              example: invalid_request
            code:
              type: string
              example: amount_too_low
            message:
              type: string
              example: Amount must be at least 100 XOF
            field:
              type: string
              nullable: true
              example: amount
            request_id:
              type: string
              example: req_abc123
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: authentication_error
              code: invalid_token
              message: Invalid or expired access token
              request_id: req_abc123
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use the access token obtained from /v1/auth/token

````