# Save an agent version (/docs/api-reference/agents/createAgentVersion)

> Save the agent's current configuration as a named version.

**POST** `/agents/{agent_id}/versions`

Save the agent's current configuration as a named version.

```yaml
operationId: createAgentVersion
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - name
        properties:
          name:
            type: string
            description: Display name for the version.
          note:
            type: string
            description: Optional note describing the version.
responses:
  '200':
    description: Version saved.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            version:
              type: object
              description: A saved snapshot of an agent's configuration.
              properties:
                id:
                  type: integer
                version_number:
                  type: integer
                name:
                  type: string
                  description: >-
                    Display name of the version. `Auto-saved` for automatic versions and `Backup
                    before restore` for system versions.
                note:
                  type: string
                kind:
                  type: string
                  enum:
                    - manual
                    - auto
                    - system
                  description: >-
                    `manual`: a person saved it. `auto`: auto-saved after editing went quiet.
                    `system`: a backup taken automatically before a restore.
                created_by:
                  type: object
                  properties:
                    id:
                      type: integer
                    name:
                      type: string
                create_date:
                  type: string
                  format: date-time
                summary:
                  type: object
                  description: At-a-glance counts of what the version contains.
                  properties:
                    llm_service:
                      type: string
                    voice_name:
                      type: string
                    bot_type:
                      type: string
                    languages:
                      type: array
                      items:
                        type: string
                    context_sections:
                      type: integer
                    transfer_options:
                      type: integer
                    post_call_configs:
                      type: integer
                    knowledge_files:
                      type: integer
                    integrations:
                      type: integer
                    flow_nodes:
                      type: integer
                change_summary:
                  type: object
                  description: >-
                    What changed in this version compared with the previous one. Included when
                    listing versions. `first` is true for the earliest version, which has nothing
                    before it to compare.
                  properties:
                    first:
                      type: boolean
                    count:
                      type: integer
                      description: Number of settings that changed.
                    items:
                      type: array
                      description: The changed settings, most useful first.
                      items:
                        type: object
                        properties:
                          label:
                            type: string
                            example: Transcription
                          old:
                            type: string
                            nullable: true
                            example: Cartesia
                          new:
                            type: string
                            nullable: true
                            example: Soniox
        example:
          success: true
          version:
            id: 4830
            version_number: 6
            name: Working pricing script
            note: Before the new discount flow
            kind: manual
            created_by:
              id: 1234
              name: Demo User
            create_date: '2026-07-28T11:40:00Z'
            summary:
              llm_service: gpt-4.1-mini
              voice_name: asteria
              bot_type: prompt
              languages:
                - English
              context_sections: 7
              transfer_options: 1
              post_call_configs: 1
              knowledge_files: 2
              integrations: 0
              flow_nodes: 0
  '403':
    description: Version history is not enabled for this organization.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
            error_description:
              type: string
        example:
          error: feature_disabled
          error_description: Version history is not enabled for this organization
  '404':
    description: No agent with that ID, or it doesn't belong to you.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
            error_description:
              type: string
        example:
          error: not_found
          error_description: Agent not found or access denied
  '409':
    description: >-
      The agent has reached the maximum number of versions that can be created through the API.
      Delete a version to make room. Versions saved from the dashboard are not limited.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
            error_description:
              type: string
        example:
          error: version_limit_reached
          error_description: >-
            This agent has reached the maximum of 50 versions that can be created through the API.
            Delete a version to make room.
```

**Python SDK**

```python
from omnidimension import Client
client = Client(api_key)

# Save the agent's current configuration as a version
agent_id = "your_agent_id_here"
response = client.agent.save_version(agent_id, name="Working pricing script", note="Before the new discount flow")
print(response)
```

**curl**

```bash
curl -X POST "https://omnidim.io/api/v1/agents/{agent_id}/versions" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```