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

# Validate Token

> Validate an existing JWT token



## OpenAPI

````yaml api-reference/jwt/openapi.json post /cocart/jwt/validate-token
openapi: 3.0.0
info:
  title: CoCart JWT Authentication
  version: 2.2.0
  description: JWT Authentication for CoCart REST API
servers:
  - url: '{protocol}://{host}'
    variables:
      protocol:
        enum:
          - http
          - https
        default: https
      host:
        default: example-store.com
        description: Your store domain
security: []
tags:
  - name: authentication
    description: JWT Authentication endpoints
paths:
  /cocart/jwt/validate-token:
    post:
      tags:
        - authentication
      summary: Validate JWT token
      description: Validate an existing JWT token
      responses:
        '200':
          description: Token is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Token is valid.
        '401':
          description: Invalid token
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: cocart_authentication_error
                  message:
                    type: string
                    example: Authentication failed.
                  status:
                    type: integer
                    example: 401
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````