Skip to main content
This walkthrough takes you from zero to a predictive-dial campaign with one lead queued, using either curl or an SDK.

1. Get an API key

1

Log into app.yotel.in as a tenant admin

You need the api_keys:manage permission (TENANT_ADMIN role).
2

Navigate to /developer/keys

Click Issue key. Give it a label like “Quickstart test”.
3

Copy the key immediately

The full yt_test_… value is shown once. We store only a hash — if you lose the key you’ll need to issue a new one.
Start with a test key (yt_test_…). Test keys behave identically to live keys at the API surface — they create campaigns, push leads, fire webhooks — but never actually dial the PSTN. Use live keys (yt_live_…) only once your integration is reviewed.

2. Create a campaign

curl -X POST https://api.yotel.in/api/v1/campaigns \
  -H "Authorization: Bearer $YOTEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Quickstart demo",
    "dial_mode": "predictive",
    "predictive_target_abandon": 0.02
  }'
Every successful response carries rate-limit headers:
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 599

3. Push a lead

curl -X POST \
  https://api.yotel.in/api/v1/campaigns/$CAMPAIGN_ID/leads \
  -H "Authorization: Bearer $YOTEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "9876543210",
    "name": "Priya Sharma",
    "email": "priya@example.com",
    "metadata": {"crm_id": "A-9912"}
  }'
For bulk, use the :bulk suffix — up to 500 leads in one call:
curl -X POST \
  https://api.yotel.in/api/v1/campaigns/$CID/leads:bulk \
  -H "Authorization: Bearer $YOTEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"leads":[{"phone":"98...1"},{"phone":"98...2"}]}'

4. Subscribe a webhook (optional)

Webhooks are managed from the dashboard (not the /api/v1/* path). Go to app.yotel.in/developer/webhooksNew subscription.
Choose the events you care about:
  • call.ended — every completed call with disposition + recording URL
  • campaign.paused — fired on both manual and auto-pause (check data.source)
  • lead.completed — lead reaches a terminal state
On create, you’ll get a signing_secret (shown once). Store it; you’ll need it to verify signatures.

5. Test the integration

1

DND-scrub your leads

Predictive campaigns refuse to start until every lead is scrubbed against the TRAI registry. Run POST /api/campaigns/{id}/scrub (or use the dashboard).
2

Start the campaign

POST /api/campaigns/{id}/start. Because your key is yt_test_…, the dialer registers the intent but doesn’t originate to PSTN.
3

Watch the webhook log

Your dashboard’s webhooks page shows every delivery with HTTP status + response snippet. If signatures don’t verify, the customer-side issue is usually clock skew — see troubleshooting.

Done

You’ve:
  • Issued an API key
  • Created a predictive campaign with custom tunables
  • Pushed a lead
  • Optionally subscribed a webhook
Next: read Authentication for scope + rotation, then Webhooks for event subscription in detail.