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

# Mint a portal API JWT

> From a signed-in session (magic link / Google / Apple cookie). The JWT is user-scoped and lives ~1 hour; refresh via POST /api/auth/refresh.



## OpenAPI

````yaml /openapi.json post /api/auth/api-token
openapi: 3.1.0
info:
  title: Syvon API
  version: 1.0.0
  description: >-
    Two client-facing surfaces: the Portal management plane (syvon.ai/api/*,
    portal JWT) and the Brain read plane (brain.syvon.ai/v1/*, workspace key
    sk_ws_…). Schemas are generated from the @syvon/sdk TypeScript types — the
    shipped .d.ts files are the authoritative contract.
servers:
  - url: https://syvon.ai
    description: Portal (management plane)
  - url: https://brain.syvon.ai
    description: Brain (read plane)
security: []
tags:
  - name: Auth
    description: Minting the portal JWT
  - name: Portal
    description: Management plane — user-scoped (portal JWT)
  - name: Brain
    description: Published-agent read plane — workspace-scoped (sk_ws_…)
paths:
  /api/auth/api-token:
    post:
      tags:
        - Auth
      summary: Mint a portal API JWT
      description: >-
        From a signed-in session (magic link / Google / Apple cookie). The JWT
        is user-scoped and lives ~1 hour; refresh via POST /api/auth/refresh.
      operationId: mintPortalToken
      responses:
        '200':
          description: The token
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                required:
                  - token
      security:
        - sessionCookie: []
      servers:
        - url: https://syvon.ai
components:
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: next-auth.session-token
      description: A signed-in portal session

````