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

# Get Project User Token

> Use this endpoint to get a JWT token for a previously registered project user. Requires userId and apiKey. The token will be generated based on the user's stored data.



## OpenAPI

````yaml post /v1/api/projects/user-token
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.4.1
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v1/api/projects/user-token:
    post:
      summary: Get JWT token for registered project user
      description: >-
        Use this endpoint to get a JWT token for a previously registered project
        user. Requires userId and apiKey. The token will be generated based on
        the user's stored data.
      operationId: PostV1ApiProjectsUserToken
      requestBody:
        description: POST /v1/api/projects/user-token Request body
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    apiKey:
                      type: string
                      minLength: 1
                      description: >-
                        Upsolve API key, generated under Account → Developer
                        settings in the Upsolve Hub. Keys are user-scoped: pass
                        organizationId alongside the key to select which org to
                        act on.
                      examples:
                        - up_embed_************
                    organizationId:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                - type: object
                  properties:
                    userId:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                      description: >-
                        The ID of the previously registered project user to
                        issue a token for.
                      examples:
                        - 123e4567-e89b-12d3-a456-426614174000
                    apiKey:
                      description: >-
                        API key for authentication (optional if using Supabase
                        JWT)
                      examples:
                        - up_embed_************
                      type: string
                    organizationId:
                      description: >-
                        Organization ID (required for user-scoped API keys and
                        when using Supabase JWT)
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                    expiration:
                      description: Expiration time of the token
                      examples:
                        - 1h
                      type: string
                  required:
                    - userId
                  examples:
                    - userId: 123e4567-e89b-12d3-a456-426614174000
                      apiKey: up_admin_************
                      expiration: 1h
            examples:
              example1:
                value:
                  userId: 123e4567-e89b-12d3-a456-426614174000
                  apiKey: up_embed_************
                  expiration: 1h
        required: true
      responses:
        '200':
          description: POST /v1/api/projects/user-token Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        description: A JWT identifying this user
                        examples:
                          - >-
                            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InBhcmVudE9yZ0lkIjoiYWJkZTZmMjQtYWYwZi00Zjg3LWI4NzEtNzk0NGIyYzhjM2IzIiwiZGlzcGxheU5hbWUiOiJEZW1vIChBZG1pbikiLCJwYXlsb2FkIjp7fX0sImlhdCI6MTcwOTI2NTcyOSwiZXhwIjoxNzA5MjY5MzI5fQ.nfMwGbPe7zwCwlky079PVjA-ox0G2OtTuFo_0MXoLCE
                    required:
                      - token
                    additionalProperties: false
                    examples:
                      - token: >-
                          eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InBhcmVudE9yZ0lkIjoiYWJkZTZmMjQtYWYwZi00Zjg3LWI4NzEtNzk0NGIyYzhjM2IzIiwiZGlzcGxheU5hbWUiOiJEZW1vIChBZG1pbikiLCJwYXlsb2FkIjp7fX0sImlhdCI6MTcwOTI2NTcyOSwiZXhwIjoxNzA5MjY5MzI5fQ.nfMwGbPe7zwCwlky079PVjA-ox0G2OtTuFo_0MXoLCE
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: POST /v1/api/projects/user-token Negative response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_1: []
components:
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: query
      name: apiKey
      x-in-actual: body
      description: apiKey MUST be supplied within the request body instead of query

````