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

# Create Agent Configuration

> Create a new configuration version for an agent

Required scope: `agent_configs:write`, `agent_configs:all`, or `all:all`



## OpenAPI

````yaml api-reference/openapi.json post /api/v1/agent-configurations
openapi: 3.0.0
info:
  title: OpenSink API
  description: API documentation for OpenSink
  version: 1.0.0
servers:
  - url: https://api.opensink.com
    description: Production Server
security:
  - bearerAuth: []
tags:
  - name: Sink
    description: Sink management endpoints
  - name: Sink Item
    description: Sink item endpoints
  - name: Cron Job
    description: Cron job scheduling endpoints
  - name: Cron Job Run
    description: Cron job execution history
  - name: Agent
    description: Agent management endpoints
  - name: Agent Config
    description: Agent configuration endpoints
  - name: Agent Session
    description: Agent session endpoints
  - name: Agent Session Input Request
    description: Agent session input request endpoints
  - name: Agent Session Activity
    description: Agent session activity log endpoints
paths:
  /api/v1/agent-configurations:
    post:
      tags:
        - Agent Config
      summary: Create Agent Configuration
      description: |-
        Create a new configuration version for an agent

        Required scope: `agent_configs:write`, `agent_configs:all`, or `all:all`
      operationId: createAgentConfiguration
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  type: string
                  format: uuid
                  description: Parent agent ID
                variant:
                  type: string
                  maxLength: 255
                  description: Config variant name
                schema_version:
                  type: integer
                  description: Schema version number
                schema:
                  type: object
                  additionalProperties: true
                  description: JSON Schema for config values
                value:
                  type: object
                  additionalProperties: true
                  description: Config values
              required:
                - agent_id
                - variant
        required: true
      responses:
        '200':
          description: A configuration version for an agent
          content:
            application/json:
              schema:
                type: object
                description: A configuration version for an agent
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique identifier
                  agent_id:
                    type: string
                    format: uuid
                    description: Parent agent ID
                  variant:
                    type: string
                    maxLength: 255
                    description: Config variant name
                  version:
                    type: integer
                    description: Global config version number (increments for any change)
                  variant_version:
                    type: integer
                    description: Variant-specific version number (increments per variant)
                  schema_version:
                    type: integer
                    description: Schema version number
                  schema:
                    type: object
                    additionalProperties: true
                    description: JSON Schema for config values
                  value:
                    type: object
                    additionalProperties: true
                    description: Config values
                  created_at:
                    type: string
                    format: date-time
                    description: Creation timestamp
                  updated_at:
                    type: string
                    format: date-time
                    description: Last update timestamp
        '201':
          description: A configuration version for an agent
          content:
            application/json:
              schema:
                type: object
                description: A configuration version for an agent
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique identifier
                  agent_id:
                    type: string
                    format: uuid
                    description: Parent agent ID
                  variant:
                    type: string
                    maxLength: 255
                    description: Config variant name
                  version:
                    type: integer
                    description: Global config version number (increments for any change)
                  variant_version:
                    type: integer
                    description: Variant-specific version number (increments per variant)
                  schema_version:
                    type: integer
                    description: Schema version number
                  schema:
                    type: object
                    additionalProperties: true
                    description: JSON Schema for config values
                  value:
                    type: object
                    additionalProperties: true
                    description: Config values
                  created_at:
                    type: string
                    format: date-time
                    description: Creation timestamp
                  updated_at:
                    type: string
                    format: date-time
                    description: Last update timestamp
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Bad request
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Insufficient permissions
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication

````