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

# Reissue a token

> Issues a new token before the current one expires.



## OpenAPI

````yaml openapi/en/control.json POST /v1/auth/token
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/auth/token:
    post:
      summary: Reissue a token
      description: >-
        Issues a new token for the signed-in person, to renew the session
        silently or to switch to another space. Roles are read again, so a role
        removed a moment ago is gone from the new token.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: reissue_v1_auth_token_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
            example:
              space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a24
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenOut'
              example:
                access_token: >-
                  eyJhbGciOiJFZERTQSIsImtpZCI6ImN0bC0yMDI2LTA5In0.eyJzdWIiOiIwMTkyZjBhMC00ZTVmIiwiZXhwIjoxNzU4NTYyMTIzfQ.Q2sX...
                token_type: Bearer
                expires_in: 900
                space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a24
          description: A new token.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    TokenRequest:
      additionalProperties: false
      properties:
        space_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Space Id
          description: >-
            Switch the new token to this space. Defaults to the space of the
            current token.
      title: TokenRequest
      type: object
    TokenOut:
      additionalProperties: false
      properties:
        access_token:
          title: Access Token
          type: string
        expires_in:
          title: Expires In
          type: integer
          description: Seconds until the token expires.
        space_id:
          format: uuid
          title: Space Id
          type: string
        token_type:
          default: Bearer
          title: Token Type
          type: string
      required:
        - access_token
        - expires_in
        - space_id
      title: TokenOut
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````