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

# Deploy agent

> Deploy a specific version or the latest draft configuration of an agent by setting it as the published configuration. This makes the specified configuration live and active for agent's phone and web calls. The response includes headers about rate limiting.



## OpenAPI

````yaml /api-reference-v1/openapi.json post /v1/agents/{agent_id}/deploy
openapi: 3.1.0
info:
  title: Rounded API
  description: Rounded API
  version: 1.0.0
servers:
  - url: https://api.callrounded.com
security:
  - ApiKeyHeader: []
paths:
  /v1/agents/{agent_id}/deploy:
    post:
      tags:
        - agents
      summary: Deploy agent
      description: >-
        Deploy a specific version or the latest draft configuration of an agent
        by setting it as the published configuration. This makes the specified
        configuration live and active for agent's phone and web calls. The
        response includes headers about rate limiting.
      operationId: deploy_agent_v1_agents__agent_id__deploy_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The ID of the agent to deploy.
            title: Agent Id
          description: The ID of the agent to deploy.
        - name: version
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: >-
              The configuration version of the agent to deploy. If not provided,
              the latest draft version is deployed.
            title: Version
          description: >-
            The configuration version of the agent to deploy. If not provided,
            the latest draft version is deployed.
      responses:
        '200':
          description: Successfully deployed agent configuration version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDeployApiResponse-Input'
          headers:
            ratelimit-limit:
              description: The number of requests allowed in the current rate limit period
              schema:
                type: integer
            ratelimit-remaining:
              description: >-
                The number of requests remaining in the current rate limit
                period
              schema:
                type: integer
            x-ratelimit-limit-minute:
              description: >-
                The number of requests allowed in the current minute window, if
                rate limit is set to minutes.
              schema:
                type: integer
            x-ratelimit-remaining-minute:
              description: >-
                The number of requests remaining in the current minute window,
                if rate limit is set to minutes.
              schema:
                type: integer
            x-ratelimit-limit-hour:
              description: >-
                The number of requests allowed in the current hour window, if
                rate limit is set to hourly.
              schema:
                type: integer
            x-ratelimit-remaining-hour:
              description: >-
                The number of requests remaining in the current hour window, if
                rate limit is set to hourly.
              schema:
                type: integer
            x-ratelimit-limit-<seconds>:
              description: >-
                The number of requests allowed in the current <seconds> window,
                where <seconds> is the number of seconds, if rate limit is set
                to seconds.
              schema:
                type: integer
            x-ratelimit-remaining-<seconds>:
              description: >-
                The number of requests remaining in the current <seconds>
                window, where <seconds> is the number of seconds, if rate limit
                is set to seconds.
              schema:
                type: integer
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Bad request
                  type: api_error
                  status: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              examples:
                auth_error:
                  summary: Error from the API Service
                  value:
                    message: Unauthorized
                    type: auth_error
                    status: 401
                gateway_error:
                  summary: Error from the API Gateway
                  value:
                    message: Unauthorized
                    type: gateway_auth_error
                    status: 401
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Access forbidden
                  type: api_error
                  status: 403
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: The request endpoint does not exist
                  type: http_error
                  status: 404
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: Invalid request body
                  type: validation_error
                  status: 422
                  details:
                    - field: email
                      message: Invalid email format
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: API rate limit exceeded
                  type: gateway_rate_limit_error
                  status: 429
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseError'
              example:
                error:
                  message: An unexpected error occurred
                  type: generic_error
                  status: 500
components:
  schemas:
    AgentDeployApiResponse-Input:
      properties:
        message:
          type: string
          title: Message
          description: Response message indicating the result of the operation.
          default: Agent deployed successfully
        data:
          $ref: '#/components/schemas/AgentDeployApiResponseData'
          description: The deployed agent basic data.
        error:
          anyOf:
            - $ref: '#/components/schemas/ApiResponseError'
            - type: 'null'
        status:
          type: integer
          title: Status
          description: HTTP status code of the response.
          default: 200
      type: object
      required:
        - data
      title: AgentDeployApiResponse
    ApiResponseError:
      properties:
        message:
          type: string
          title: Message
        type:
          type: string
          title: Type
        status:
          type: integer
          title: Status
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ApiResponseErrorDetail'
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - message
        - type
        - status
      title: ApiResponseError
      example:
        details:
          - field: email
            message: Invalid email format
        message: An error occurred while processing your request
        status: 400
        type: generic_error
    AgentDeployApiResponseData:
      properties:
        version:
          type: integer
          title: Version
        configuration_id:
          type: string
          format: uuid
          title: Configuration Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - version
        - configuration_id
        - created_at
      title: AgentDeployApiResponseData
    ApiResponseErrorDetail:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: ApiResponseErrorDetail
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        The API Key created in [Rounded Studio](https://app.callrounded.com).

        - You can create it by going to the "API Keys" settings of your profile.

        - Need help? You can email us at
        [team@callrounded.com](mailto:team@callrounded.com) or join our [Discord
        community](https://discord.gg/en537j5z75).

````