> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Create outbound call

POST https://apps.sarvam.ai/api/outbounds/v1/orgs/{org_id}/workspaces/{workspace_id}/outbounds
Content-Type: application/json

Reference: https://docs.sarvam.ai/conversations/api/instant-outbound/create

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: agents
  version: 1.0.0
paths:
  /v1/orgs/{org_id}/workspaces/{workspace_id}/outbounds:
    post:
      operationId: initiateOutboundApi
      summary: Initiate Outbound Api
      tags:
        - outboundApi
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutboundResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OutboundRequest'
servers:
  - url: https://apps.sarvam.ai/api/outbounds
    description: Production
components:
  schemas:
    ConnectionConfig:
      type: object
      properties:
        connection_id:
          type: string
        agent_phone_number:
          type: string
      required:
        - connection_id
        - agent_phone_number
      title: ConnectionConfig
    LanguageName:
      type: string
      enum:
        - Bengali
        - Gujarati
        - Kannada
        - Malayalam
        - Tamil
        - Telugu
        - Punjabi
        - Sanskrit
        - Odia
        - Marathi
        - Hindi
        - English
        - Assamese
      title: LanguageName
    OutboundAppOverrides:
      type: object
      properties:
        initial_bot_message:
          type:
            - string
            - 'null'
        initial_state_name:
          type:
            - string
            - 'null'
        initial_language_name:
          oneOf:
            - $ref: '#/components/schemas/LanguageName'
            - type: 'null'
      title: OutboundAppOverrides
    OutboundAgentConfig:
      type: object
      properties:
        app_id:
          type: string
        app_version:
          type: integer
        connection_config:
          $ref: '#/components/schemas/ConnectionConfig'
        agent_variables:
          type:
            - object
            - 'null'
          additionalProperties:
            description: Any type
        app_type:
          type: string
          default: agent
        app_overrides:
          oneOf:
            - $ref: '#/components/schemas/OutboundAppOverrides'
            - type: 'null'
      required:
        - app_id
        - app_version
        - connection_config
      title: OutboundAgentConfig
    UserConfig:
      type: object
      properties:
        user_phone_number:
          type: string
      required:
        - user_phone_number
      title: UserConfig
    WebhookConfig:
      type: object
      properties:
        url:
          type: string
        metadata:
          type:
            - object
            - 'null'
          additionalProperties:
            description: Any type
      required:
        - url
      title: WebhookConfig
    OutboundRequest:
      type: object
      properties:
        app_config:
          $ref: '#/components/schemas/OutboundAgentConfig'
        user_config:
          $ref: '#/components/schemas/UserConfig'
        webhook_config:
          oneOf:
            - $ref: '#/components/schemas/WebhookConfig'
            - type: 'null'
      required:
        - app_config
        - user_config
      title: OutboundRequest
    OutboundResponse:
      type: object
      properties:
        attempt_id:
          type: string
      required:
        - attempt_id
      title: OutboundResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError

```

## Examples



**Request**

```json
{
  "app_config": {
    "app_id": "string",
    "app_version": 1,
    "connection_config": {
      "connection_id": "string",
      "agent_phone_number": "string"
    }
  },
  "user_config": {
    "user_phone_number": "string"
  }
}
```

**Response**

```json
{
  "attempt_id": "string"
}
```

**SDK Code**

```python
import requests

url = "https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds"

payload = {
    "app_config": {
        "app_id": "string",
        "app_version": 1,
        "connection_config": {
            "connection_id": "string",
            "agent_phone_number": "string"
        }
    },
    "user_config": { "user_phone_number": "string" }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"app_config":{"app_id":"string","app_version":1,"connection_config":{"connection_id":"string","agent_phone_number":"string"}},"user_config":{"user_phone_number":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds"

	payload := strings.NewReader("{\n  \"app_config\": {\n    \"app_id\": \"string\",\n    \"app_version\": 1,\n    \"connection_config\": {\n      \"connection_id\": \"string\",\n      \"agent_phone_number\": \"string\"\n    }\n  },\n  \"user_config\": {\n    \"user_phone_number\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"app_config\": {\n    \"app_id\": \"string\",\n    \"app_version\": 1,\n    \"connection_config\": {\n      \"connection_id\": \"string\",\n      \"agent_phone_number\": \"string\"\n    }\n  },\n  \"user_config\": {\n    \"user_phone_number\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds")
  .header("Content-Type", "application/json")
  .body("{\n  \"app_config\": {\n    \"app_id\": \"string\",\n    \"app_version\": 1,\n    \"connection_config\": {\n      \"connection_id\": \"string\",\n      \"agent_phone_number\": \"string\"\n    }\n  },\n  \"user_config\": {\n    \"user_phone_number\": \"string\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds', [
  'body' => '{
  "app_config": {
    "app_id": "string",
    "app_version": 1,
    "connection_config": {
      "connection_id": "string",
      "agent_phone_number": "string"
    }
  },
  "user_config": {
    "user_phone_number": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"app_config\": {\n    \"app_id\": \"string\",\n    \"app_version\": 1,\n    \"connection_config\": {\n      \"connection_id\": \"string\",\n      \"agent_phone_number\": \"string\"\n    }\n  },\n  \"user_config\": {\n    \"user_phone_number\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "app_config": [
    "app_id": "string",
    "app_version": 1,
    "connection_config": [
      "connection_id": "string",
      "agent_phone_number": "string"
    ]
  ],
  "user_config": ["user_phone_number": "string"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.sarvam.ai/api/outbounds/v1/orgs/org_id/workspaces/workspace_id/outbounds")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```