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

# Create API Key

> Creates a new API key (personal access token) for the authenticated user.



## OpenAPI

````yaml POST /api/v1/api-keys
openapi: 3.0.3
info:
  title: Colloqui API Documentation
  description: API documentation for Colloqui application
  version: 1.0.0
servers:
  - url: https://colloqui-web-develop-btoadh.laravel.cloud
security:
  - default: []
tags:
  - name: Authentication
    description: |-

      APIs for retrieving a token and invalidating the current token.
  - name: API Keys
    description: |-

      APIs for managing API keys.
  - name: Agent
    description: |-

      APIs for agents
  - name: Agent Versions
    description: |-

      APIs for retrieving version history of an agent.
  - name: Call History
    description: |-

      APIs for managing call histories.
  - name: Knowledge Base
    description: |-

      APIs for knowledge base management.
  - name: Number
    description: |-

      APIs for managing numbers.
  - name: Subscription
    description: |-

      APIs to subscribe an agent to a subscription.
  - name: User
    description: |-

      APIs for managing users.
  - name: Webhook
    description: |-

      APIs for managing webhooks.
  - name: Workspace
    description: |-

      APIs for managing workspaces.
  - name: Workspace User
    description: |-

      APIs for managing users within workspaces.
paths:
  /api/v1/api-keys:
    post:
      tags:
        - API Keys
      summary: Create API Key
      description: >-
        Creates a new API key (personal access token) for the authenticated
        user.
      operationId: createAPIKey
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Must not be greater than 255 characters.
                  example: b
                expiration:
                  type: string
                  description: >-
                    The date and time when the API key will no longer be valid.
                    Must be a valid date. Must be a date after `now`.
                  example: '2027-05-01'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 432
                    name: my-api-key
                    token: null
                    created_at: '2026-05-01T06:38:00.000000Z'
                    expires_at: null
                  token: 1|kfhex67Y19kDP1ZR7RZE0ejnbCfTDJg90UETediObe97b7b7
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 432
                      name:
                        type: string
                        example: eius et factory token
                      token:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-05-01T06:38:00.000000Z'
                      expires_at:
                        type: string
                        example: null
                        nullable: true
                  token:
                    type: string
                    example: 1|kfhex67Y19kDP1ZR7RZE0ejnbCfTDJg90UETediObe97b7b7
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: Bearer token authentication

````