# Example Code

{% hint style="info" %}
**API Token Notice**

You will need both your API Token and your Call API SID (ACCOUNT\_SID). Both are available in User Settings at the top right of the portal.
{% endhint %}

### Examples of making calls using the Call API <a href="#making_a_call_to_a_span_class_sps_text_non_sps_link_data_orig_text_teleapi_data_parm_text_applicati" id="making_a_call_to_a_span_class_sps_text_non_sps_link_data_orig_text_teleapi_data_parm_text_applicati"></a>

**Full CallAPI URL:**

```
https://v1.api19.com/call/2012-04-24/Accounts/ACCOUNT_SID/Calls.json
```

This section includes several examples in different languages of how to make calls.

The following table includes the supported **POST** variables that can be sent with your **HTTP** calls.

#### Request Parameters <a href="#request_parameters" id="request_parameters"></a>

| Parameter                | Description                                                                                                                                                            |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **From (Required)**      | The phone number to use as the caller id.                                                                                                                              |
| **To (Required)**        | The phone number to call.                                                                                                                                              |
| **Url (Required)**       | The fully qualified URL that should be executed when the call connects.                                                                                                |
| **Method**               | The HTTP method Platform should use when making its request to the above Url. Defaults to POST.                                                                        |
| **FallbackUrl**          | The URL that Platform will request if execution of Url fails for any reason.                                                                                           |
| **FallbackMethod**       | The HTTP method that Platform should use to request the FallbackUrl. Must be either GET or POST. Defaults to POST.                                                     |
| **StatusCallbackEvent**  | A comma separated list of events on which we are interested in getting a callback on. Possible values are *initiated, ringing, answered, completed*. Defaults to none. |
| **StatusCallback**       | URL to receive the callback events at. Default none.                                                                                                                   |
| **StatusCallbackMethod** | Set to *GET* or *POST*. Defaults to *POST.*                                                                                                                            |
| **Timeout**              | <p>The number of seconds that the Platform should allow the phone to ring before assuming there is no answer.<br> The default is 60 seconds.</p>                       |

You can [view example code here](https://apidocs.api19.com/call-apis/outgoing-calls/making-calls/example-code/outbound-to-tel)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.api19.com/call-apis/making-calls/example-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
