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

# Create a CLI token

> Shown once in the answer; only its hash is kept.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/tokens
openapi: 3.1.0
info:
  title: envlink API
  version: 1.0.0
  description: >-
    Lease build environments, wire them to your sandbox, and keep snapshots and
    artifacts.
servers:
  - url: https://envlink-api.projectinwork.com
security:
  - bearerAuth: []
tags:
  - name: Environments
  - name: Templates
  - name: Sandboxes
  - name: Snapshots
  - name: Artifacts
  - name: Projects
  - name: Tokens
  - name: Usage
  - name: Account
paths:
  /v1/tokens:
    post:
      tags:
        - Tokens
      summary: Create a CLI token
      description: Shown once in the answer; only its hash is kept.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  examples:
                    - devi's laptop
              required:
                - name
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    examples:
                      - elk_…
                  apiKey:
                    $ref: '#/components/schemas/Token'
components:
  schemas:
    Token:
      type: object
      properties:
        id:
          type: string
        kind:
          type: string
          enum:
            - org
            - personal
        name:
          type: string
        prefix:
          type: string
          examples:
            - elk_3f2a
        createdBy:
          type: string
        source:
          type: string
          enum:
            - console
            - cli
            - file
        created:
          type: string
          format: date-time
        lastUsed:
          type: string
          format: date-time
        revoked:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A CLI token or an organization API key.

````

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