Skip to content

Developers

Talkwish API and webhooks

Connect Talkwish to your CRM, help desk or your own tools. Read your company’s call logs, call recordings, voicemail, text messages, contacts and website chats over a REST API, and get signed webhooks as things happen.

  • Pro plan
  • Read-only
  • JSON over HTTPS
  • Signed webhooks
Your first request
curl "https://api.talkwish.com/open/v1/me" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

Base URL https://api.talkwish.com/open/v1

On this page

Quick start

The API is part of the Pro plan. Your company asks for access once, Talkwish approves it, and then the company’s owner or an admin makes keys for each app you connect.

  1. 1. Ask for access

    In the web app, open Settings, Developer and tell us what you’ll connect.

  2. 2. Make a key

    Once we approve it, make a key with only the scopes the app needs. It’s shown once, so copy it.

  3. 3. Call the API

    Send the key as a Bearer token. Start with GET /me to check it works.

  4. 4. Add a webhook

    Get calls, texts and voicemail pushed to your server as they happen. See webhooks.

Getting access

The Talkwish API is for company accounts on the Pro plan. Access has two conditions, and both are checked on every request and before every webhook is sent:

  • Talkwish approved your company’s API access. Ask for it once, then make as many keys as you need.
  • The company is on a live Pro plan. If it moves to another plan or the plan lapses, keys answer 403 plan_required until it’s back on Pro, and webhooks stop.

Ask for access

  1. The company’s owner or an admin signs in to the web app and opens Settings, Developer. Other team members don’t see it.
  2. Tell us in a sentence or two what you’ll connect, such as “Log calls and texts in our CRM”, and optionally which app.
  3. Talkwish reviews the request and emails you when it’s approved or declined. You can withdraw a request while it’s waiting, and ask again after a decline.

If Talkwish revokes access later, every key is revoked and every webhook is turned off at once. Keys then answer 401 invalid_api_key.

Make a key

Once access is approved, the owner or an admin can make up to 10 active keys on the Developer page. Give each key a name, choose its scopes, and choose when it expires: after 30, 90, 180 or 365 days, or never. The whole key is shown once, when you make it. After that the page shows only its first characters (like twk_8fQ2mZr1), when it was last used, and the company’s last 100 API requests.

Every key is read-only. The API can’t place, answer or transfer calls, send texts or change anything. Scopes choose what it can read:

API key scopes
ScopeReadsEndpoints
calls:read Call logs /calls
recordings:read Call recordings and their transcripts /recordings
voicemail:read Voicemail and transcripts /voicemails
messages:read Text messages /messages
contacts:read Contacts /contacts
website_chats:read Website chats /website-chats
numbers:read Company numbers /numbers
team:read Team members /team

GET /me works with any key. Webhooks aren’t tied to a key or its scopes.

Authentication

Send your key in the Authorization header as a Bearer token on every request. Keys start with twk_, followed by 43 letters, digits, - and _.

Request
curl "https://api.talkwish.com/open/v1/calls?limit=10" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

Keep the key in an environment variable or a secret store on your server. The API sends no CORS headers, so a browser page can’t call it, and a key must never be put in website or mobile app code. A missing header answers 401 unauthorized, a wrong or revoked key 401 invalid_api_key, and an expired one 401 api_key_expired.

Base URL and versions

Every endpoint is a GET under one base URL, over HTTPS only:

Base URL
https://api.talkwish.com/open/v1
  • Responses are JSON in UTF-8. Every object has an object field that names its type, such as "call".
  • Times are ISO 8601 in UTC, like 2026-11-12T15:24:41.000Z. A value that isn’t known is null, never left out.
  • Ids are opaque strings of up to 64 characters. Store them as text and don’t parse them.
  • Responses carry Cache-Control: private, no-store.

The version is in the path (/open/v1). We may add fields, endpoints and webhook events to v1, so write your code to ignore what it doesn’t recognize. A change that would break existing integrations would come as a new version.

Rate limits

Each key can make 120 requests a minute, and all of a company’s keys together 300 a minute. The minutes are fixed windows that start on the clock minute. Every request that gets past the key, access and scope checks carries these headers:

Rate limit headers
HeaderMeaning
X-RateLimit-LimitRequests a minute for this key (120).
X-RateLimit-RemainingRequests left in this minute: the lower of what’s left for the key and for the company.
X-RateLimit-ResetWhen the current minute ends, in Unix seconds.

Over either limit, the API answers 429 rate_limited with a Retry-After header in seconds. A refused request doesn’t count. Check your current limits with GET /me.

429 response
HTTP/1.1 429 Too Many Requests
Retry-After: 18
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1794498060

{
  "statusCode": 429,
  "error": "Too Many Requests",
  "message": "Too many requests. Slow down and try again shortly.",
  "code": "rate_limited",
  "details": {
    "retryAt": "2026-11-12T15:41:00.000Z"
  }
}

Pagination and syncing

Every list answers { "data": [...], "nextCursor": "..." }, newest first (the team list is oldest first). Ask for up to 200 items with limit (default 50). When nextCursor isn’t null, pass it as cursor, with the same filters, to get the next page. Cursors are opaque.

Time filters take ISO 8601 date-times with Z or an offset, like 2026-11-12T00:00:00Z or 2026-11-11T19:00:00-05:00 (write the + of a positive offset as %2B in a URL). since includes that moment and until doesn’t, so back-to-back windows never overlap. since must be earlier than until. Query parameters that an endpoint doesn’t list are refused with 400 validation_failed.

Keep another system in sync

  1. Pull on a schedule, every few minutes, with a time filter that starts a little before your last successful run.
  2. For calls, use endedSince: it finds every call that finished since then, even one that started before your last run. Calls that are still going have endedAt: null.
  3. For texts, recordings, voicemail and chats, use since. For contacts and chats that changed, use updatedSince.
  4. Follow nextCursor until it’s null, and upsert each item by its id, so overlapping windows are harmless.
  5. Or let webhooks tell you right away, and keep a daily pull as a safety net.
Node.js: sync finished calls
const BASE = 'https://api.talkwish.com/open/v1';
const KEY = process.env.TALKWISH_API_KEY;
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

/** Every item of a list, following nextCursor until it is null. */
async function fetchAll(path, params = {}) {
  const items = [];
  let cursor = null;
  for (;;) {
    const url = new URL(BASE + path);
    for (const [name, value] of Object.entries({ ...params, limit: 200 })) url.searchParams.set(name, String(value));
    if (cursor) url.searchParams.set('cursor', cursor);
    const res = await fetch(url, { headers: { Authorization: `Bearer ${KEY}` } });
    if (res.status === 429) {
      await sleep(Number(res.headers.get('Retry-After') || 5) * 1000);
      continue; // the same page again
    }
    const body = await res.json();
    if (!res.ok) throw new Error(`${res.status} ${body.code}: ${body.message}`);
    items.push(...body.data);
    if (!body.nextCursor) return items;
    cursor = body.nextCursor;
  }
}

// Run every few minutes. Ask again for the last 5 minutes each time, and upsert by id,
// so a call that finished during the previous run is never missed or stored twice.
async function syncCalls(state) {
  const startedAt = new Date();
  const endedSince = new Date(state.lastRun.getTime() - 5 * 60_000).toISOString();
  for (const call of await fetchAll('/calls', { endedSince })) {
    await crm.upsertCallActivity({ externalId: call.id, ...call });
  }
  state.lastRun = startedAt;
}

Errors

Errors use HTTP status codes and the same JSON body everywhere. code is stable, so build on it; message is for people and may change. Some errors add details.

Error body
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "This API key doesn’t have the recordings:read scope.",
  "code": "insufficient_scope",
  "details": {
    "scope": "recordings:read"
  }
}
Error codes
CodeStatusMeaningWhat to do
validation_failed 400 A query parameter is unknown or has a value that isn’t allowed, or since isn’t earlier than until. Read the message, which names the parameter.
invalid_cursor 400 The cursor isn’t one this list returned. Pass nextCursor exactly as you got it, with the same filters.
unauthorized 401 No Authorization: Bearer header. Send the key in the Authorization header.
invalid_api_key 401 The key isn’t valid, or it was revoked. Check for copy mistakes, or make a new key.
api_key_expired 401 The key reached its expiry date. Make a new key on the Developer page.
api_access_not_approved 403 Talkwish hasn’t approved API access for this company. Ask for access on the Developer page.
plan_required 403 The company isn’t on a live Pro plan. Keys work again once the company is back on Pro.
insufficient_scope 403 The key doesn’t have the scope this endpoint needs. details.scope names it. Make a key with that scope.
calls_not_allowed 403 Calls can’t be placed, answered or transferred through the API. Any write to a call path answers this. Place calls from the Talkwish apps. The API reads call logs and recordings only.
read_only_api 403 The API is read-only: every POST, PUT, PATCH or DELETE answers this. Use GET. Make changes in the Talkwish apps.
not_found 404 No such record in your company’s data, or no such route. Check the id. Hidden and deleted items also answer 404.
rate_limited 429 Too many requests this minute, for the key or the company. Wait for the Retry-After seconds, then try again.
feature_paused 503 Talkwish has paused the API for a short time. Try again in a few minutes.

A 500 answers internal_error. It’s safe to retry any request, since nothing in the API changes data.

What counts as company data

A key reads its own company’s data, and only that. It includes:

  • Calls, recordings, voicemail and texts on the company’s numbers, whichever team member answered, made or sent them. That covers numbers assigned to someone and unassigned ones, and the history of numbers the company has since given up.
  • Contacts saved in the company owner’s Talkwish account.
  • Website chats on the company’s chat widgets.
  • The company’s numbers and team members.

It never includes:

  • A team member’s own app-to-app calls and texts on their personal @username, which belong to them, not the company.
  • Anything someone hid or deleted in the app: hidden calls, deleted conversations, and the history before a conversation was cleared. It answers 404, as if it didn’t exist.
  • Conversations Talkwish has to hold back for safety or legal reasons.
  • Pictures in a message request (a first text from someone new that nobody has accepted yet).

Endpoints

All 17 endpoints, relative to https://api.talkwish.com/open/v1. Each needs one of the 8 scopes.

All endpoints
EndpointScope
GET /me Any key
GET /calls calls:read
GET /calls/{id} calls:read
GET /recordings recordings:read
GET /recordings/{id} recordings:read
GET /recordings/{id}/audio recordings:read
GET /voicemails voicemail:read
GET /voicemails/{id} voicemail:read
GET /voicemails/{id}/audio voicemail:read
GET /messages messages:read
GET /messages/{id} messages:read
GET /contacts contacts:read
GET /contacts/{id} contacts:read
GET /website-chats website_chats:read
GET /website-chats/{id} website_chats:read
GET /numbers numbers:read
GET /team team:read

Your key

GET /me

Works with any key, whatever its scopes.

The key you’re using, its scopes, its company and the rate limits. Handy as a first test and as a health check.

Request
curl "https://api.talkwish.com/open/v1/me" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "object": "api_key",
  "key": {
    "id": "cm3t1a9wd0003lb08m2q5z7xe",
    "prefix": "twk_8fQ2mZr1",
    "scopes": [
      "calls:read",
      "recordings:read",
      "messages:read"
    ]
  },
  "company": {
    "id": "cm2p4r7tq0000lb05c8n1k3ve",
    "name": "Example Plumbing"
  },
  "rateLimit": {
    "perMinutePerKey": 120,
    "perMinutePerCompany": 300
  }
}

Calls

The call log of every company number: incoming and outgoing calls, answered or missed, with recordings and voicemail linked by id.

GET /calls

Needs the calls:read scope.

Calls, newest first by startedAt.

Query parameters for GET /calls
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
since date-time Only items whose startedAt is at or after this time.
until date-time Only items whose startedAt is before this time.
endedSince date-time Only calls that ended at or after this time. Best for syncing.
direction string "inbound" or "outbound".
status string "completed" for answered calls, or "missed" for incoming calls nobody answered (no-answer, busy or canceled).
numberId string Only calls on this company number.
userId string Only calls in this team member’s call log.
Request
curl "https://api.talkwish.com/open/v1/calls?endedSince=2026-11-12T15:00:00Z&limit=2" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm3vq8z4k0042lb07x9d2h6ra",
      "object": "call",
      "direction": "inbound",
      "status": "completed",
      "from": "+16045550147",
      "to": "+14155550123",
      "number": {
        "id": "cm2p5b1xn0007lb05r4k8w2qd",
        "e164": "+14155550123"
      },
      "user": {
        "id": "cm2p4r9uv0001lb05h6d3m8tj",
        "name": "Maya Chen"
      },
      "onNet": false,
      "emergency": false,
      "forwarded": false,
      "startedAt": "2026-11-12T15:24:41.000Z",
      "answeredAt": "2026-11-12T15:24:49.000Z",
      "endedAt": "2026-11-12T15:31:07.000Z",
      "durationSec": 386,
      "billSec": 378,
      "recordingIds": [
        "cm3vq9c1e0045lb07k3t8w1mz"
      ],
      "voicemailIds": []
    },
    {
      "id": "cm3vp2r6c0038lb07u1f4k9wn",
      "object": "call",
      "direction": "inbound",
      "status": "no-answer",
      "from": "+12125550188",
      "to": "+14155550123",
      "number": {
        "id": "cm2p5b1xn0007lb05r4k8w2qd",
        "e164": "+14155550123"
      },
      "user": {
        "id": "cm2p4r9uv0001lb05h6d3m8tj",
        "name": "Maya Chen"
      },
      "onNet": false,
      "emergency": false,
      "forwarded": false,
      "startedAt": "2026-11-12T14:02:10.000Z",
      "answeredAt": null,
      "endedAt": "2026-11-12T14:02:40.000Z",
      "durationSec": 30,
      "billSec": 0,
      "recordingIds": [],
      "voicemailIds": []
    }
  ],
  "nextCursor": "Y20zdnAycjZjMDAzOGxiMDd1MWY0azl3bg"
}

GET /calls/{id}

Needs the calls:read scope.

One call, as a call object.

Request
curl "https://api.talkwish.com/open/v1/calls/cm3vq8z4k0042lb07x9d2h6ra" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

The call object

Call fields
Field Type Description
id string The call’s id.
object string Always "call".
direction string "inbound" or "outbound".
status string queued, ringing, in-progress, completed, busy, failed, no-answer, canceled or declined.
from, to string A phone number in E.164 form (+14155550123), or @username when that side is a Talkwish account.
number object or null The company number the call used: { id, e164 }.
user object The team member whose call log has this call: { id, name }.
onNet boolean True when the other side is a Talkwish account, so the call didn’t use the phone network.
emergency boolean True for an emergency call.
forwarded boolean True when this call is the forwarded leg of another call.
startedAt date-time When the call started.
answeredAt, endedAt date-time or null When it was answered and when it ended. Null if it wasn’t answered, or hasn’t ended yet.
durationSec integer or null Length of the whole call in seconds.
billSec integer or null Seconds from answer to hang-up.
recordingIds, voicemailIds array of strings Recordings and voicemail that belong to this call.

Recordings

Recordings of calls on numbers with recording turned on, with their transcripts.

GET /recordings

Needs the recordings:read scope.

Recordings, newest first by createdAt.

Query parameters for GET /recordings
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
since date-time Only items whose createdAt is at or after this time.
until date-time Only items whose createdAt is before this time.
callId string Only recordings of this call.
Request
curl "https://api.talkwish.com/open/v1/recordings?callId=cm3vq8z4k0042lb07x9d2h6ra" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm3vq9c1e0045lb07k3t8w1mz",
      "object": "recording",
      "callId": "cm3vq8z4k0042lb07x9d2h6ra",
      "userId": "cm2p4r9uv0001lb05h6d3m8tj",
      "durationSec": 378,
      "sizeBytes": 3024512,
      "contentType": "audio/mpeg",
      "createdAt": "2026-11-12T15:31:09.000Z",
      "audioUrl": "https://api.talkwish.com/v1/recordings/cm3vq9c1e0045lb07k3t8w1mz/audio?exp=1794498600&sig=Xq3kT9vB2mR7wL1pZ8cN4dF6hJ0sY5uE2aG7iK9oQ1w",
      "audioUrlExpiresAt": "2026-11-12T15:50:00.000Z",
      "transcript": {
        "status": "done",
        "text": "Hi, this is Alex Rivera. The water heater in unit 4 is leaking again. Could someone come by Thursday morning?",
        "language": "en"
      }
    }
  ],
  "nextCursor": null
}

GET /recordings/{id}

Needs the recordings:read scope.

One recording, with a fresh audioUrl. Fetch it again whenever you need a new link.

Request
curl "https://api.talkwish.com/open/v1/recordings/cm3vq9c1e0045lb07k3t8w1mz" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

GET /recordings/{id}/audio

Needs the recordings:read scope.

Redirects (302) to a fresh signed audio link, so a tool that follows redirects can download the file with the key alone. See Recording and voicemail audio.

Request
curl -L -o call-recording.mp3 "https://api.talkwish.com/open/v1/recordings/cm3vq9c1e0045lb07k3t8w1mz/audio" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
HTTP/1.1 302 Found
Location: https://api.talkwish.com/v1/recordings/cm3vq9c1e0045lb07k3t8w1mz/audio?exp=1794498600&sig=Xq3kT9vB2mR7wL1pZ8cN4dF6hJ0sY5uE2aG7iK9oQ1w
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 1794498060

The recording object

Recording fields
Field Type Description
id, object string The recording’s id, and "recording".
callId string The call it belongs to.
userId string The team member whose call it was.
durationSec integer Length in seconds.
sizeBytes integer or null File size.
contentType string "audio/mpeg" or "audio/wav".
createdAt date-time When the recording was saved.
audioUrl, audioUrlExpiresAt string, date-time A link that plays or downloads the audio without a key, for 10 minutes. See Recording and voicemail audio.
transcript object or null { status, text, language }. status is pending, processing, done, failed or disabled (transcripts are switched off for now). text is set only when status is done. Null when there is no transcript for this audio.

Voicemail

Voicemail left on company numbers, with transcripts.

GET /voicemails

Needs the voicemail:read scope.

Voicemail, newest first by createdAt.

Query parameters for GET /voicemails
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
since date-time Only items whose createdAt is at or after this time.
until date-time Only items whose createdAt is before this time.
numberId string Only voicemail left on this company number.
Request
curl "https://api.talkwish.com/open/v1/voicemails?since=2026-11-12T00:00:00Z" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm3vr2d7g0051lb07q5y2n4ab",
      "object": "voicemail",
      "callId": "cm3vr1x5h0049lb07a2d9f6jk",
      "number": {
        "id": "cm2p5b1xn0007lb05r4k8w2qd",
        "e164": "+14155550123"
      },
      "userId": "cm2p4r9uv0001lb05h6d3m8tj",
      "from": "+12125550188",
      "durationSec": 24,
      "read": false,
      "createdAt": "2026-11-12T16:05:33.000Z",
      "audioUrl": "https://api.talkwish.com/v1/voicemails/cm3vr2d7g0051lb07q5y2n4ab/audio?exp=1794500400&sig=Xq3kT9vB2mR7wL1pZ8cN4dF6hJ0sY5uE2aG7iK9oQ1w",
      "audioUrlExpiresAt": "2026-11-12T16:20:00.000Z",
      "transcript": {
        "status": "pending",
        "text": null,
        "language": null
      }
    }
  ],
  "nextCursor": null
}

GET /voicemails/{id}

Needs the voicemail:read scope.

One voicemail, with a fresh audioUrl.

Request
curl "https://api.talkwish.com/open/v1/voicemails/cm3vr2d7g0051lb07q5y2n4ab" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

GET /voicemails/{id}/audio

Needs the voicemail:read scope.

Redirects (302) to a fresh signed audio link, like the recording audio endpoint.

Request
curl -L -o voicemail -w '%{content_type}\n' "https://api.talkwish.com/open/v1/voicemails/cm3vr2d7g0051lb07q5y2n4ab/audio" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

The voicemail object

Voicemail fields
Field Type Description
id, object string The voicemail’s id, and "voicemail".
callId string or null The call that left it.
number object or null The company number it was left on: { id, e164 }.
userId string The team member whose voicemail box has it.
from string The caller, in E.164 form or as @username.
durationSec integer Length in seconds.
read boolean Whether someone has marked it as listened to.
createdAt date-time When it was left.
audioUrl, audioUrlExpiresAt string, date-time Signed audio link, valid 10 minutes.
transcript object or null Same shape as a recording’s transcript.

Text messages

Texts sent and received on company numbers.

GET /messages

Needs the messages:read scope.

Texts, newest first by sentAt.

Query parameters for GET /messages
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
since date-time Only items whose sentAt is at or after this time.
until date-time Only items whose sentAt is before this time.
direction string "inbound" or "outbound".
numberId string Only texts on this company number.
conversationId string Only texts in this conversation.
Request
curl "https://api.talkwish.com/open/v1/messages?direction=inbound&since=2026-11-12T00:00:00Z" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm3vs4h2p0060lb07e8r6j1cw",
      "object": "message",
      "conversationId": "cm3a8k2wq0019lb06t7m3x5pd",
      "direction": "inbound",
      "from": "+16045550147",
      "to": "+14155550123",
      "body": "Thanks! Thursday at 9 works. The gate code is 4512.",
      "mediaUrls": [],
      "status": "received",
      "errorCode": null,
      "number": {
        "id": "cm2p5b1xn0007lb05r4k8w2qd",
        "e164": "+14155550123"
      },
      "user": {
        "id": "cm2p4r9uv0001lb05h6d3m8tj",
        "name": "Maya Chen"
      },
      "conversationState": "accepted",
      "sentAt": "2026-11-12T16:41:02.000Z"
    }
  ],
  "nextCursor": null
}

GET /messages/{id}

Needs the messages:read scope.

One text, as a message object.

Request
curl "https://api.talkwish.com/open/v1/messages/cm3vs4h2p0060lb07e8r6j1cw" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

The message object

Message fields
Field Type Description
id, object string The text’s id, and "message".
conversationId string The conversation it belongs to. Use it to group texts into one thread in your CRM.
direction string "inbound" or "outbound".
from, to string Phone numbers in E.164 form.
body string The text.
mediaUrls array of strings Signed links to pictures, valid for at least 15 minutes. Empty for a message request (see conversationState).
status string accepted, queued, sending, sent, delivered, undelivered, failed, received or read.
errorCode string or null The carrier’s error code when sending failed.
number object or null The company number: { id, e164 }.
user object The team member whose inbox has the conversation: { id, name }.
conversationState string "accepted", or "request" for a first text from someone new that nobody has accepted yet. A request’s pictures stay hidden.
sentAt date-time When it was sent or received.

Contacts

Contacts saved in the company owner’s Talkwish account. Match them to calls and texts by phone number.

GET /contacts

Needs the contacts:read scope.

Contacts, most recently changed first. This list has no since or until.

Query parameters for GET /contacts
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
updatedSince date-time Only contacts added or changed at or after this time.
Request
curl "https://api.talkwish.com/open/v1/contacts?updatedSince=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm2z6n3rb0012lb06v2c7h9qe",
      "object": "contact",
      "name": "Alex Rivera",
      "company": "Example Property Management",
      "email": "alex.rivera@example.com",
      "notes": "Prefers texts after 5 pm.",
      "favorite": true,
      "phones": [
        {
          "label": "mobile",
          "e164": "+16045550147"
        },
        {
          "label": "work",
          "e164": "+16045550162"
        }
      ],
      "createdAt": "2026-09-03T18:12:44.000Z",
      "updatedAt": "2026-11-10T21:07:19.000Z"
    }
  ],
  "nextCursor": null
}

GET /contacts/{id}

Needs the contacts:read scope.

One contact.

Request
curl "https://api.talkwish.com/open/v1/contacts/cm2z6n3rb0012lb06v2c7h9qe" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"

The contact object

Contact fields
Field Type Description
id, object string The contact’s id, and "contact".
name, company, email, notes string or null As saved in Talkwish.
favorite boolean Marked as a favorite.
phones array [{ label, e164 }]. label can be null.
createdAt, updatedAt date-time When it was added and last changed.

Website chats

Chats from the Talkwish chat widget on your website, with the visitor’s details.

GET /website-chats

Needs the website_chats:read scope.

Chats without their messages, newest first by createdAt.

Query parameters for GET /website-chats
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
since date-time Only items whose createdAt is at or after this time.
until date-time Only items whose createdAt is before this time.
status string "open" or "closed".
updatedSince date-time Only chats with a message at or after this time.
Request
curl "https://api.talkwish.com/open/v1/website-chats?status=open" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm3vt1m8f0071lb07b4n6s2ky",
      "object": "website_chat",
      "widget": {
        "id": "cm2r3w8hd0009lb05y1k5p7ua",
        "name": "Main website"
      },
      "status": "open",
      "visitor": {
        "id": "cm3vt1lz30070lb07f3j8d1qm",
        "displayName": "Sam Patel",
        "name": "Sam Patel",
        "email": "sam.patel@example.com",
        "phone": null,
        "verified": false,
        "externalUserId": null,
        "country": "US"
      },
      "assignee": {
        "id": "cm2q7e2ka0004lb06p1v9s3xn",
        "name": "Jordan Lee"
      },
      "pageUrl": "https://www.example.com/services/water-heaters",
      "messageCount": 2,
      "createdAt": "2026-11-12T17:20:05.000Z",
      "lastMessageAt": "2026-11-12T17:21:40.000Z",
      "closedAt": null
    }
  ],
  "nextCursor": null
}

GET /website-chats/{id}

Needs the website_chats:read scope.

One chat with its messages (up to 1,000, oldest first).

Request
curl "https://api.talkwish.com/open/v1/website-chats/cm3vt1m8f0071lb07b4n6s2ky" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "id": "cm3vt1m8f0071lb07b4n6s2ky",
  "object": "website_chat",
  "widget": {
    "id": "cm2r3w8hd0009lb05y1k5p7ua",
    "name": "Main website"
  },
  "status": "open",
  "visitor": {
    "id": "cm3vt1lz30070lb07f3j8d1qm",
    "displayName": "Sam Patel",
    "name": "Sam Patel",
    "email": "sam.patel@example.com",
    "phone": null,
    "verified": false,
    "externalUserId": null,
    "country": "US"
  },
  "assignee": {
    "id": "cm2q7e2ka0004lb06p1v9s3xn",
    "name": "Jordan Lee"
  },
  "pageUrl": "https://www.example.com/services/water-heaters",
  "messageCount": 2,
  "createdAt": "2026-11-12T17:20:05.000Z",
  "lastMessageAt": "2026-11-12T17:21:40.000Z",
  "closedAt": null,
  "messages": [
    {
      "id": "cm3vt1n2a0072lb07g9p4r8sv",
      "object": "website_chat_message",
      "chatId": "cm3vt1m8f0071lb07b4n6s2ky",
      "from": "visitor",
      "body": "Do you install tankless water heaters?",
      "agent": null,
      "call": null,
      "createdAt": "2026-11-12T17:20:05.000Z"
    },
    {
      "id": "cm3vt2b4c0074lb07h1q6s3wd",
      "object": "website_chat_message",
      "chatId": "cm3vt1m8f0071lb07b4n6s2ky",
      "from": "agent",
      "body": "We do. Can I call you to go over the options?",
      "agent": {
        "id": "cm2q7e2ka0004lb06p1v9s3xn",
        "name": "Jordan Lee"
      },
      "call": null,
      "createdAt": "2026-11-12T17:21:40.000Z"
    }
  ]
}

The website chat object

Website chat fields
Field Type Description
id, object string The chat’s id, and "website_chat".
widget object The chat widget it came from: { id, name }.
status string "open" or "closed".
visitor object { id, displayName, name, email, phone, verified, externalUserId, country }. name, email and phone are what the visitor typed, unless verified is true (your website confirmed who they are, and externalUserId is your own user id for them). displayName is the name, or "Visitor 0042" when there is none. country is a two-letter code, when the widget looks it up.
assignee object or null The team member handling the chat: { id, name }.
pageUrl string or null The page the chat started on, when the widget shares page addresses.
messageCount integer Messages in the chat.
createdAt, lastMessageAt date-time When it started and when the last message came.
closedAt date-time or null When it was closed.
messages array Only from GET /website-chats/{id}: up to 1,000 chat messages, oldest first.

The chat message object

Chat message fields
Field Type Description
id, object string The message’s id, and "website_chat_message".
chatId string The chat it belongs to.
from string "visitor", "agent" or "system".
body string The text.
agent object or null The team member who wrote it: { id, name }.
call object or null For an in-browser call from the chat: { outcome, durationSec }. outcome is completed, missed, failed, cancelled, declined or expired.
createdAt date-time When it was sent.

Numbers

GET /numbers

Needs the numbers:read scope.

The company’s phone numbers, newest first. Use the ids as numberId in other lists.

Query parameters for GET /numbers
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
includeReleased boolean "true" to include numbers the company has given up. Default: active and pending numbers only.
Request
curl "https://api.talkwish.com/open/v1/numbers" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm2q7f4mb0006lb06w8j2c5ty",
      "object": "number",
      "e164": "+16045550110",
      "friendlyName": "Vancouver office",
      "status": "active",
      "voice": true,
      "sms": true,
      "assignedUser": null,
      "recordingEnabled": false,
      "createdAt": "2026-11-02T16:03:27.000Z",
      "releasedAt": null
    },
    {
      "id": "cm2p5b1xn0007lb05r4k8w2qd",
      "object": "number",
      "e164": "+14155550123",
      "friendlyName": "Main line",
      "status": "active",
      "voice": true,
      "sms": true,
      "assignedUser": {
        "id": "cm2p4r9uv0001lb05h6d3m8tj",
        "name": "Maya Chen"
      },
      "recordingEnabled": true,
      "createdAt": "2026-10-30T19:45:12.000Z",
      "releasedAt": null
    }
  ],
  "nextCursor": null
}

The number object

Number fields
Field Type Description
id, object string The number’s id, and "number".
e164 string The number, like +14155550123.
friendlyName string or null Its name in Talkwish.
status string pending, active or released.
voice, sms boolean Whether it takes calls and texts.
assignedUser object or null The team member it is assigned to: { id, name }.
recordingEnabled boolean Whether calls on it are recorded.
createdAt, releasedAt date-time When the company got it and, if it was given up, when. releasedAt is null otherwise.

Team

GET /team

Needs the team:read scope.

The company’s team members, in the order they joined. Use their ids as userId in the calls list, or to map them to users in your CRM.

Query parameters for GET /team
Parameter Type Description
limit integer How many items to return, 1 to 200. Default 50.
cursor string The nextCursor from the previous page.
Request
curl "https://api.talkwish.com/open/v1/team" \
  -H "Authorization: Bearer $TALKWISH_API_KEY"
Response
{
  "data": [
    {
      "id": "cm2p4r9uv0001lb05h6d3m8tj",
      "object": "team_member",
      "name": "Maya Chen",
      "email": "maya@example.com",
      "handle": "maya",
      "role": "owner",
      "joinedAt": "2026-10-30T19:40:02.000Z"
    },
    {
      "id": "cm2q7e2ka0004lb06p1v9s3xn",
      "object": "team_member",
      "name": "Jordan Lee",
      "email": "jordan@example.com",
      "handle": "jordanlee",
      "role": "member",
      "joinedAt": "2026-11-01T14:22:51.000Z"
    }
  ],
  "nextCursor": null
}

The team member object

Team member fields
Field Type Description
id, object string The member’s user id (the same id as user.id and userId elsewhere), and "team_member".
name, email string As in their Talkwish account.
handle string or null Their Talkwish username, without the @.
role string owner, admin or member.
joinedAt date-time When they joined the company.

Recording and voicemail audio

There are two ways to get the audio file:

  • audioUrl on a recording or voicemail is a signed link that works without a key for 10 minutes (until audioUrlExpiresAt). It plays in an audio player and downloads with a plain GET. Don’t store it: fetch the recording or voicemail again for a new one.
  • GET /recordings/{id}/audio and GET /voicemails/{id}/audio take your key and redirect to a fresh signed link. Use curl -L, or any HTTP client that follows redirects.

Recordings are MP3 (audio/mpeg) or WAV (audio/wav), as their contentType says. Voicemail is one of the two as well; the download’s Content-Type header tells you which. To keep a copy in your CRM, download the file and upload it there, rather than saving the link.

Webhooks

Webhooks send an HTTPS POST to your server when something happens, so you don’t have to poll. Talkwish looks for new events every 15 seconds, so a delivery usually arrives within half a minute.

Set one up

  1. On the Developer page, add a webhook: its URL, the events to send and an optional description. A company can have 5 webhooks.
  2. Copy the signing secret (whsec_...). It’s shown once. You can rotate it later; the old one stops working at once.
  3. Press Send test. Your URL gets a ping event, and the page shows what it answered. The page also lists each webhook’s last 50 deliveries.

The URL must:

  • start with https:// and use port 443 (the default),
  • use a host name, not an IP address, and resolve only to public internet addresses (no localhost, private networks or .local and .internal names),
  • not be on talkwish.com, and be at most 500 characters, with no user name or password in it.

Turning a webhook off and on again starts from that moment: events that happened while it was off aren’t sent.

Events

Webhook events
EventSent whendata
call.completed A call on a company number ended, answered or not. A call
recording.created A call recording is ready. A recording
voicemail.created Someone left a voicemail on a company number. A voicemail
message.received A text came in on a company number. A message
message.sent A team member sent a text from a company number. A message
website_chat.message A new visitor, agent or system message in a website chat. A chat message, with its chat
ping You pressed Send test on the Developer page. { "object": "ping" }
  • call.completed is sent for every call that ends, answered or missed. Check data.status.
  • recording.created usually arrives before the transcript is ready. Fetch the recording later for its text (see Connect your CRM).
  • message.sent carries the text’s status at that moment, often sending or sent. Fetch it later for the delivery status.
  • website_chat.message carries the chat message with its chat in data.chat.
  • Each event is sent once per webhook. If the record is hidden or deleted before it’s sent, it isn’t sent.

Payload and headers

The body is JSON: an envelope with the event in type and the record in data, in exactly the shape the API returns. The record is read when the delivery is sent, so a retry carries its current state.

call.completed body
{
  "id": "cm3vq9a0b0044lb07n6w3c2te",
  "type": "call.completed",
  "createdAt": "2026-11-12T15:31:14.000Z",
  "company": {
    "id": "cm2p4r7tq0000lb05c8n1k3ve"
  },
  "data": {
    "id": "cm3vq8z4k0042lb07x9d2h6ra",
    "object": "call",
    "direction": "inbound",
    "status": "completed",
    "from": "+16045550147",
    "to": "+14155550123",
    "number": {
      "id": "cm2p5b1xn0007lb05r4k8w2qd",
      "e164": "+14155550123"
    },
    "user": {
      "id": "cm2p4r9uv0001lb05h6d3m8tj",
      "name": "Maya Chen"
    },
    "onNet": false,
    "emergency": false,
    "forwarded": false,
    "startedAt": "2026-11-12T15:24:41.000Z",
    "answeredAt": "2026-11-12T15:24:49.000Z",
    "endedAt": "2026-11-12T15:31:07.000Z",
    "durationSec": 386,
    "billSec": 378,
    "recordingIds": [
      "cm3vq9c1e0045lb07k3t8w1mz"
    ],
    "voicemailIds": []
  }
}
Request headers
POST /talkwish/webhooks HTTP/1.1
Host: crm-sync.example.com
Content-Type: application/json
User-Agent: Talkwish-Webhooks/1.0 (+https://talkwish.com/developers/)
Talkwish-Event: call.completed
Talkwish-Delivery: cm3vq9a0b0044lb07n6w3c2te
Talkwish-Signature: t=1794497474,v1=5d1c0e3b9f7a42c8e6b1d0f39a2c7e4b8d6f1a0c3e5b7d9f2a4c6e8b0d1f3a5c
Webhook envelope and headers
Field or headerMeaning
id, Talkwish-DeliveryThe delivery’s id. It stays the same on every retry, so use it to ignore a delivery you already handled.
type, Talkwish-EventThe event, like call.completed.
createdAtWhen the event was queued.
company.idYour company’s id, as in GET /me.
dataThe call, recording, voicemail, message or chat message.
Talkwish-Signaturet= the time of this attempt in Unix seconds, and v1= the signature.

Events can arrive out of order and, rarely, more than once. Each webhook has its own deliveries, so if two webhooks get the same event, dedupe across them on type and data.id.

Verify signatures

Check every delivery before you trust it. v1 is the hex HMAC-SHA256 of the timestamp, a period and the raw body, keyed with the whole signing secret (including whsec_):

Signed content
v1 = hex(HMAC_SHA256(key = signing secret, message = "<t>.<raw body>"))
  1. Read the raw request body before any JSON parsing. A re-serialized body won’t match.
  2. Split the header on commas into t and v1.
  3. Refuse the delivery if t is more than 5 minutes from your clock.
  4. Compute the HMAC and compare it to v1 with a constant-time comparison.
Node.js
import crypto from 'node:crypto';
import express from 'express';

const SECRET = process.env.TALKWISH_WEBHOOK_SECRET; // the whole whsec_... string
const TOLERANCE_SEC = 5 * 60;

/** True when the Talkwish-Signature header matches the raw body. */
function verifyTalkwish(rawBody, header) {
  if (!header) return false;
  const parts = Object.fromEntries(header.split(',').map((part) => part.trim().split('=')));
  const t = Number(parts.t);
  if (!Number.isInteger(t) || !/^[0-9a-f]{64}$/.test(parts.v1 ?? '')) return false;
  // Refuse old or far-future timestamps, so a captured request can't be replayed later.
  if (Math.abs(Date.now() / 1000 - t) > TOLERANCE_SEC) return false;
  const expected = crypto.createHmac('sha256', SECRET).update(`${t}.`).update(rawBody).digest();
  const given = Buffer.from(parts.v1, 'hex');
  return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}

const app = express();

// express.raw keeps the exact bytes Talkwish signed. Parse the JSON only after checking.
app.post('/talkwish/webhooks', express.raw({ type: 'application/json' }), (req, res) => {
  if (!verifyTalkwish(req.body, req.get('Talkwish-Signature'))) return res.sendStatus(400);
  const event = JSON.parse(req.body.toString('utf8'));
  res.sendStatus(204); // answer within 10 seconds, then do the work
  queue.add(event); // your job queue: dedupe on event.id
});
Python
import hashlib
import hmac
import os
import time

from flask import Flask, abort, request

SECRET = os.environ["TALKWISH_WEBHOOK_SECRET"].encode()  # the whole whsec_... string
TOLERANCE_SEC = 5 * 60

app = Flask(__name__)


def verify_talkwish(raw_body: bytes, header: str | None) -> bool:
    """True when the Talkwish-Signature header matches the raw body."""
    if not header:
        return False
    parts = dict(part.strip().split("=", 1) for part in header.split(",") if "=" in part)
    try:
        t = int(parts["t"])
    except (KeyError, ValueError):
        return False
    # Refuse old or far-future timestamps, so a captured request can't be replayed later.
    if abs(time.time() - t) > TOLERANCE_SEC:
        return False
    expected = hmac.new(SECRET, f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))


@app.post("/talkwish/webhooks")
def talkwish_webhook():
    raw = request.get_data()  # the exact bytes Talkwish signed
    if not verify_talkwish(raw, request.headers.get("Talkwish-Signature")):
        abort(400)
    event = request.get_json()
    enqueue(event)  # your job queue: dedupe on event["id"]
    return "", 204  # answer within 10 seconds

Responses and retries

Answer with any 2xx status within 10 seconds. Do the slow work, such as calling your CRM, after you answer. The response body is ignored, and redirects aren’t followed.

A delivery fails when your server answers anything else, takes longer, or can’t be reached. It’s then tried again after:

  1. 1 minute
  2. 5 minutes
  3. 30 minutes
  4. 2 hours
  5. 6 hours
  6. 12 hours
  7. 24 hours

That’s 8 attempts over about two days. After the last one the delivery is marked failed. After 25 failed attempts in a row, with no success in between, the webhook is turned off and you can turn it back on from the Developer page. If the company’s API access or Pro plan ends, nothing is sent until both are back, and events from that time aren’t sent later.

Connect your CRM

These patterns connect Talkwish to any CRM or automation tool that has its own API or can receive webhooks.

Log every finished call

  1. Add a webhook for call.completed.
  2. Find the contact by the other side’s number: data.from for an incoming call, data.to for an outgoing one. Create the contact if it’s new.
  3. Log a call activity with the direction, status, durationSec, startedAt and user.name. Store data.id as its external id, so a repeat delivery updates the same activity.
  4. For a missed call (no-answer, busy or canceled), also create a follow-up task for the team member.

Attach recordings and transcripts

  1. Add a webhook for recording.created. data.callId links it to the call you logged.
  2. Download data.audioUrl within 10 minutes, or later with GET /recordings/{id}/audio, and upload the file to the activity.
  3. The transcript is usually not ready when the event arrives. A little later, fetch GET /recordings/{id} again until transcript.status is done, failed or disabled, then add transcript.text as a note.

Voicemail works the same way with voicemail.created: a task with the transcript and the audio is a good fit.

Sync text messages

  1. Add a webhook for message.received and message.sent.
  2. Match the contact by the other side’s number, and group texts by conversationId into one thread.
  3. Download pictures from mediaUrls right away; the links expire.
  4. To load past texts, page through GET /messages with since.

Contacts, chats and your team

  • Pull GET /contacts?updatedSince=... once a day to fill in names for numbers your CRM doesn’t know. Contacts only flow from Talkwish to your CRM; the API can’t change them.
  • Turn website chats into leads with website_chat.message: the chat’s visitor has the name, email and phone they gave.
  • Map GET /team to your CRM’s users by email, so activities land with the right owner.

Many automation tools can receive a webhook but can’t check its signature. If yours can’t, keep the URL secret, and use the delivery only as a signal: read the record again from the API with your key before you act on it.

Security

  • Keep keys on your server. Never put a key in website, browser extension or mobile app code, or in a public code repository. There’s no CORS, so a browser can’t use it anyway.
  • Give each app its own key, named after the app, with only the scopes it needs. A key that only logs calls needs only calls:read.
  • Set an expiry where you can, and rotate keys: make a new key, deploy it, then revoke the old one on the Developer page.
  • Revoke a key right away if it may have leaked. It stops working on the next request. The Developer page shows when each key was last used.
  • Verify every webhook signature and refuse old timestamps. Rotate the signing secret if it may have leaked.
  • Treat the data with care. Calls, texts and recordings are your customers’ personal information. Keep them only as long as you need them in other systems, and limit who can see them there.

Each request is logged with its route, status, IP address and time; query strings and bodies aren’t. Found a security problem in the API? Tell us through our security page. Questions about an integration: email support@talkwish.com.