> ## 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.

# Refresh Token

> Generate a new JWT token using a refresh token



## OpenAPI

````yaml api-reference/jwt/openapi.json post /cocart/jwt/refresh-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/refresh-token:
    post:
      tags:
        - authentication
      summary: Refresh JWT token
      description: Generate a new JWT token using a refresh token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                refresh_token:
                  type: string
                  description: The refresh token
              required:
                - refresh_token
      responses:
        '200':
          description: Token refreshed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: New JWT token
                  refresh_token:
                    type: string
                    description: New refresh token
        '401':
          description: Invalid or expired refresh token
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: cocart_authentication_error
                  message:
                    type: string
                    example: Invalid refresh token.
                  status:
                    type: integer
                    example: 401

````