Developer API
Two ways to work with your calls: pull them with the REST API, or let us push them to you with webhooks. Both speak plain JSON.
Agent implementation
Let your coding agent do the wiring. Building with Claude or another coding agent? Give your agent this one prompt, together with this page and your own app's API documentation. It will use your ScreenMyCalls account, create the key with you, read both contracts, wire the API and the webhooks into your project, and prove the setup with one real call.
The prompt — copy it exactly as written
You are my coding agent. Set up the ScreenMyCalls integration in this project so my software receives every finished phone call from my ScreenMyCalls line — who called, what happened, the summary, and the full transcript — and can pull call history, recordings, and order-line orders through its API.
You will be given two documents: the ScreenMyCalls API documentation (one page) and my own app's API documentation. Read both before writing any code. The integration is a wiring job between those two contracts — nothing more.
Work in this order. Do not skip the account, contract, or test steps.
1. UNDERSTAND THE JOB
ScreenMyCalls is an AI phone line for a business: it answers calls, screens spam, books appointments, and takes orders from a priced menu. My app keeps doing what it already does. This integration connects the two:
- ScreenMyCalls pushes an event to my app when a call starts (call.inbound_started) and when it ends (call.completed — carries the caller, the outcome, a summary, the duration, and the full transcript).
- My app can pull calls, transcripts, and recordings from the ScreenMyCalls REST API at any time.
- If my business uses the order line, my app can also pull the structured orders those calls produced (items, quantities, prices, totals) from the REST API. call.completed does not carry the order itself — orders are fetched through the API and matched to their call by callRecordId.
Inspect this project first and find the smallest sensible place for a webhook receiver and a small server-side API client. Ask me what a finished call should become in my app (a call record on the customer, a lead, a ticket) if that is not clear from the project and my app's documentation. Do not change unrelated features.
2. GET MY KEY SAFELY
Use my ScreenMyCalls account. Integrations are approved — if I do not have an account or my integration is not approved yet, stop and tell me to contact ScreenMyCalls first. Never ask me to give you my password or a one-time code; pause while I sign in myself.
After I am signed in, go to Settings → Developer API and create a key named for this app. The full key is shown only once. Help me store it as the server-side environment variable SMC_API_KEY. Never print the full key in chat, logs, screenshots, or test output. Never commit it to Git, and never put it in browser code. The key can only see the one business it was created under — that scoping is by design.
In the same settings section I will register the webhook (step 4 tells you the URL and events) — the webhook secret is also shown once; store it as SMC_WEBHOOK_SECRET the same way.
3. READ BOTH CONTRACTS BEFORE CODING
Use the ScreenMyCalls API documentation I pasted as the contract, with https://www.screenmycalls.app/api-docs as the human-readable reference, and my app's API documentation for my side. Do not invent endpoints, fields, or events on either side.
ScreenMyCalls facts from the contract:
- REST base: https://www.screenmycalls.app — GET /api/v1/calls (list, newest first, limit 1–100), GET /api/v1/calls/:id (one call with transcript), GET /api/v1/calls/:id/recording (audio file), GET /api/v1/orders (list, newest first, limit 1–100, optional since), GET /api/v1/orders/:id (one order with its items).
- Send the key on every request: Authorization: Bearer <SMC_API_KEY>.
- Webhooks are POSTed as signed JSON. Verify every delivery before trusting it: header X-SMC-Signature carries sha256=<hex>, an HMAC-SHA256 of the exact raw request body with SMC_WEBHOOK_SECRET. Compare in constant time.
- HTTP 401 means the key is missing, invalid, or revoked. HTTP 404 on a call or an order means it is not this business's — the API never reveals whether another business's record exists.
4. BUILD THE CONNECTION
Build two small pieces, both server-side:
a) A webhook receiver at the route my app's documentation indicates (or /webhooks/screenmycalls if it has no convention):
- Read the RAW body, verify the signature, reject anything that fails.
- Handle call.completed: store one call record in my app, mapped per my app's documentation — caller number, outcome, summary, transcript, duration, timestamps. Deduplicate on the event id: ScreenMyCalls delivery is best-effort and may retry, so the same event must never create two records.
- Handle call.inbound_started only if my app has a live view that benefits; otherwise skip it and say so in your report.
- Answer 200 quickly; do heavy work after responding.
b) A reusable ScreenMyCalls client that reads SMC_API_KEY from the environment and supports the GET endpoints above, so my app can backfill or re-fetch any call the webhook missed — and, if I use the order line, list and fetch orders and match them to calls by callRecordId.
Handle failures honestly: a failed signature is rejected and logged, never processed; a 401 stops the client and surfaces as a configuration error, never retried in a loop.
5. RUN ONE REAL TEST CALL AND SHOW ME THE RESULT
No mocks. Place one real call to my ScreenMyCalls number (I will tell you the number, or read it from my account with the API), let it complete naturally, and show me:
- the call.completed webhook arriving at my app with a verified signature;
- the call record it created in my app, with the summary and transcript;
- the same call fetched back through GET /api/v1/calls/:id matching what the webhook carried;
- if I use the order line: one order fetched through GET /api/v1/orders matching its database shape;
- anything that did not line up with either contract.
Fix the wiring if the test disagrees with the contracts. Do not call the setup complete on a simulated payload.
6. STOP AND REPORT BEFORE GOING FURTHER
When the test passes, stop and report:
- what you changed and where the integration lives in the project;
- the real test call: when, from what number, and what landed in my app;
- what remains unmapped or ambiguous in either contract.
Do not deploy to production, buy or change a plan, swap in a different key, or backfill call history in bulk without my approval.
If the sign-up, the dashboard, the documentation, and the live API disagree, stop guessing and contact ScreenMyCalls support at innovarelsupport@agentmail.to.- Two owner moments only: you sign in yourself (your password and codes never go to the agent), and the key + webhook creation, because both secrets are shown once. Everything else is the agent's work, in steps.
- Stop-and-report rule: the agent must stop after one real test call and report the result before any production deploy, plan change, or bulk backfill.
- Approved integrations: integration partners are approved first — the prompt stops at the account step if yours is not.
- Need help? Email innovarelsupport@agentmail.to.
Authentication
Create an API key in the dashboard: Settings → Developer API. Send it on every request:
Authorization: Bearer smc_live_…- Keys are shown once at creation and can never be recovered — store them securely.
- Revoking a key takes effect immediately.
- A key can only see the business (organization) it was created under.
REST endpoints
List calls
GET https://www.screenmycalls.app/api/v1/calls?limit=20
200 OK
{
"calls": [
{
"id": "ca_01k9…",
"fromNumber": "+12155550142",
"toNumber": "+12152546697",
"direction": "inbound",
"status": "completed",
"startedAt": "2026-10-20T14:03:11.000Z",
"durationSeconds": 74,
"hasTranscript": true,
"recordingAvailable": true
}
]
}limit is optional (1–100, default 20). Calls are newest-first across all of your numbers.
Get a call, with transcript
GET https://www.screenmycalls.app/api/v1/calls/:id
200 OK
{
"id": "ca_01k9…",
"fromNumber": "+12155550142",
"toNumber": "+12152546697",
"direction": "inbound",
"status": "completed",
"startedAt": "2026-10-20T14:03:11.000Z",
"endedAt": "2026-10-20T14:04:25.000Z",
"durationSeconds": 74,
"failureReason": null,
"transcript": [
{ "speaker": "agent", "text": "Thanks for calling MOMS Mobile Oil Change.", "createdAt": "…" },
{ "speaker": "caller", "text": "Hi, I need an oil change.", "createdAt": "…" }
],
"recordingUrl": "/api/v1/calls/:id/recording"
}Get the recording
GET https://www.screenmycalls.app/api/v1/calls/:id/recording
# → audio file (Content-Type depends on the provider, e.g. audio/wav)Missing or wrong key? You get 401. A call on someone else's number is 404 — we never reveal whether it exists.
List orders
If your line takes orders from your menu, every confirmed order is stored as a structured record — items, quantities, and prices exactly as sold, never parsed out of a transcript. Match an order to its call with callRecordId. Money is integer cents, from the menu — the only place prices live.
GET https://www.screenmycalls.app/api/v1/orders?limit=20
# optional: &since=2026-10-01T00:00:00.000Z
200 OK
{
"orders": [
{
"id": "ord_01k9…",
"callRecordId": "ca_01k9…",
"numberId": "pn_…",
"callerName": "Riley M.",
"callerPhone": "+14855550142",
"fulfillment": "pickup",
"deliveryAddress": null,
"status": "new",
"subtotalCents": 1450,
"totalCents": 1450,
"notes": null,
"confirmedAt": "2026-10-20T14:04:02.000Z",
"createdAt": "2026-10-20T14:04:02.000Z",
"updatedAt": "2026-10-20T14:04:02.000Z",
"items": [
{
"id": "oi_01k9…",
"menuItemId": "mi_…",
"name": "Cold Brew",
"variationName": "Large",
"quantity": 2,
"unitPriceCents": 550,
"modifiers": [{ "name": "Oat milk", "priceDeltaCents": 75 }],
"lineTotalCents": 1250,
"notes": null
},
{
"id": "oi_01k9…",
"menuItemId": "mi_…",
"name": "Iced Tea",
"variationName": null,
"quantity": 1,
"unitPriceCents": 200,
"modifiers": [],
"lineTotalCents": 200,
"notes": "no sugar"
}
]
}
]
}Get an order
GET https://www.screenmycalls.app/api/v1/orders/:id
# → the single order object above (same shape, with its items)An order on someone else's account is 404 — same rule as calls. Note: call.completed webhooks carry the call, its summary, and its transcript; the order itself is fetched here and matched by callRecordId.
Connect your agent (MCP)
ScreenMyCalls also speaks the Model Context Protocol (MCP), so an AI agent — Claude, Grok, or any MCP client — can operate your phone line directly, with the same API key as the REST API above. This is a business tool: the canonical use is your agent calling your suppliers and vendors — price checks, stock checks, order follow-ups — so the business runs more efficiently. You can tell your suppliers ahead of time that your agent will call. On every outbound call, the agent introduces itself up front as an AI calling on behalf of your business.
- Endpoint:
https://www.screenmycalls.app/api/mcp(stateless Streamable HTTP — no session to open or close). - Credential: the API key from Settings → Developer API, sent as
Authorization: Bearer smc_live_…on every request. The agent can only see — and only call from — the business that key belongs to.
Generic MCP client configuration:
{
"mcpServers": {
"screenmycalls": {
"url": "https://www.screenmycalls.app/api/mcp",
"headers": {
"Authorization": "Bearer smc_live_…"
}
}
}
}Claude clients (Claude Code, Claude Desktop remote servers) use this exact configuration. Grok-style clients that accept a remote MCP server URL plus headers use the same URL and the same Authorization header.
Tools
get_account— which business this key belongs to: name, plan, number counts.list_numbers— the business's phone numbers with their role and configuration.list_calls— recent calls, with optional direction, status, and since/until filters.get_call— one call's status, outcome, summary, duration, and recording availability.get_call_transcript— one call's transcript turns.get_call_recording— the playable recording URL (our own org-scoped proxy URL; fetch it with the same Bearer key).place_task_call— place an outbound call: a task with a goal (for example, check a supplier's price and stock) or a discuss call that opens with your message.
Calls placed through MCP act with your own authority as the key owner — no appointment is required, because a supplier check has none. Your plan's call minutes, the 25-calls-per-day cap, do-not-call contacts, and the spam blocklist still apply and will refuse a call that hits them. (Task calls placed from the dashboard remain follow-up-only; that rule governs the dashboard, not your agent.)
Webhooks
Add an endpoint in Settings → Developer API → Webhooks and we POST a signed JSON event for each call. HTTPS required. Two events:
call.inbound_started
{
"id": "evt_01k9…",
"type": "call.inbound_started",
"created_at": "2026-10-20T14:03:09.000Z",
"data": {
"call_id": "sess_01k9…",
"from": "+12155550142",
"to": "+12152546697",
"direction": "inbound",
"started_at": "2026-10-20T14:03:09.000Z"
}
}call.completed
{
"id": "evt_01k9…",
"type": "call.completed",
"created_at": "2026-10-20T14:04:25.000Z",
"data": {
"call_id": "sess_01k9…",
"from": "+12155550142",
"to": "+12152546697",
"direction": "inbound",
"outcome": "completed",
"summary": "Customer booked an oil change for Thursday morning.",
"duration_seconds": 74,
"ended_at": "2026-10-20T14:04:25.000Z",
"transcript": [
{ "speaker": "agent", "text": "…" },
{ "speaker": "caller", "text": "…" }
]
}
}Verifying signatures
Every delivery carries X-SMC-Signature: sha256=<hex> — an HMAC-SHA256 of the exact request body with your webhook secret. Verify before trusting the payload:
const crypto = require("node:crypto");
const expected = crypto
.createHmac("sha256", process.env.SMC_WEBHOOK_SECRET)
.update(rawBody, "utf8")
.digest("hex");
const got = req.headers["x-smc-signature"]?.replace("sha256=", "");
const ok = expected.length === got.length &&
crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(got));Delivery notes
- Delivery is best-effort with a 5-second timeout; we log failures on your endpoint row in Settings.
- Removing a webhook stops deliveries within about 5 minutes.
- Your webhook secret is shown once at creation — same rule as API keys.