> For the complete documentation index, see [llms.txt](https://support.whapi.cloud/help-desk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.whapi.cloud/help-desk/calls/initiate-an-outgoing-whatsapp-call.md).

# Initiate an Outgoing WhatsApp Call

Whapi.Cloud allows you to initiate a short outgoing WhatsApp call through API.

This method is designed to attract the recipient’s attention. No audio is transmitted: the call is automatically ended after the specified duration.

### Requirements

Before using this method, make sure that:

* The channel is authorized;
* Outgoing calls are enabled in [channel settings](/help-desk/account-and-whapi-channels/channel-settings-overview.md): `outgoing_calls_enabled: true`;

### Send an outgoing call

Use: `POST https://gate.whapi.cloud/calls/outgoing`

The request includes the authorization header: `Authorization: Bearer <CHANNEL_TOKEN>`

Example request:

```bash
curl -X POST "https://gate.whapi.cloud/calls/outgoing" \
  -H "Authorization: Bearer <CHANNEL_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "919984351847",
    "duration": 15
  }'
```

### Request body

```json
{
  "to": "919984351847",
  "duration": 15
}
```

#### Parameters

* `to` — required string. WhatsApp number in international format or a private chat ID.
* `duration` — optional integer from `0` to `30`. Defines when the call should be ended automatically after the WhatsApp server confirms the offer. Default value: `5`.

If `duration` is set to `0`, the call is ended immediately.

### Successful response

A successful request returns `200 OK`:

```json
{
  "call_id": "00208DBDC3A2F961BC5F8163C0951FE1",
  "status": "initiated",
  "duration": 15
}
```

`200 OK` means that WhatsApp accepted the call initiation signal. It does not guarantee that the recipient answered the call.

### Possible errors

| Status | Description                                                                |
| ------ | -------------------------------------------------------------------------- |
| `400`  | Invalid phone number, duration, or other request parameters.               |
| `401`  | The channel is not authorized.                                             |
| `402`  | Trial channel limit has been reached.                                      |
| `404`  | Contact or compatible device was not found.                                |
| `409`  | Another outgoing call is already being processed on this channel.          |
| `500`  | Internal service error.                                                    |
| `502`  | WhatsApp rejected the offer or a signaling error occurred.                 |
| `503`  | Outgoing calls are disabled, unavailable, or the channel is not ready yet. |

Example `503` response:

```json
{
  "error": {
    "code": 503,
    "message": "Outgoing calls MVP is disabled"
  }
}
```

Use the method to change the [channel settings](/help-desk/account-and-whapi-channels/channel-settings-overview.md) to enable the ability to initiate calls. Here's how to do it via the API:

```bash
curl --request PATCH \
     --url https://gate.whapi.cloud/settings \
     --header 'accept: application/json' \
     --header 'authorization: Bearer YOUR_TOKEN' \
     --header 'content-type: application/json' \
     --data '
{
  "outgoing_calls_enabled": true
}
'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.whapi.cloud/help-desk/calls/initiate-an-outgoing-whatsapp-call.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
