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

# Refresh session token

> Rotates a session. Safe to call directly from the browser — it takes no API key and no identity fields.

Both tokens are replaced on every call and the presented refresh token is spent. Presenting a spent token means two holders exist, so the entire session is revoked and the call fails: the client must bootstrap again through your backend.

The user, billing group and tool credentials carry forward from the session unchanged. None of them can be supplied here.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/token/refresh
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/token/refresh:
    post:
      tags:
        - Authentication
      summary: Refresh session token
      description: >-
        Rotates a session. Safe to call directly from the browser — it takes no
        API key and no identity fields.


        Both tokens are replaced on every call and the presented refresh token
        is spent. Presenting a spent token means two holders exist, so the
        entire session is revoked and the call fails: the client must bootstrap
        again through your backend.


        The user, billing group and tool credentials carry forward from the
        session unchanged. None of them can be supplied here.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                refresh_token:
                  type: string
                  minLength: 1
                  example: snrt_9f2c41ab7e0d4856b3a0c7e19d5f8240
              required:
                - refresh_token
              additionalProperties: false
      responses:
        '200':
          description: Rotated
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: Bearer token for the chat runtime. Prefixed `snat_`.
                  refresh_token:
                    type: string
                    description: >-
                      Single-use token for POST /v1/token/refresh. Prefixed
                      `snrt_`.
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: number
                    description: Access token lifetime in seconds.
                  refresh_expires_in:
                    type: number
                    description: Refresh token lifetime in seconds.
        '400':
          description: Missing refresh_token
        '401':
          description: Refresh token is unknown, expired, revoked, or already spent
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````