POST
/
v1
/
orgs
/
{org_id}
/
workspaces
/
{workspace_id}
/
deployments
Create Deployment
curl --request POST \
  --url https://apps.sarvam.ai/api/app-authoring/v1/orgs/{org_id}/workspaces/{workspace_id}/deployments \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "Customer Support Line",
  "description": "Main support deployment for EN and HI",
  "app_id": "my-support-agent",
  "app_version": 3,
  "connection_configs": [
    {
      "connection_id": "conn-exotel-001",
      "phone_numbers": [
        "+918047168000"
      ]
    }
  ],
  "inbound_config": {
    "start_time": "09:00",
    "end_time": "18:00",
    "allowed_days": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday"
    ],
    "timezone": "Asia/Kolkata"
  }
}
'
{
  "name": "Customer Support Line",
  "deployment_id": "dep-a1b2c3d4",
  "status": "active",
  "description": "Main support deployment for EN and HI",
  "app_id": "my-support-agent",
  "app_version": 3,
  "connection_configs": [
    {
      "connection_id": "conn-exotel-001",
      "phone_numbers": [
        "+918047168000"
      ]
    }
  ],
  "channel_direction": "inbound",
  "inbound_config": {
    "start_time": "09:00",
    "end_time": "18:00",
    "allowed_days": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday"
    ],
    "timezone": "Asia/Kolkata"
  },
  "created_by": "user@company.com",
  "created_at": "2026-03-01T10:00:00Z",
  "updated_by": "user@company.com",
  "updated_at": "2026-03-15T14:30:00Z"
}

Overview

A deployment makes your agent reachable on a phone number for inbound calls. When someone dials the number, the system routes the call to the agent version you configured. Think of it as: agent + phone number + schedule = deployment.

What happens when a call comes in?

  1. A user dials the phone number attached to your deployment
  2. The system checks if the deployment is active and within its allowed schedule
  3. If the caller’s phone number matches a user in an uploaded cohort, the agent receives their personalized variables (name, balance, etc.)
  4. The agent handles the conversation using the version you deployed
If the deployment is paused or outside the allowed schedule, the call is not answered.

Key concepts

Connection config

A connection is your telephony provider setup. You need at least one connection with a phone number to create a deployment.
{
  "connection_configs": [
    {
      "connection_id": "conn-exotel-001",
      "phone_numbers": ["+918047168000"]
    }
  ]
}

Inbound config (optional schedule)

By default, a deployment accepts calls 24/7. Use inbound_config to restrict it to business hours:
{
  "inbound_config": {
    "start_time": "09:00",
    "end_time": "18:00",
    "allowed_days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
    "timezone": "Asia/Kolkata"
  }
}
Calls outside this window will not be answered.

Deployment status

StatusMeaning
activeAccepting inbound calls
pausedNot accepting calls — use this during maintenance or agent updates
A deployment is created in active status. Use the Update Status endpoint to pause or resume.

Typical flow

  1. Create a deployment — attach your agent to a phone number
  2. Upload a cohort (optional) — provide user context so the agent can personalize conversations
  3. Deployment is live — calls are routed to your agent immediately
  4. Update as needed — change agent version, schedule, or pause/resume

Example request

{
  "name": "Customer Support Line",
  "description": "Main support line for EN and HI queries",
  "app_id": "my-support-agent",
  "app_version": 3,
  "connection_configs": [
    {
      "connection_id": "conn-exotel-001",
      "phone_numbers": ["+918047168000"]
    }
  ],
  "inbound_config": {
    "start_time": "09:00",
    "end_time": "18:00",
    "allowed_days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
    "timezone": "Asia/Kolkata"
  }
}

Key fields

FieldNotes
nameMax 50 characters. Alphanumeric, hyphens, underscores, and spaces.
app_idThe agent to handle inbound calls
app_versionWhich version of the agent to use
connection_configsAt least one telephony connection with phone numbers
inbound_configOptional. If omitted, the deployment accepts calls 24/7.

End-to-end flow

  1. Create the deploymentPOST /deployments Returns deployment_id with status: active.
  2. (Optional) Upload a cohortPOST /deployments/{id}/cohorts/upload Provides user-specific variables for personalization.
  3. Share the phone number with your users — calls are now routed to the agent.
  4. Manage as needed:
    • Pause: PUT /deployments/{id}/status with {"action": "pause"}
    • Update agent version: PATCH /deployments/{id} with {"app_version": 4}
    • Delete: DELETE /deployments/{id}

Next: Upload a Cohort

Upload a CSV of users to personalize conversations for known callers.

Authorizations

X-API-Key
string
header
required

Path Parameters

org_id
string
required
workspace_id
string
required

Body

application/json

Request body for creating a new deployment.

name
string
required

Deployment name. Alphanumeric, hyphens, underscores and spaces allowed. Max 50 characters.

Maximum string length: 50
Pattern: ^[\w\- ]{1,50}$
Example:

"Customer Support Line"

app_id
string
required

ID of the agent

Example:

"my-support-agent"

app_version
integer
required

Version of the agent to deploy

Example:

3

connection_configs
ConnectionConfig · object[]
required

Telephony connection configurations with phone numbers

Minimum array length: 1
description
string | null

Optional deployment description. Max 150 characters.

Maximum string length: 150
inbound_config
InboundConfig · object

Optional inbound call schedule configuration

Example:
{
"start_time": "09:00",
"end_time": "18:00",
"allowed_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"timezone": "Asia/Kolkata"
}

Response

Successful Response

Full deployment details including agent configuration, inbound settings, and status.

deployment_id
string
required

Unique identifier for the deployment

Example:

"dep-a1b2c3d4"

app_id
string
required

ID of the agent

Example:

"my-support-agent"

app_version
integer
required

Version of the agent

Example:

3

connection_configs
ConnectionConfig · object[]
required

Telephony connection configurations

channel_direction
enum<string>
required

Direction of calls (inbound, outbound, or both)

Available options:
inbound,
outbound,
inbound_outbound
created_by
string
required

User who created this deployment

Example:

"user@company.com"

created_at
string<date-time>
required

Timestamp when created (ISO 8601)

Example:

"2026-03-01T10:00:00Z"

updated_at
string<date-time>
required

Timestamp when last updated (ISO 8601)

Example:

"2026-03-15T14:30:00Z"

name
string | null

Name of the deployment

status
enum<string> | null

Current status of the deployment

Available options:
active,
paused
description
string | null

Optional description

inbound_config
InboundConfig · object

Inbound call schedule configuration

Example:
{
"start_time": "09:00",
"end_time": "18:00",
"allowed_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"timezone": "Asia/Kolkata"
}
updated_by
string | null

User who last updated this deployment