Speed to Lead - Manual Customization (DEV)
This guide represents a more in-depth manual customization, and we recommend that you ask your Development Team to help you with it!
This guide explains how to reach a contact with a smrtAgent (an AI voice agent) using the smrtPhone launch webhook - either an outbound call or an agent-composed SMS.
You choose the agent, who to reach, and either the number to send from or a request for smrtPhone to pick a local one, and optionally personalization, correlation metadata, a per-call result callback URL, and a scheduled time.
Before you start
| Item | What it is |
| API Token | Your smrtPhone API token, sent on every request as the X-Auth-smrtPhone header. |
| Agent ID | The numeric id of the smrtAgent that should handle the call or SMS. You can list these yourself - see Finding your agent ids. |
| From-number | A phone number provisioned on your smrtPhone account, used as the caller ID /sender. Optional if you use geo caller ID and let smrtPhone choose. |
| Callback endpoint (optional) | A public HTTPS URL on your side that receives the result of each call attempt. |
Endpoint and authentication
| Value | |
|
Method / URL
|
POST |
| Auth header |
X-Auth-smrtPhone: <your API token> |
| Content type |
application/json |
| Rate limit |
50 requests per minute. Over the limit returns 429 with a Retry-After header (seconds |
A missing token returns 401 ; an invalid token returns 403.
Finding your agent ids
agentId is the one value you cannot guess. This endpoint lists every agent on your
account, so you can build a picker instead of hard-coding ids.
| Method / URL | Auth |
GET |
X-Auth-smrtPhone: <your APItoken>
|
1 {
2 "data": [
3 {
4 "agentId": 58,
5 "name": "Nora",
6 "agentType": { "id": 35, "name": "Speed to Lead" },
7 "language": "en",
8 "isTestAgent": false,
9 "createdAt": "2026-09-01T10:00:00+00:00",
10 "callbackNumbers": [
11 { "phoneNumber": "+14155550***", "name": "Main line" },
12 { "phoneNumber": "+14155550***", "name": null }
13 ]
14 }
15 ]
16 }
-
agentId is what you pass straight back as agentId when you launch.
-
agentType gives both the id and the display name, so you can group or label agents in
your UI without a second lookup.
-
isTestAgent marks a training agent. Never use one for real outreach - its actions are
simulated.
-
callbackNumbers are the numbers that agent also answers on. See below.
Using callbackNumbers
If you pick one of an agent's callbackNumbers as your fromNumber , a contact who calls that number back reaches the same agent rather than whatever else that number normally routes to. That continuity is the only reason this list exists.
It is a suggestion, not a rule. Any number on your account is a valid fromNumber for any agent - there is no such thing as an incompatible pairing. An empty list is perfectly normal: an agent built purely for outbound calling does not answer inbound anywhere, and it is still fully usable.
For the full list of numbers on your account, use POST https://api.smrt.studio/api/listPhoneNumbers with the same token. Simplest of all: skip number picking and send geoCallerId: true .
Request body
| Field | Type | Required | Description |
| agentId | integer | yes | The smrtAgent to run. See Finding your agent ids. |
| toNumber | string (E.164) | yes | The number to reach, e.g. +14155551*** . |
| fromNumber | string (E.164) | conditional | The caller ID / sender. Required unless you set geoCallerId . Must be a number on your account and cannot equal toNumber . Ignored when geoCallerId is set. |
| geoCallerId | boolean | no | true lets smrtPhone pick a number local to the person you are reaching. |
| geoCallerIdSettings.fromNumberPool | array of E.164 | no | Limits the choice to these numbers. Max 50. Omit to allow any number on your account. |
| geoCallerIdSettings.fallbackFromNumber | string (E.164) | no | Used when no local number is available. true reuses this person was last contacted from. |
| channel | string | no | call (default) places a cal; sms sends an agent - composed text. See Sending an SMS below. |
| instructions | string | sms | SMS only: the goal for the text - what it should accomplish. the agent writes the message to meet it. Provide this and/or message. |
| custom/Variables | object | no | Your own correlation data (ids, campaign references). Never used in the conversation and returned to you unchanged in the call result callback. Same limits as customVariables |
| crm_id | string | no | The id of this person's record in your CRM. When provided, smrtPhone matches the contact by this id so the same record is never duplicated (see Matching to your CRM record). Can also be sent inside metadata as crm_id . Returned to you in the call result callback. Max 255 characters. |
| external_webhook_url | string (URL) | no | Where smrtPhone POSTs the result of each call attempt (see Receiving the result). Max 2048 characters. Results are only delivered to a public HTTPS address; an http:// or private address is never called. For an SMS, the contact's replies are posted here (see Inbound SMS agent webhook). |
| scheduled_at | string (ISO 8601) | no | UTC time to place the call or send the SMS. Omit it (or send an empty string) for now. See Scheduling below. |
customVariables vs metadata: use customVariables for anything the agent should know (it becomes conversation context). Use metadata for your own bookkeeping the agent should not see - it simply round-trips back to you. The launch webhook also accepts a few aliases ( model_id for agentId , phone for toNumber , a custom_variables array for customVariables ) if they fit your system better.
Because customVariables reach the conversation, send values a person could hear read aloud - readable labels and plain dates rather than raw codes or machine timestamps.
Internal ids belong in metadata .
There is no fixed contact schema.
Only agentId and toNumber are required (plus fromNumber unless you use geo caller ID). Everything you know about the person travels in customVariables , which is a freeform object - so a data model built on team-defined custom fields needs no coordination with smrtPhone.
smrtPhone recognizes three keys when it creates or refreshes the contact behind the call:

Every other key is stored as-is on the contact and made available to the agent. Send your custom fields under whatever names you already use.
Two notes on shape:
-
Phone numbers. One toNumber per request, so you choose which number to reach for
that attempt. A contact can hold several numbers.
-
Mailing address. Not a field smrtPhone interprets today. Send it as a custom variable if the
agent should be able to reference it.
Choosing the number you send from
Name a fromNumber, and that is what the contact sees. Or let smrtPhone choose:
-
geoCallerId: true - picks a number local to the person you are reaching, which usually lifts answer rates. fromNumber is then optional.
-
stickyCallerId: true - reuses the number this person was last contacted from, so they keep seeing one number instead of a new thread each time. With no history, your fromNumber is used.
Both can be on. smrtPhone takes the first that fits:
1. Last number used with this person (sticky)
2. Same area code
3. Same country
4. Your fallbackFromNumber
5. Least-used of your numbers
Only numbers on your account are ever used. If none fit, the request is rejected with 400 .
If you care about what happens when a contact rings the number back, name one of the agent's callbackNumbers instead - see Using callbackNumbers above.
SMS senders
An SMS sender must be textable and registered to an approved A2P 10DLC campaign - carriers block texts from unregistered numbers. smrtPhone always checks textable; the A2P check depends on who picks the number:

Register every number you name yourself. Texts from an unregistered number are blocked by the carriers with no delivery error, and you are still billed for the attempt.
Matching to your CRM record (crm_id)
Send crm_id - your own record id for the person - and smrtPhone links the call to that record:
-
If a contact for that crm_id already exists in your smrtPhone account, it is reused and its details are refreshed. The same crm_id never creates a second contact, even if the phone number differs.
- If there is no match on crm_id , smrtPhone falls back to the phone number, and only
creates a new contact when neither the crm_id nor the number already exists - tagging
the new contact with your crm_id so future calls line up with it. - If you omit crm_id , matching is by phone number, exactly as before.
If a CRM integration already syncs your contacts to smrtPhone, crm_id matches those same contacts - it is stored in the same record-id field your sync writes, so there is no separate id space to maintain. smrtPhone never overwrites a record id your integration already set.
The crm_id you send is returned to you in the call result callback, so you can update the exact record on your side. It works for SMS too: the contact is matched the same way.
If one contact can have several records
smrtPhone treats crm_id as the person. If your model has several records pointing at one person (for example, multiple leads on one contact), send the contact id as crm_id and put the specific record id in metadata - it comes back to you unchanged, so you can attribute the outcome to the right record.
One limit to design around: while a request for the same agent and the same toNumber is still pending, another request for that pair is treated as the same action rather than a second one, and its metadata replaces the earlier values. Neither crm_id nor metadata makes it a separate call. If you need two calls to one number, let the first finish or space them with scheduled_at .
Sending an SMS (channel: sms)
Set channel: "sms" to have the agent send a text instead of placing a call. The agent composes the message at send time from your inputs plus its own SMS persona and the recent conversation with the contact, so a text scheduled earlier still reads naturally when it goes out. Provide at least one of:
-
instruction - the goal for the text (what it should accomplish); the agent writes the wording.
-
message - a draft; the agent sends it refreshed for the current conversation.
You can send both (a goal plus a starting draft). customVariables still provide personalization, and scheduled_at works the same as for calls. SMS goes through the same do-not-contact and legal texting-hours checks as calls.
The SMS send itself has no result callback. Once the contact replies, each text the agent handles is posted to the external_webhook_url of that SMS; see Inbound SMS agent webhook below.
Scheduling (scheduled_at)
Provide scheduled_at to send at a specific time; omit it to go as soon as possible.
-
The value is UTC. A value with no timezone offset is treated as UTC. A value with an offset (e.g. 2026-08-01T10:30:00-04:00 ) is accepted and converted to UTC.
-
Format: ISO 8601, for example 2026-08-01T15:30:00Z .
-
Now vs later: an empty or absent value, or a time already in the past, means it goes immediately.
-
For calls, the scheduled time is the first attempt; if unanswered, smrtPhone retries automatically from there.
Response
A successful request returns 202 Accepted - the action is queued, not yet performed --
with an id you can use to check status:
1 {
2 "response": {
3 "call_id": 12345
4 }
5 }
Validation problems come back with the matching status (e.g. 400 ) and a message: { "detail": "..." }
Re-sending
If you send another request for the same number and agent while one is still pending,smrtPhone reuses it instead of creating a duplicate. On a still-pending action:
-
customVariables , instruction , and message you send are merged in (keys you include are updated; keys you omit are kept).
-
metadata you send is merged into the existing correlation object, so keys you repeat are replaced.
-
If you include a new scheduled_at , it is moved to that time. If you omit it, the existing time is left unchanged.
-
The sending number already chosen for that pending action is kept, so a re-send does not move the contact to a different number.
How it is placed
- Calls and texts are automatically sent within the destination's legal calling / texting hours; anything requested outside that window is held until the next allowed time.
- For calls that are not answered, are busy or reach voicemail, the agent retries automatically: by default up to 2 calls a day for 3 days, 3 hours apart, and never before 10 a.m. in the contact's time zone. You can change this or switch it off under Cadence on the agent page. Retries stop once the contact texts back, calls in, or is reached. Retries belong to one phone number: reaching the contact on another number does not stop them.
- Calls start at up to 30 a minute for your account, with up to 200 running at once. There is
no daily cap. - Some destinations may be restricted; those requests are rejected. Your smrtPhone contact can confirm which destinations are enabled.
Opt-outs (do not call)
You do not need to suppress your own next call. smrtPhone checks its do-not-call list before every call and text it places on your account: a number on that list is never dialed, and the action ends without a call being made. That applies whether the opt-out came from a smrtAgent call, your own team, or an import.
To keep your own records in step, you have two options:
-
Read it off the call result. The toolsFired list in the callback contains addToDNC when the contact asked to be opted out on that call. See the payload table below.
-
Check before you launch. POST https://api.smrt.studio/api/isDNCNumber with {"phone": "+14155551***"} and the same X-Auth-smrtPhone header returns {"isDnc": true} or {"isDnc": false} for your account.
There is no separate opt-out event webhook today. If you would prefer a dedicated push
when a contact opts out, tell your smrtPhone representative - it is a small addition.
Receiving the result (your callback)
After every call attempt, smrtPhone POSTs the result to the external_webhook_url you supplied for that call.
Every attempt sends one. A call that connects (answered, or reaching voicemail) reports shortly after it ends. An attempt that does not connect reports right away, with status set to no-answer , busy , failed or canceled and no transcript or summary.
Unanswered attempts are still retried automatically, and each retry sends its own callback with the same crm_id and metadata . A call that never starts, for example because the number is on the do-not-call list, sends nothing; see Checking status. The SMS send does not fire this callback.
Your endpoint receives a JSON body with these fields:
| Field | Description |
| event | Always post_call_action . |
| channel | voice for a call result. |
| callSid | The call identifier. |
| aiFlowCallId | Internal Call id (useful for support) |
| agentID, agentName | The agent that ran the call. |
| status | How the call ended on the network, e.g. completed , no-answer , busy . |
| disposition | The outcome label set on the call (e.g. Converted ), which is separate from status . Empty until the call has been dispositioned, so treat it as optional. |
| duration | Call lenght in seconds. |
| createAt, timpestamp | When the call was placed, and when the callback was sent. |
| summary, conciseSummary | Summaries of the conversation. |
| playbookCategory | How the call outcome was classified. |
| callDetails | Structured details captured during the call, as a list of {detail_id, detail_value} . |
| toolsFired | The actions the agent took on the call, as a list of names in the order they happened (e.g. ["gatherDetails", "addToDNC"] ). addToDNC means the contact asked to be opted out. |
| customVariables | The values you sent at launch, echoed back, with the contact name, email and phone number filled in where you did not send them. |
| metadata | Your correlation object, returned unchanged. |
| crm_id | The CRM record id you sent at launch, returned so you can update the exact record. Empty when you did not send one. It is also included inside metadata . |
| isVoicemail | Whether the call reached voicemail. |
| transcript | The conversation transcript. |
| recordingURL | A link to the call recording. It opens directly, without a smrtPhone login. |
Verifying the callback: if a shared secret is set on the agent, each callback includes it in the x-smrtPhone-callback-secret header. Compare it to your copy of the secret to confirm the request came from smrtPhone. It is a shared secret to match, not a signature computed over the body.
To set it, open the agent's Data Connectors page, switch on Post-call delivery, enter the same URL you send as external_webhook_url , and fill in Secret. Using the same URL there means each result arrives once. With Post-call delivery on, that URL receives the result of every call the agent makes, including calls launched without external_webhook_url .
If your endpoint is down: smrtPhone retries a failed delivery over roughly the following three
hours (five attempts, spaced 1 minute, 5 minutes, 15 minutes, 45 minutes and 2 hours apart).
Reply with any 2xx status within 30 seconds to acknowledge. Treat repeated deliveries of
the same callSid as the same call.
Inbound SMS agent webhook
The outbound SMS send itself has no result callback. Once the contact replies, smrtPhone POSTs a webhook for each inbound text the agent handles to the external_webhook_url of the latest SMS you launched to that contact with that agent, and to the agent's Post-call delivery URL if one is set (once, when the two are the same).
It carries channel: "sms" , the inbound message, and the agent's reply ( reply may be empty when the agent chooses not to respond). Skipped turns (opted-out, handed off to a human, or collapsed bursts) do not fire it. It uses the same delivery, retries, and x-smrtPhone- callback-secret header as the call callback. Call callbacks carry channel: "voice" .
Checking status
The result callback is the primary way to get outcomes. If you also want to poll, a read-only status endpoint is available on the API host using the same token and the call_id from the launch response:

Alongside status , the response carries gateOutcome - why the compliance gate last acted on the action. When status is failed , this tells you whether the number was on the do-not-call list (blocked_dnc ), fell outside the campaign window ( blocked_cutoff ), or hit a genuine error. It is empty until the gate has run.
Examples:
List the agents on your account:
1 curl -X GET https://api.smrt.studio/api/v1/ai-flows/outbound-calls/agents \
2 -H "X-Auth-smrtPhone: $TOKEN"
Place a call now:
1 curl -X POST https://flows.smrt.studio/webhook/smrtagents/launch-call \
2 -H "X-Auth-smrtPhone: $TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "agentId": 58,
6 "toNumber": "+14155551***",
7 "fromNumber": "+1234239****",
8 "customVariables": { "firstName": "John" },
9 "crm_id": "cust-42",
10 "external_webhook_url": "https://your-app.example.com/smrtphone/callback"
11 }'
Carry your own record ids through to the results (contact id as crm_id , the specific record in metadata)
1 curl -X POST https://flows.smrt.studio/webhook/smrtagents/launch-call \
2 -H "X-Auth-smrtPhone: $TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "agentId": 58,
6 "toNumber": "+14155551***",
7 "fromNumber": "+12342399***",
8 "crm_id": "contact-9931",
9 "metadata": { "lead_id": "lead-4472", "campaign": "spring-buyers" },
10 "customVariables": { "firstName": "John", "property_city": "Austin" },
11 "external_webhook_url": "https://your-app.example.com/smrtphone/callback"
12 }'
Let smrtPhone pick a local number (nofromNumber needed):
1 curl -X POST https://flows.smrt.studio/webhook/smrtagents/launch-call \
2 -H "X-Auth-smrtPhone: $TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "agentId": 58,
6 "toNumber": "+14155551***",
7 "geoCallerId": true,
8 "customVariables": { "firstName": "John" }
9 }'
Prefer a local number, keep the same one for repeat contact, and limit the choice to three of your numbers:
1 curl -X POST https://flows.smrt.studio/webhook/smrtagents/launch-call \
2 -H "X-Auth-smrtPhone: $TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "agentId": 58,
6 "toNumber": "+14155551***",
7 "geoCallerId": true,
8 "stickyCallerId": true,
9 "geoCallerIdSettings": {
10 "fromNumberPool": ["+14155550***, "+14155550***", "+16505550***"],
11 "fallbackFromNumber": "+12342399***"
12 }
13 }'
Send an SMS with an instruction (agent composes the text):
1 curl -X POST https://flows.smrt.studio/webhook/smrtagents/launch-call \
2 -H "X-Auth-smrtPhone: $TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "agentId": 58,
6 "toNumber": "+14155551***",
7 "fromNumber": "+12342399***",
8 "channel": "sms",
9 "instruction": "Remind them about the webinar and ask if they are still coming.",
10 "customVariables": { "firstName": "John" }
11 }'
Send an SMS and let smrtPhone pick a local, textable number:
1 curl -X POST https://flows.smrt.studio/webhook/smrtagents/launch-call \
2 -H "X-Auth-smrtPhone: $TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "agentId": 58,
6 "toNumber": "+14155551***",
7 "channel": "sms",
8 "geoCallerId": true,
9 "stickyCallerId": true,
10 "geoCallerIdSettings": {
11 "fromNumberPool": ["+14155550***", "+16505550***"],
12 "fallbackFromNumber": "+14155550111"
13 },
14 "instruction": "Remind them about the webinar and ask if they are still coming.",
15 "customVariables": { "firstName": "John" }
16 }'
Schedule an SMS from a draft, for a specific UTC time:
1 curl -X POST https://flows.smrt.studio/webhook/smrtagents/launch-call \
2 -H "X-Auth-smrtPhone: $TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "agentId": 58,
6 "toNumber": "+14155551***",
7 "fromNumber": "+12342399***",
8 "channel": "sms",
9 "message": "Hi , just checking in on your quote.",
10 "scheduled_at": "2026-08-01T15:30:00Z"
11 }'
Questions
For your API token, agent ids, enabled destinations, SMS availability, or callback secret, contact your smrtPhone representative.