Get started

Your first call

Make your first AI phone call in a few minutes.

Building voice into an app or website instead of dialing phones? Use the Voice Socket — no phone number needed.


What you need

  • An API key with calls:write — see Authentication.
  • An agent to run the call. Make one in the dashboard, or create one over the API. You'll get an id like agt_xxxx.
  • A from number to call from — your caller ID. Don't have one? See Numbers.

Step 1 — Make the call

Send the agent, the number to dial (toNumber), and your caller ID (fromNumber).

curl -X POST https://platform.eurekatechlabs.com/v1/calls \
  -H "Authorization: Bearer ek_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId":    "agt_xxxxxxxxxxxx",
    "toNumber":   "+919876543210",
    "fromNumber": "+918008001234"
  }'
const res = await fetch('https://platform.eurekatechlabs.com/v1/calls', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ek_live_YOUR_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    agentId:    'agt_xxxxxxxxxxxx',
    toNumber:   '+919876543210',
    fromNumber: '+918008001234',
  }),
});
const { sessionId, status } = await res.json();
console.log('Call started:', sessionId, status);

You get back a sessionId — your handle for this call.

{
  "sessionId": "ses_xxxxxxxxxxxxxxxxxx",
  "status": "initiated",
  "agentId": "agt_xxxxxxxxxxxx",
  "productId": "prd_xxxxxxxxxxxx"
}

No agent yet, but want to skip the dashboard? Send the whole agent in the request instead — see Inline agents.


Step 2 — Check how it went

Ask for the call by its sessionId. While it's running, transcript and recordingUrl are empty; after it ends they fill in.

curl https://platform.eurekatechlabs.com/v1/calls/ses_xxxxxxxxxxxxxxxxxx \
  -H "Authorization: Bearer ek_live_YOUR_KEY"
const res = await fetch(`https://platform.eurekatechlabs.com/v1/calls/${sessionId}`, {
  headers: { 'Authorization': 'Bearer ek_live_YOUR_KEY' },
});
const call = await res.json();
console.log(call.status, call.durationSec);
{
  "sessionId": "ses_xxxxxxxxxxxxxxxxxx",
  "status": "ended",
  "durationSec": 47,
  "startedAt": "2025-05-26T10:32:01Z",
  "endedAt": "2025-05-26T10:32:48Z"
}

Polling works, but it's easier to let us push you the result. Subscribe a URL and we'll POST it the moment a call ends.

curl -X POST https://platform.eurekatechlabs.com/v1/webhooks \
  -H "Authorization: Bearer ek_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "targetUrl": "https://yourapp.com/webhooks/eureka",
    "eventTypes": ["call.ended"]
  }'

Store the signingSecret it returns — you'll use it to verify the calls really came from us. See Webhooks.


Next