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

# Create Team API Access Token

> Create a short-lived Junction API access token for a team.

> [!NOTE]
>
> [Junction Management API](https://docs.junction.com/api-details/junction-management-api.md) is available for [the Scale plan](https://tryvital.io/pricing).

> [!TIP]
>
> The base URL of this endpoint is `https://api.management.junction.com/`.
>
> The endpoint accepts only [Management Key](https://docs.junction.com/api-details/junction-management-api.md#authentication) (`X-Management-Key`).
> Team API Key is not accepted.

> [!NOTE]
>
> The access token expires after 10 minutes and acts with Team Admin privileges for the selected team.

> [!WARNING]
>
> This endpoint is rate limited to prevent abuse. Cache and reuse the access token when appropriate, or use Team API Keys for long-lived access.

```bash cURL theme={null}
curl --request POST \
  --url https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/create_api_access_token \
  --header 'X-Management-Key: <management-key>' \
  --header 'Content-Type: application/json' \
  --data '{"env":"sandbox"}'
```


## OpenAPI

````yaml post /v1/org/{org_id}/team/{team_id}/create_api_access_token
openapi: 3.1.0
info:
  title: Org Management
  version: 0.1.0
servers:
  - url: https://api.management.junction.com
    description: Production Management API server
security:
  - ManagementKey: []
paths:
  /v1/org/{org_id}/team/{team_id}/create_api_access_token:
    post:
      tags:
        - Team
      summary: Create Team Api Access Token
      operationId: >-
        create_team_api_access_token_v1_org__org_id__team__team_id__create_api_access_token_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Org Id
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccessTokenBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTeamAccessTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateAccessTokenBody:
      properties:
        env:
          $ref: '#/components/schemas/Env'
      type: object
      required:
        - env
      title: CreateAccessTokenBody
    CreateTeamAccessTokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        expires_in:
          type: integer
          title: Expires In
      type: object
      required:
        - access_token
        - expires_in
      title: CreateTeamAccessTokenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Env:
      type: string
      enum:
        - production
        - sandbox
      title: Env
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ManagementKey:
      type: apiKey
      in: header
      name: X-Management-Key

````

## Related topics

- [Junction API](https://docs.junction.com/api-details/junction-api.md)
- [Using Junction API](https://docs.junction.com/api-reference/org-management/connect/using-junction-api.md)
- [Managing Patients](https://docs.junction.com/api-reference/org-management/connect/managing-patients.md)
- [Create Team API Key](https://docs.junction.com/api-reference/org-management/team-api-keys/create-team-api-key.md)
- [Mobile SDK Authentication](https://docs.junction.com/wearables/sdks/authentication.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.