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

# Logout

> Logout and revoke refresh token

<Info>
  Revoke the refresh token to prevent future token refreshes.
</Info>

## Request

<ParamField body="refresh_token" type="string" required>
  Refresh token to revoke
</ParamField>

***

## Response

<ResponseField name="success" type="boolean">
  Whether logout succeeded
</ResponseField>

<ResponseField name="message" type="string">
  Status message
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://demo.api.vultlocal.com/api/v1/admin/logout" \
    -H "Content-Type: application/json" \
    -d '{
      "refresh_token": "rt_abc123xyz..."
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "message": "Logged out successfully"
  }
  ```

  ```json 200 Already Revoked theme={null}
  {
    "success": true,
    "message": "Token already revoked"
  }
  ```
</ResponseExample>

***

## Notes

<Warning>
  * Access tokens remain valid until expiration (typically 15 minutes)
  * For immediate session invalidation, implement token blacklisting
  * Already revoked tokens return success with different message
</Warning>

***

## Errors

| Status | Code              | Description            |
| ------ | ----------------- | ---------------------- |
| 400    | `INVALID_REQUEST` | Invalid request format |
| 500    | `INTERNAL_ERROR`  | Server error           |


## OpenAPI

````yaml olive-openapi.json POST /admin/logout
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /admin/logout:
    post:
      tags:
        - Admin
      summary: Logout and revoke refresh token
      description: Revokes the refresh token to prevent future token refreshes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.LogoutRequest'
        description: Refresh token to revoke
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
components:
  schemas:
    handler.LogoutRequest:
      type: object
      required:
        - refresh_token
      properties:
        refresh_token:
          type: string

````