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

# Get an API token

> Returns the metadata of one of your API tokens.



## OpenAPI

````yaml /openapi-public.json get /api_tokens/{id}
openapi: 3.1.0
info:
  title: Akua API
  version: 1.0.0
  description: >-
    Manage installs and their asynchronous operations. Authenticate with a
    session bearer token and select a Workspace using Akua-Context.
  contact:
    name: Akua API support
    email: support@akua.dev
    url: https://docs.akua.dev/
servers:
  - url: https://api.akua.dev/v1
security: []
tags:
  - name: operations
  - name: installs
  - name: Organizations
  - name: Billing accounts
  - name: workspaces
  - name: regions
  - name: Dashboard Overview
  - name: products
  - name: offers
  - name: Order Drafts
  - name: packages
  - name: Auth
  - name: API Tokens
  - name: Quota adjustments
  - name: Workspace services
  - name: Vault connections
  - name: clusters
  - name: Node pools
  - name: Nodes
  - name: machines
  - name: Sandboxes
  - name: OpenCode Servers
  - name: vaults
  - name: vaultSecrets
paths:
  /api_tokens/{id}:
    get:
      tags:
        - API Tokens
      summary: Get an API token
      description: Returns the metadata of one of your API tokens.
      operationId: apiTokens.get
      parameters:
        - name: id
          in: path
          schema:
            type: string
            minLength: 3
            maxLength: 54
          required: true
      responses:
        '200':
          description: Token metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiToken'
        '401':
          description: Missing, invalid or expired credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiUnauthorized'
        '403':
          description: The credential may not act in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiForbidden'
        '404':
          description: The resource was not found in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiNotFound'
      security:
        - BearerAuth: []
components:
  schemas:
    ApiToken:
      type: object
      properties:
        id:
          type: string
          minLength: 3
          maxLength: 54
        name:
          type: string
          minLength: 1
          maxLength: 100
          examples:
            - My CLI token
        prefix:
          type: string
          description: >-
            The first 12 characters of the token, for recognizing it. Never the
            secret.
          examples:
            - sk_akua_a3B2
        workspace_id:
          anyOf:
            - type: string
              minLength: 2
              maxLength: 53
            - type: 'null'
          description: >-
            The only Workspace the token may act in. Omitted or null: every
            Workspace the person may use.
        roles:
          anyOf:
            - type: array
              prefixItems:
                - $ref: '#/components/schemas/RoleName'
              minItems: 1
              items:
                $ref: '#/components/schemas/RoleName'
              maxItems: 16
              examples:
                - - roles/viewer
            - type: 'null'
          description: >-
            A ceiling of IAM roles: the token may do only what one of these
            roles includes, and only what the person may. Omitted or null: the
            rights of the person.
        created_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
        last_used_at:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          description: Unix timestamp (seconds) of last use, or null if never used
        expires_at:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          description: Unix timestamp (seconds) when the token expires, or null if never
      required:
        - id
        - name
        - prefix
        - workspace_id
        - roles
        - created_at
        - last_used_at
        - expires_at
      additionalProperties: false
    ApiUnauthorized:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - Unauthorized
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    ApiForbidden:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - Forbidden
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    ApiNotFound:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - NotFound
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          prefixItems:
            - $ref: '#/components/schemas/ApiErrorEntry'
          minItems: 1
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          additionalProperties: false
      required:
        - _tag
        - success
        - errors
        - result
      additionalProperties: false
    RoleName:
      type: string
      pattern: >-
        ^roles\/(owner|admin|member|viewer|[a-z][a-z0-9-]{0,62}\.[a-z][A-Za-z]{0,62})$
      title: RoleName
      description: >-
        A basic role `roles/<name>` or a predefined role
        `roles/<service>.<role>`
      examples:
        - roles/admin
        - roles/vault.secretAccessor
    ApiErrorEntry:
      type: object
      properties:
        code:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Machine-readable error code
          examples:
            - 7002
        message:
          type: string
          description: Human-readable error message
          examples:
            - Resource not found
        path:
          type: array
          items:
            type: string
          description: Field path that caused the error, when applicable
          examples:
            - - body
              - name
        metadata:
          type: object
          additionalProperties:
            type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      description: Bearer token for the authenticated caller.
      type: http
      scheme: bearer

````

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