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

# Create Webhook Key



## OpenAPI

````yaml openapi.json POST /agent_api_keys
openapi: 3.1.0
info:
  title: Sb0 API
  version: 0.1.0
servers: []
security: []
paths:
  /agent_api_keys:
    post:
      tags:
        - Agent APIKeys
      summary: Create Api Key
      operationId: agent_api_keys_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAPIKeyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAPIKeyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    CreateAPIKeyRequest:
      properties:
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The UUID of the agent
          title: Agent Id
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          description: The name of the agent - if not provided, the agent_id must be set.
          title: Agent Name
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Optionally provide the API key value - if not set, one will be
            generated.
          title: Api Key
        api_key_type:
          $ref: '#/components/schemas/AgentAPIKeyType'
          default: external
          description: The type of the agent API key (external by default).
        name:
          description: The name of the agent's API key.
          title: Name
          type: string
      required:
        - name
      title: CreateAPIKeyRequest
      type: object
    CreateAPIKeyResponse:
      properties:
        agent_id:
          description: The UUID of the agent
          title: Agent Id
          type: string
        api_key:
          description: The value of the newly created API key.
          title: Api Key
          type: string
        api_key_type:
          $ref: '#/components/schemas/AgentAPIKeyType'
          description: The type of the created agent API key (external).
        created_at:
          description: When the agent API key was created
          format: date-time
          title: Created At
          type: string
        id:
          description: The unique identifier of the agent API key.
          title: Id
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: The optional name of the agent API key.
          title: Name
      required:
        - id
        - agent_id
        - created_at
        - name
        - api_key_type
        - api_key
      title: CreateAPIKeyResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AgentAPIKeyType:
      enum:
        - internal
        - external
        - github
        - slack
      title: AgentAPIKeyType
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````