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

# Record an agent release

> Records that a new version of an agent was deployed. Call it from CI after each production deploy.



## OpenAPI

````yaml rulebase_api2_public_openapi.json POST /v1/agent_releases
openapi: 3.1.0
info:
  title: Rulebase API
  version: 1.0.0
  description: >-
    Upload conversations and work items, then read their processing and
    evaluation results using an organization API key.
servers:
  - url: https://api.rulebase.co
    description: US
  - url: https://eu.api.rulebase.co
    description: EU
security: []
paths:
  /v1/agent_releases:
    post:
      tags:
        - Agent releases
      summary: Record an agent release
      description: >-
        Records that a new version of an agent was deployed. Call it from CI
        after each production deploy. Sending the same `commit_sha` (or, without
        one, the same `name`) again returns the existing release, so retries are
        safe.
      operationId: createAgentRelease
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  type: string
                  format: uuid
                  description: The agent's ID, from Settings → Agents.
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: Version label shown in Agent monitoring, e.g. v1.4.2.
                released_at:
                  type: string
                  format: date-time
                  description: When the deploy finished. Defaults to now.
                commit_sha:
                  type: string
                  minLength: 7
                  maxLength: 64
                notes:
                  type: string
                  maxLength: 2000
              required:
                - agent_id
                - name
              additionalProperties: false
      responses:
        '200':
          description: A release for this commit or name already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      agent_id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      released_at:
                        type: string
                        nullable: true
                        format: date-time
                      released_on:
                        type: string
                      commit_sha:
                        type: string
                        nullable: true
                      notes:
                        type: string
                        nullable: true
                    required:
                      - id
                      - agent_id
                      - name
                      - released_at
                      - released_on
                      - commit_sha
                      - notes
                required:
                  - data
        '201':
          description: Release recorded
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      agent_id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      released_at:
                        type: string
                        nullable: true
                        format: date-time
                      released_on:
                        type: string
                      commit_sha:
                        type: string
                        nullable: true
                      notes:
                        type: string
                        nullable: true
                    required:
                      - id
                      - agent_id
                      - name
                      - released_at
                      - released_on
                      - commit_sha
                      - notes
                required:
                  - data
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Rulebase organization API key

````

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