# Enable calling on a number

Enables a calling on a number.

```http
POST https://api.pozy.ai/v1/whatsapp/phone-numbers/{id}/calling
```

- Area: WhatsApp / WhatsApp Calling
- Auth: Authorization: Bearer pz_live_...
- Deprecated

## Path parameters

- `id` (string, required)

## Request body

Content type: `application/json`

- `accountId`, string, required
- `forwardTo`, string, required
- `sipAuthUsername`, string
- `sipAuthPassword`, string
- `recordingEnabled`, boolean: Default `false`
- `callIconCountries`, array of string: Each item: 2 to 2 characters
- `maxCallDurationSeconds`, integer: 30 to 14400
- `forwardCallerId`, string: One of `business`, `caller`. Default `business`

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/whatsapp/phone-numbers/6bfebd43ddc270f6d2c56fc5/calling" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "forwardTo": "string"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/whatsapp/phone-numbers/6bfebd43ddc270f6d2c56fc5/calling", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    accountId: "696e0b682d0a31188e7a2ba9",
    forwardTo: "string"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/whatsapp/phone-numbers/6bfebd43ddc270f6d2c56fc5/calling",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "accountId": "696e0b682d0a31188e7a2ba9",
        "forwardTo": "string",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `callingEnabled`, boolean
- `sipHostname`, string
- `forwardTo`, string
- `callerIdMode`, string: One of `business`, `platform`

```json
{
  "success": true,
  "callingEnabled": true,
  "sipHostname": "Acme",
  "forwardTo": "string",
  "callerIdMode": "business"
}
```
