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

# Create User Token

> Generates an organization access token for the specified user.

<Note>
  If `send_token_email` is `true` (the default), the user receives their token via email. The token enables the user to access packages from their organization's repository channels.
</Note>


## OpenAPI

````yaml POST /api/v1/organizations/{org_id}/users/{user_id}/token
openapi: 3.1.0
info:
  title: Organization Management API
  version: 1.0.0
servers:
  - url: https://anaconda.com
    description: Anaconda Cloud
security: []
paths:
  /api/v1/organizations/{org_id}/users/{user_id}/token:
    post:
      tags:
        - organizations
      summary: Create User Token
      description: Generates an organization access token for the specified user.
      operationId: create_user_token
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
          description: >-
            Your organization ID, found in your organization's URL:
            `anaconda.com/app/organizations/<ORG_ID>/`.
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The unique identifier of the user to assign a token to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenRequest'
      responses:
        '200':
          description: Token created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - JWT or Access Token: []
components:
  schemas:
    CreateTokenRequest:
      type: object
      required:
        - expires_at
      properties:
        expires_at:
          type: string
          format: date-time
          description: >-
            The expiration date and time for the token in ISO 8601 format (for
            example, `2026-12-31T00:00:00+00:00`).
        expiration_tolerance_months:
          type: integer
          default: 0
          description: >-
            Number of additional months to extend the token beyond the
            `expires_at` date as a grace period.
        send_token_email:
          type: boolean
          default: true
          description: Whether to send the token to the user via email.
    CreateTokenResponse:
      type: object
      required:
        - token
      properties:
        token:
          type: string
          description: The generated access token value.
        expires_at:
          type:
            - string
            - 'null'
          description: The expiration date and time of the token.
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          description: A list of validation errors.
          items:
            $ref: '#/components/schemas/ValidationError'
    ValidationError:
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          type: array
          items:
            type: string
          description: >-
            The location of the validation error (for example, `["body",
            "name"]`).
        msg:
          type: string
          description: A human-readable validation error message.
        type:
          type: string
          description: The type of validation error.
  securitySchemes:
    JWT or Access Token:
      bearerFormat: JWT
      description: >-
        Bearer token obtained by authenticating with [service
        account](/anaconda-platform/admin/service-accounts) credentials
        (`client_id` and `client_secret`).


        See the [Getting
        started](/anaconda-platform/admin/org-management-api/org-management-api)
        page for the full authentication flow.
      scheme: bearer
      type: http

````