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

# Deploy agent

> Deploys the agent's latest version. Every field is optional.

<Note>
The agent reports `active` as soon as the deployment is accepted. Replicas may take a few more moments to answer calls.
</Note>




## OpenAPI

````yaml /api-reference/rest/openapi.yaml post /v1/agents/{agentId}/deploy
openapi: 3.1.0
info:
  title: Zero Runtime REST API
  version: '1.0'
  description: >-
    Create, configure, version and deploy agents, and wire SIP telephony to
    them.
servers:
  - url: https://api.zeroruntime.ai
security:
  - token: []
tags:
  - name: Agents
  - name: Versions
  - name: Deployment
  - name: Phone numbers
  - name: Routing rules
  - name: Calls
  - name: Batch calls
  - name: Knowledge bases
  - name: Knowledge base folders
paths:
  /v1/agents/{agentId}/deploy:
    parameters:
      - $ref: '#/components/parameters/agentId'
    post:
      tags:
        - Deployment
      summary: Deploy agent
      description: >
        Deploys the agent's latest version. Every field is optional.


        <Note>

        The agent reports `active` as soon as the deployment is accepted.
        Replicas may take a few more moments to answer calls.

        </Note>
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Support Agent Deployment
                region:
                  type: string
                  description: >-
                    Where to run the agent. A new agent starts in the default
                    region.
                  example: in002
                profile:
                  type: string
                  example: cpu-small
                minReplica:
                  type: integer
                  example: 0
                maxReplica:
                  type: integer
                  example: 1
      responses:
        '200':
          description: Deployment accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          $ref: '#/components/responses/Message'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    agentId:
      name: agentId
      in: path
      required: true
      schema:
        type: string
      example: ag_7f2c91
  schemas:
    Agent:
      type: object
      properties:
        agentId:
          type: string
          example: ag_7f2c91
        name:
          type: string
          example: Support Agent
        status:
          type: string
          enum:
            - inactive
            - active
          description: >-
            `active` once deployed. A new agent stays `inactive` only if its
            first deploy couldn't run, for example when the account has no
            active API key. Call [Deploy
            agent](/api-reference/deployment/deploy-agent) yourself then.
          example: active
        deploymentId:
          type: string
          example: dp_44b1e0
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Message:
      type: object
      properties:
        message:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    Message:
      description: Request failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Message'
    Unauthorized:
      description: Missing or invalid `Authorization` header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource on this account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    token:
      type: apiKey
      in: header
      name: Authorization
      description: Your API token, sent raw (no `Bearer` prefix).
      x-default: <auth-token>

````

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