> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.chatbridge.mx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.chatbridge.mx/_mcp/server.

# Launch a call

POST https://connect.chatbridge.mx/v1/omia/calls
Content-Type: application/json

Originates a conversational AI call to a destination number using the specified agent and dial type. Every variable defined by the agent must be covered either by the `variables` object of the request or by a default value configured in the agent — values sent in the request override the agent defaults. An `ACCEPTED` status only indicates that the call was accepted by the voice provider; the final result is notified through the webhook.

Reference: https://docs.chatbridge.mx/omia/calls/launch-call

## Authentication

- `x-api-key` header (required) — Account authentication key.
- `Authorization` header (bearer token, required) — OAuth 2.0 access token issued by `POST /api/oauth/token` (client-credentials). Takes precedence over `x-api-key` when both are sent. See the Authentication section.

## Request

### Body (application/json)

This endpoint expects a CallRequest.

- `phone_number` (string, required) — 10-digit Mexican phone number, without country code.
- `agent` (string, required) — Agent identifier obtained through GET /v1/omia/agents.
- `dial_type` (string, required) — Dial type identifier obtained through GET /v1/omia/dial-types.
- `variables` (map from string to CallRequestVariables, optional) — Values for the variables defined by the agent. Values sent here override the agent defaults. Any agent variable not covered by the request or by a non-empty default causes the request to be rejected.

## Response

### 200

Result of the origination request.

- `message_id` (string, optional) — Unique identifier of the call. It should be kept to correlate subsequent webhook events.
- `status` (enum, optional) — Result of the origination request.
  - Allowed values: `ACCEPTED`, `NOT_FOUND`, `INVALID_FORMAT`, `IN_BLACKLIST`, `FAILED`
- `operator` (string, optional) — Phone operator identified for the destination number.
- `is_mobile` (boolean, optional) — Indicates whether the number corresponds to a mobile line.
- `agent` (string, optional)
- `dial_type` (string, optional)
- `phone_number` (string, optional)

## Types

### CallRequestVariables

- string
- double
- boolean

## Examples

**Request**

```json
{
  "phone_number": "5544332211",
  "agent": "66a1f0c2e4b0a1b2c3d4e5f6",
  "dial_type": "phnum_6201kecqzqg4eagsmgnqb1g70zez",
  "variables": {
    "fecha_limite": "2026-08-15",
    "monto": "1500.00",
    "nombre": "Juan Pérez"
  }
}
```

**Response**

```json
{
  "message_id": "98b432ba-2394-439f-839a-3f4ac48b1c53",
  "status": "ACCEPTED",
  "operator": "telcel",
  "is_mobile": true,
  "agent": "66a1f0c2e4b0a1b2c3d4e5f6",
  "dial_type": "phnum_6201kecqzqg4eagsmgnqb1g70zez",
  "phone_number": "5544332211"
}
```

**SDK Code**

```python Call with agent variables
import requests

url = "https://connect.chatbridge.mx/v1/omia/calls"

payload = {
    "phone_number": "5544332211",
    "agent": "66a1f0c2e4b0a1b2c3d4e5f6",
    "dial_type": "phnum_6201kecqzqg4eagsmgnqb1g70zez",
    "variables": {
        "fecha_limite": "2026-08-15",
        "monto": "1500.00",
        "nombre": "Juan Pérez"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Call with agent variables
const url = 'https://connect.chatbridge.mx/v1/omia/calls';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"phone_number":"5544332211","agent":"66a1f0c2e4b0a1b2c3d4e5f6","dial_type":"phnum_6201kecqzqg4eagsmgnqb1g70zez","variables":{"fecha_limite":"2026-08-15","monto":"1500.00","nombre":"Juan Pérez"}}'
};

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

```go Call with agent variables
package main

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

func main() {

	url := "https://connect.chatbridge.mx/v1/omia/calls"

	payload := strings.NewReader("{\n  \"phone_number\": \"5544332211\",\n  \"agent\": \"66a1f0c2e4b0a1b2c3d4e5f6\",\n  \"dial_type\": \"phnum_6201kecqzqg4eagsmgnqb1g70zez\",\n  \"variables\": {\n    \"fecha_limite\": \"2026-08-15\",\n    \"monto\": \"1500.00\",\n    \"nombre\": \"Juan Pérez\"\n  }\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Call with agent variables
require 'uri'
require 'net/http'

url = URI("https://connect.chatbridge.mx/v1/omia/calls")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"phone_number\": \"5544332211\",\n  \"agent\": \"66a1f0c2e4b0a1b2c3d4e5f6\",\n  \"dial_type\": \"phnum_6201kecqzqg4eagsmgnqb1g70zez\",\n  \"variables\": {\n    \"fecha_limite\": \"2026-08-15\",\n    \"monto\": \"1500.00\",\n    \"nombre\": \"Juan Pérez\"\n  }\n}"

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

```java Call with agent variables
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://connect.chatbridge.mx/v1/omia/calls")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"phone_number\": \"5544332211\",\n  \"agent\": \"66a1f0c2e4b0a1b2c3d4e5f6\",\n  \"dial_type\": \"phnum_6201kecqzqg4eagsmgnqb1g70zez\",\n  \"variables\": {\n    \"fecha_limite\": \"2026-08-15\",\n    \"monto\": \"1500.00\",\n    \"nombre\": \"Juan Pérez\"\n  }\n}")
  .asString();
```

```php Call with agent variables
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://connect.chatbridge.mx/v1/omia/calls', [
  'body' => '{
  "phone_number": "5544332211",
  "agent": "66a1f0c2e4b0a1b2c3d4e5f6",
  "dial_type": "phnum_6201kecqzqg4eagsmgnqb1g70zez",
  "variables": {
    "fecha_limite": "2026-08-15",
    "monto": "1500.00",
    "nombre": "Juan Pérez"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Call with agent variables
using RestSharp;

var client = new RestClient("https://connect.chatbridge.mx/v1/omia/calls");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"phone_number\": \"5544332211\",\n  \"agent\": \"66a1f0c2e4b0a1b2c3d4e5f6\",\n  \"dial_type\": \"phnum_6201kecqzqg4eagsmgnqb1g70zez\",\n  \"variables\": {\n    \"fecha_limite\": \"2026-08-15\",\n    \"monto\": \"1500.00\",\n    \"nombre\": \"Juan Pérez\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Call with agent variables
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "phone_number": "5544332211",
  "agent": "66a1f0c2e4b0a1b2c3d4e5f6",
  "dial_type": "phnum_6201kecqzqg4eagsmgnqb1g70zez",
  "variables": [
    "fecha_limite": "2026-08-15",
    "monto": "1500.00",
    "nombre": "Juan Pérez"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.chatbridge.mx/v1/omia/calls")! 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()
```