> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mycpaas.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Calls API

> Initiate and list outbound voice calls

## Make a call

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Calls.json \
    -u YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN \
    -d "To=+491234567890" \
    -d "From=+491098765432" \
    -d "Url=https://yourserver.com/voice.xml"
  ```

  ```javascript Node.js theme={null}
  const axios = require("axios");

  const ACCOUNT_SID = "YOUR_ACCOUNT_SID";
  const AUTH_TOKEN = "YOUR_AUTH_TOKEN";

  const response = await axios.post(
    `https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/${ACCOUNT_SID}/Calls.json`,
    new URLSearchParams({
      To: "+491234567890",
      From: "+491098765432",
      Url: "https://yourserver.com/voice.xml",
    }),
    { auth: { username: ACCOUNT_SID, password: AUTH_TOKEN } }
  );

  console.log("Call SID:", response.data.sid);
  ```

  ```python Python theme={null}
  import requests
  from requests.auth import HTTPBasicAuth

  ACCOUNT_SID = "YOUR_ACCOUNT_SID"
  AUTH_TOKEN = "YOUR_AUTH_TOKEN"

  response = requests.post(
      f"https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/{ACCOUNT_SID}/Calls.json",
      data={
          "To": "+491234567890",
          "From": "+491098765432",
          "Url": "https://yourserver.com/voice.xml",
      },
      auth=HTTPBasicAuth(ACCOUNT_SID, AUTH_TOKEN),
  )

  print("Call SID:", response.json()["sid"])
  ```
</CodeGroup>

## Parameters

| Parameter             | Required | Description                                                              |
| --------------------- | -------- | ------------------------------------------------------------------------ |
| `To`                  | ✅        | Number to call (E.164 format)                                            |
| `From`                | ✅        | Your mycpaas caller number                                               |
| `Url`                 | ✅        | URL that returns TwiML to control the call                               |
| `StatusCallback`      | ❌        | Webhook URL for call status updates                                      |
| `StatusCallbackEvent` | ❌        | Events to trigger callback (e.g. `initiated ringing answered completed`) |

## Response

```json theme={null}
{
  "sid": "CA_YOUR_CALL_SID",
  "to": "+491234567890",
  "from": "+491098765432",
  "status": "queued",
  "direction": "outbound-api",
  "date_created": "2026-04-19T10:00:00Z"
}
```

## List calls

```bash cURL theme={null}
curl https://developer.mycpaas.io/api/laml/2010-04-01/Accounts/YOUR_ACCOUNT_SID/Calls.json \
  -u YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN
```

## Call status values

| Status        | Meaning                         |
| ------------- | ------------------------------- |
| `queued`      | Call accepted, waiting to start |
| `ringing`     | Call is ringing                 |
| `in-progress` | Call is active                  |
| `completed`   | Call ended normally             |
| `busy`        | Line was busy                   |
| `no-answer`   | Not answered                    |
| `failed`      | Technical error                 |

## Example TwiML response

Your `Url` endpoint must return valid TwiML:

```xml theme={null}
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>Hello, this is mycpaas. Thank you for your call.</Say>
  <Pause length="1"/>
  <Say>Goodbye.</Say>
</Response>
```

<Tip>
  Your TwiML server must be publicly reachable. For local testing we recommend [ngrok](https://ngrok.com).
</Tip>
