Quickstart

Make your first API call in under 5 minutes.

This guide walks you from “I have an account” to “I just placed an outbound phone call programmatically.”

1. Get an API key

Follow Authentication to create a key in your dashboard. Have it ready as $TELECHO_API_KEY.

$export TELECHO_API_KEY=tel_live_xxxxxxxxxxxxxxxxxxxxxxxx

2. List your agents

$curl https://api.telecho.io/api/v1/public/agents \
> -H "Authorization: Bearer $TELECHO_API_KEY"

You’ll get back a paginated list of agents in your org. Note one of the id values — it looks like tel_agt_a3f9b22e1c4d.

3. List your phone numbers

$curl https://api.telecho.io/api/v1/public/phone-numbers \
> -H "Authorization: Bearer $TELECHO_API_KEY"

Find a phone number with status: "active" and grab its id — looks like tel_pn_b8e44d12.

4. Place an outbound call

$curl https://api.telecho.io/api/v1/public/calls/outbound \
> -X POST \
> -H "Authorization: Bearer $TELECHO_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "phone_number_id": "tel_pn_b8e44d12",
> "destination_number": "+14155021922",
> "agent_id": "tel_agt_a3f9b22e1c4d"
> }'

The destination phone will ring, your agent will join the call when the line is answered, and you’ll receive a response like:

1{
2 "call_id": "tel_call_19a8c4d3e2f1",
3 "room_name": "call-a3f9b22e1c4d",
4 "status": "initiated",
5 "phone_number": "+12345401155",
6 "destination_number": "+14155021922"
7}

5. Read the call afterwards

Once the call ends, it shows up in /calls:

$curl "https://api.telecho.io/api/v1/public/calls?limit=5" \
> -H "Authorization: Bearer $TELECHO_API_KEY"

The response includes duration_seconds, cost, and recording_url.

Next steps