Skip to content

Docs / API reference

RepLine API

Send texts, place calls and read your conversations and contacts from your own software, and get a signed webhook the moment a customer replies or a booking is made.

Overview

The API is JSON over HTTPS. Every request goes to one base URL, authenticates with a bearer API key, and works only on the workspace the key belongs to.

Base URL
https://repline.net/api/v1

Requests with a body must send Content-Type: application/json. Timestamps are ISO 8601 in UTC. Phone numbers are always E.164 (a +, then 8 to 15 digits).

Authentication

Create an API key in the dashboard, then send it with every request.

  1. Sign in to RepLine as the workspace owner and open Settings, then Connections (the API section at /admin/integrations).
  2. Under "API keys", type a name in "New key name", tick the scopes the integration needs, and choose when the key should stop working under "Expires" (Never expires, 30 days, 90 days, 1 year, or a date you pick), and press Create. Leave "Custom rate limit" empty unless you need a different request budget.
  3. Copy the key straight away. RepLine shows the full key once and stores only a hash, so it cannot be shown again. Lose it and you create a new one.
  4. Send it on every request as a bearer token: Authorization: Bearer repline_live_…
Example
curl https://repline.net/api/v1/agents \
  -H "Authorization: Bearer repline_live_…"
  • Only a workspace owner can create or revoke keys. Managers and above can see the list (name, scopes, last used) but never a key itself.
  • A key belongs to one workspace and can only ever read or write that workspace. There is no way to pass a different workspace in a request.
  • Keys start with repline_live_. Keep them on a server. Never put one in a mobile app, a browser page or a public repository.
  • A key works until you revoke it or, if you gave it an expiry when you created it, until that moment. "Never expires" is the default, so a key you did not give an expiry keeps working until revoked. A key past its expiry is rejected with 401, and the message says the day it expired. An owner can revoke a key at any time from the same page, and a revoked key is rejected with 401 straight away.

Keys are managed at /admin/integrations inside the app.

Scopes

Each key carries scopes, chosen when the key is created, and each endpoint needs one. A key without the scope gets a 403 that names it. Give a key only what its integration uses.

API key scopes
ScopeAllowsNotes
messages:sendSend messagesPOST /messages
conversations:readRead conversationsGET /conversations
contacts:readRead contactsGET /contacts
contacts:writeCreate/update contactsPOST /contacts
agents:readRead agentsGET /agents
calls:originateOriginate callsPOST /callsAlso required to list calls (GET /calls), because that response includes summaries and transcripts.
*Everythingall endpointsSatisfies every capability check. Use only for a key you fully control.
rate_limit:NNNCustom rate limitall endpointsRequests per minute for this key, 1 to 100,000. Set with the "Custom rate limit" box when you create the key.

Rate limits

  • Each key may make 100 requests per minute unless it was created with a custom limit. The window slides: it counts the requests made in the last 60 seconds.
  • Every request counts, including ones that are rejected with 429. Keep hammering and the window stays full, so back off when you are told to.
  • A 429 response carries a Retry-After: 60 header and error.details.retryAfterSeconds: 60. Wait that long, then retry.
  • There are no X-RateLimit-* headers. Count your own requests if you need to stay under the limit.
  • Requests with a missing or invalid key are rejected before they are counted.
429 response
HTTP/1.1 429 Too Many Requests
Retry-After: 60

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded",
    "details": {
      "retryAfterSeconds": 60
    }
  }
}

Pagination

  • GET /conversations, GET /contacts and GET /agents use cursor pagination. Pass limit (1 to 100, default 50).
  • If there are more rows, the response includes nextCursor. Send it back as cursor to get the next page.
  • On the last page nextCursor is left out of the response entirely (it is not null). An invalid limit gives 422.
  • GET /calls is different: it takes only limit (default 50, up to 200) and returns the most recent calls with no cursor.
Fetching the next page
curl "https://repline.net/api/v1/contacts?limit=50&cursor=<nextCursor>" \
  -H "Authorization: Bearer $REPLINE_API_KEY"

Errors

  • Every error uses the same envelope: an error object with a stable code, a human-readable message and, for validation and rate-limit errors, details.
  • Switch on error.code and the HTTP status, not on message. Messages are for people and may be reworded.
  • For VALIDATION_ERROR on a body or query, details is { formErrors: string[], fieldErrors: { [field]: string[] } }.
Example: 422
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid body",
    "details": {
      "formErrors": [],
      "fieldErrors": {
        "contactPhone": [
          "Invalid"
        ]
      }
    }
  }
}
Errors
Statuserror.codeerror.messageWhen
401UNAUTHORIZEDMissing API keyNo Authorization: Bearer header, or it is not in that form.
401UNAUTHORIZEDInvalid API keyThe key does not exist or is not a RepLine key.
401UNAUTHORIZEDAPI key revokedThe key was revoked by an owner.
401UNAUTHORIZEDAPI key expired on <YYYY-MM-DD> (UTC). Ask a workspace owner to create a new key under Messages, API, and switch your integration to it.The key was created with an expiry and that moment has passed. Keys created without one never expire. The message names the day it expired (UTC).
403FORBIDDENAPI key needs scope "<scope>"The key is valid but lacks the scope the endpoint requires. The message names the scope.
403ADDON_REQUIREDThis needs the API add-on. An account owner can add it under Billing.The key is valid, but the workspace has not turned on the API add-on (or its billing needs attention). The response also carries addon: "api". Existing keys work again as soon as the add-on is on.
422VALIDATION_ERRORInvalid bodyThe body or query failed validation. Also "Invalid query" for GET endpoints and "Body must be JSON" for an unparseable body.
429RATE_LIMITEDRate limit exceededThe key went over its per-minute budget. See Rate limits.
500INTERNAL_ERRORInternal errorSomething failed on our side. Safe to retry after a short wait.

Each endpoint below lists the errors specific to it as well.

Endpoints

POST/api/v1/messages

Send a text message

Queues a text from an agent’s RepLine number to a contact and returns immediately. The message goes out a moment later. Delivery results arrive as message.sent and message.failed webhooks.

If the contact does not exist yet it is created, and the conversation between that agent’s number and the contact is found or created.

Scope: messages:send

Body (JSON)

POST /messages body
NameTypeRequiredDescription
agentIdstringYesThe agent whose RepLine number sends the message. Get IDs from GET /agents.
contactPhonestringYesRecipient. E.164: a + followed by 8 to 15 digits, such as +15555550100.
bodystringYesMessage text, 1 to 1,600 characters. Also the fallback text for a rich card.
mediaUrlsstring[]NoUp to 8 publicly reachable picture URLs. When present the message is sent as MMS. Keep them under 1 MB in total, because the carrier network refuses larger picture messages.
purpose"auth_code" | "emergency"NoMarks a text that must go out now. If the workspace delays outgoing texts during quiet hours, these are never held: a sign-in code would expire before morning. Leave it out for everything else.
richCardobjectNoA branded RCS card. See the table below.

richCard

richCard
NameTypeRequiredDescription
titlestringYes1 to 200 characters.
descriptionstringNoUp to 2,000 characters.
mediaUrlstringNoA URL for the card image.
suggestionsobject[]NoUp to 4 tappable buttons. Defaults to none. Shapes below.

richCard.suggestions[]

richCard.suggestions[]
NameTypeRequiredDescription
kind"reply" | "open_url" | "dial"YesSelects the shape of the button.
textstringYesButton label, 1 to 25 characters.
postbackDatastringNoSent back when tapped, up to 120 characters. Required (1 to 120) when kind is "reply".
urlstringNoRequired when kind is "open_url".
phoneE164stringNoRequired when kind is "dial". E.164: a + followed by 8 to 15 digits, such as +15555550100.

Request

curl -X POST https://repline.net/api/v1/messages \
  -H "Authorization: Bearer $REPLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agentId": "clx4agent0001abcd",
  "contactPhone": "+15555550100",
  "body": "Hi Dana, this is Sam from Summit Roofing. Your inspection is confirmed for tomorrow at 10am."
}'

Response: 202

{
  "conversationId": "clx7convo00001abcd",
  "queued": true,
  "quietHoursDelayed": false,
  "quietHoursDelayMinutes": 0,
  "scheduledFor": null
}
POST /messages response fields
FieldTypeDescription
conversationIdstringThe thread the message was added to.
queuedbooleanAlways true. 202 means accepted for sending, not delivered.
quietHoursDelayedbooleanTrue when the workspace holds texts during quiet hours and this one was held. It is still accepted (202) and will be sent.
quietHoursDelayMinutesnumberHow long it is held, in minutes. 0 when it was sent right away.
scheduledForstring | nullISO 8601 time the held text will be sent, when the quiet hours end. null when it was sent right away.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "messages:send"The key is valid but was not granted this scope.
404NOT_FOUNDagent not foundagentId does not exist in your workspace.
422VALIDATION_ERRORInvalid body, or the agent has no phone number, or the number is not in a state that can send (it must be assigned or provisioned).
412CONTACT_OPTED_OUTContact has opted out of SMS.The contact replied STOP. Nothing is sent. Do not retry.
503SIGNALWIRE_NOT_CONFIGUREDSignalWire is not configured on this RepLine deployment.Texting is not set up on the server. Checked before the scope.
500INTERNAL_ERRORFailed to enqueue messageThe message could not be queued. Safe to retry.
500INTERNAL_ERRORFailed to check quiet hoursRepLine could not read the workspace’s quiet-hours setting, so nothing was queued. Safe to retry.

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

  • Quiet hours apply here the same way they do when someone sends from the app. If your workspace turned on "delay outgoing during quiet hours" and it is inside that window where the recipient is (judged from their area code), the text is held until the window ends: you still get 202, with quietHoursDelayed true and the send time in scheduledFor. A reply to a text the contact sent in the last 15 minutes goes out right away.
  • A richCard is delivered as an RCS card only if the recipient’s phone supports RCS and the agent has a verified RCS brand. Otherwise RepLine sends the text in body (with the card image as MMS if there is one), so you can always pass a card.
  • Contacts who texted STOP stay blocked until they text START. Respect the 412.

GET/api/v1/conversations

List conversations

Returns conversation threads in your workspace, most recently active first. Threads with no messages sort last.

Scope: conversations:read

Query parameters

GET /conversations query parameters
NameTypeRequiredDescription
contactPhonestringNoOnly threads with this contact. Exact match on the E.164 number.
agentIdstringNoOnly threads owned by this agent.
status"OPEN" | "ARCHIVED" | "SNOOZED"NoOnly threads in this status: OPEN, ARCHIVED or SNOOZED. Any other value is a 422.
limitintegerNo1 to 100. Default 50.
cursorstringNoThe nextCursor from the previous page.

Request

curl "https://repline.net/api/v1/conversations?contactPhone=%2B15555550100&status=OPEN&limit=20" \
  -H "Authorization: Bearer $REPLINE_API_KEY"

Response: 200

{
  "conversations": [
    {
      "id": "clx7convo00001abcd",
      "tenantId": "clx1tenant0001abcd",
      "contactId": "clx6contact001abcd",
      "agentId": "clx4agent0001abcd",
      "phoneNumberId": "clx5number0001abcd",
      "contextTag": null,
      "status": "OPEN",
      "lastMessageAt": "2026-10-30T16:09:42.017Z",
      "unreadCount": 1,
      "kind": "DIRECT",
      "createdAt": "2026-10-30T16:04:11.482Z",
      "updatedAt": "2026-10-30T16:09:42.017Z",
      "contact": {
        "id": "clx6contact001abcd",
        "phoneE164": "+15555550100",
        "name": "Dana Whitfield",
        "email": "[email protected]",
        "partnerPortalContactId": null
      },
      "phoneNumber": {
        "e164": "+15555550123"
      }
    }
  ],
  "nextCursor": "clx7convo00002abcd"
}
GET /conversations response fields
FieldTypeDescription
idstringConversation ID.
tenantIdstringYour workspace ID.
contactIdstringThe contact this thread is with.
agentIdstring | nullThe agent (rep) who owns the thread, if any.
phoneNumberIdstringThe RepLine number the thread runs on.
contextTagstring | nullFree-form tag set by a rep or an integration.
status"OPEN" | "ARCHIVED" | "SNOOZED"Thread status.
lastMessageAtstring | nullISO 8601 time of the latest message. Null if nothing was ever sent or received.
unreadCountintegerInbound messages not yet read in the app.
kindstringChannel kind. "DIRECT" for a normal one-to-one thread.
createdAtstringISO 8601.
updatedAtstringISO 8601.
contactobject{ id, phoneE164, name, email, partnerPortalContactId }. name, email and partnerPortalContactId can be null.
phoneNumberobject{ e164 }: the RepLine number the thread runs on.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "conversations:read"The key is valid but was not granted this scope.
422VALIDATION_ERRORA parameter is missing, the wrong type or out of range. `error.details` lists each field (see Errors above).

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

  • This lists threads, not the messages inside them. To react to new messages as they arrive, subscribe to the message.received webhook.
  • In a URL query string a + means a space, so write the plus sign of a phone number as %2B, as the example does.

GET/api/v1/contacts

List contacts

Returns contacts in your workspace, newest first.

Scope: contacts:read

Query parameters

GET /contacts query parameters
NameTypeRequiredDescription
searchstringNoCase-insensitive match on name or email, or a substring of the phone number.
limitintegerNo1 to 100. Default 50.
cursorstringNoThe nextCursor from the previous page.

Request

curl "https://repline.net/api/v1/contacts?search=whitfield&limit=20" \
  -H "Authorization: Bearer $REPLINE_API_KEY"

Response: 200

{
  "contacts": [
    {
      "id": "clx6contact001abcd",
      "tenantId": "clx1tenant0001abcd",
      "phoneE164": "+15555550100",
      "name": "Dana Whitfield",
      "email": "[email protected]",
      "metadata": {
        "source": "website form"
      },
      "rcsCapable": false,
      "rcsCapableCheckedAt": null,
      "partnerPortalContactId": null,
      "createdAt": "2026-10-30T16:04:11.482Z",
      "updatedAt": "2026-10-30T16:09:42.017Z"
    }
  ],
  "nextCursor": "clx6contact002abcd"
}
GET /contacts response fields
FieldTypeDescription
idstringContact ID.
tenantIdstringYour workspace ID.
phoneE164stringThe contact’s number in E.164 form. Unique within a workspace.
namestring | nullDisplay name.
emailstring | nullEmail address.
metadataobjectFree-form JSON you attach. Empty object when none.
rcsCapablebooleanLast known RCS reachability for this number.
rcsCapableCheckedAtstring | nullISO 8601 time of the last RCS check, if one has run.
partnerPortalContactIdstring | nullYour own ID for this person, if you set one.
createdAtstringISO 8601.
updatedAtstringISO 8601.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "contacts:read"The key is valid but was not granted this scope.
422VALIDATION_ERRORA parameter is missing, the wrong type or out of range. `error.details` lists each field (see Errors above).

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

POST/api/v1/contacts

Create or update a contact

Creates the contact, or updates it if a contact with that phone number already exists in your workspace. The phone number is the unique key.

Scope: contacts:write

Body (JSON)

POST /contacts body
NameTypeRequiredDescription
phoneE164stringYesThe contact’s number. E.164: a + followed by 8 to 15 digits, such as +15555550100.
namestringNoUp to 160 characters.
emailstringNoA valid email address.
metadataobjectNoFree-form JSON object to store with the contact. Leave it out to keep what is stored; send it to replace the stored object.
partnerPortalContactIdstringNoYour own ID for this person. Stored so you can match records later.

Request

curl -X POST https://repline.net/api/v1/contacts \
  -H "Authorization: Bearer $REPLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "phoneE164": "+15555550100",
  "name": "Dana Whitfield",
  "email": "[email protected]",
  "metadata": {
    "source": "website form"
  }
}'

Response: 201

{
  "contact": {
    "id": "clx6contact001abcd",
    "tenantId": "clx1tenant0001abcd",
    "phoneE164": "+15555550100",
    "name": "Dana Whitfield",
    "email": "[email protected]",
    "metadata": {
      "source": "website form"
    },
    "rcsCapable": false,
    "rcsCapableCheckedAt": null,
    "partnerPortalContactId": null,
    "createdAt": "2026-10-30T16:04:11.482Z",
    "updatedAt": "2026-10-30T16:09:42.017Z"
  }
}
POST /contacts response fields
FieldTypeDescription
contactobjectThe saved contact. Same fields as GET /contacts.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "contacts:write"The key is valid but was not granted this scope.
422VALIDATION_ERRORA parameter is missing, the wrong type or out of range. `error.details` lists each field (see Errors above).

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

  • The status is 201 whether the contact was created or updated.
  • On update, any field you leave out is left as it was, metadata included. When you do send metadata it replaces the stored object as a whole, not field by field, so send the complete object. Send an empty object ({}) to clear it.

GET/api/v1/opt-outs

List opted-out numbers

Returns every number in your workspace that texted a stop keyword and has not texted START since. RepLine will not text these numbers; a send to one returns 412.

This is the current list. A number that texts START drops off it, so syncing the whole list also picks up opt-ins, which have no webhook.

Scope: messages:send

Query parameters

GET /opt-outs query parameters
NameTypeRequiredDescription
limitintegerNo1 to 1000. Default 500.
cursorstringNoThe nextCursor from the previous page.

Request

curl "https://repline.net/api/v1/opt-outs?limit=500" \
  -H "Authorization: Bearer $REPLINE_API_KEY"

Response: 200

{
  "optOuts": [
    {
      "phoneE164": "+15555550100",
      "optedOutAt": "2026-10-30T16:04:11.482Z",
      "reason": "keyword"
    }
  ],
  "nextCursor": null
}
GET /opt-outs response fields
FieldTypeDescription
phoneE164stringThe opted-out number, E.164.
optedOutAtstringWhen they opted out (ISO 8601).
reasonstring | nullkeyword when they texted a stop word.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "messages:send"The key is valid but was not granted this scope.
422VALIDATION_ERRORA parameter is missing, the wrong type or out of range. `error.details` lists each field (see Errors above).

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

  • Needs the same scope as sending, so any key that texts people can check who refused texts.

GET/api/v1/agents

List agents

Returns the active agents (reps) in your workspace, newest first. You need an agent ID to send a message or place a call. Agents whose user account is deactivated are left out.

Scope: agents:read

Query parameters

GET /agents query parameters
NameTypeRequiredDescription
searchstringNoCase-insensitive match on the agent’s name or email.
limitintegerNo1 to 100. Default 50.
cursorstringNoThe nextCursor from the previous page.

Request

curl "https://repline.net/api/v1/agents?search=sam&limit=20" \
  -H "Authorization: Bearer $REPLINE_API_KEY"

Response: 200

{
  "agents": [
    {
      "id": "clx4agent0001abcd",
      "tenantId": "clx1tenant0001abcd",
      "userId": "clx4user00001abcd",
      "slug": "sam-rivera",
      "title": "Project Consultant",
      "bio": null,
      "photoUrl": null,
      "photoThumbUrl": null,
      "extension": "204",
      "phoneNumberId": "clx5number0001abcd",
      "createdAt": "2026-10-30T16:04:11.482Z",
      "updatedAt": "2026-10-30T16:09:42.017Z",
      "user": {
        "id": "clx4user00001abcd",
        "name": "Sam Rivera",
        "email": "[email protected]",
        "role": "REP"
      },
      "phoneNumber": {
        "e164": "+15555550123"
      }
    }
  ]
}
GET /agents response fields
FieldTypeDescription
idstringAgent ID. Pass it as agentId when you send a message or place a call.
tenantIdstringYour workspace ID.
userIdstringThe user account behind the agent.
slugstringURL slug of the agent’s public profile.
titlestring | nullJob title.
biostring | nullShort biography.
photoUrlstring | nullProfile photo.
photoThumbUrlstring | nullThumbnail of the profile photo.
extensionstring | nullPhone extension, if assigned.
phoneNumberIdstring | nullThe RepLine number assigned to the agent. An agent with none cannot send or call.
createdAtstringISO 8601.
updatedAtstringISO 8601.
userobject{ id, name, email, role }.
phoneNumberobject | null{ e164 }, or null when no number is assigned.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "agents:read"The key is valid but was not granted this scope.
422VALIDATION_ERRORA parameter is missing, the wrong type or out of range. `error.details` lists each field (see Errors above).

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

  • Each agent object also carries further profile and call-routing settings that are not listed here. Do not depend on a field that is not in this table.

POST/api/v1/calls

Place an outbound call

Dials a contact from an agent’s RepLine number. There are two modes. Without prompt, the call is answered and message is read aloud (text to speech). With prompt, the call is a two-way conversation run by the AI voice agent, following your instructions.

The call is created and dialed immediately. Results (status, summary, transcript, disposition) show up in GET /calls once the call ends.

Scope: calls:originate

Body (JSON)

POST /calls body
NameTypeRequiredDescription
agentIdstringYesThe agent whose RepLine number places the call.
toPhonestringYesWho to call. E.164: a + followed by 8 to 15 digits, such as +15555550100.
messagestringYes1 to 2,000 characters. Read aloud on answer when no prompt is given.
promptstringNoUp to 6,000 characters. Instructions for the AI voice agent. Makes the call a two-way AI conversation.
purposestringNoUp to 120 characters. A label stored on the call and returned by GET /calls.
voicestringNoUp to 40 characters. English voice for AI calls, in engine.voice form, such as gcloud.en-US-Neural2-F.
voiceEsstringNoUp to 40 characters. Spanish voice for AI calls. Defaults to voice.
timezonestringNoUp to 64 characters. The callee’s IANA time zone, such as America/Chicago, so the AI knows what time it is for them. Worked out from the area code if you leave it out.

Request

curl -X POST https://repline.net/api/v1/calls \
  -H "Authorization: Bearer $REPLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agentId": "clx4agent0001abcd",
  "toPhone": "+15555550100",
  "message": "Hi, this is Summit Roofing calling to confirm your inspection tomorrow at 10am.",
  "purpose": "appointment confirmation"
}'

Response: 202

{
  "callId": "clx8call000001abcd",
  "signalwireCallSid": "5d1e0c2a-6f43-4b7e-9a4d-0c8f2b7e1a90",
  "mode": "tts",
  "queued": true
}
POST /calls response fields
FieldTypeDescription
callIdstringRepLine’s ID for the call. Find it later in GET /calls.
signalwireCallSidstring | nullThe carrier-side call ID. Can be null for AI calls.
mode"tts" | "ai""tts" reads message aloud. "ai" runs a two-way conversation from prompt.
queuedbooleanAlways true.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "calls:originate"The key is valid but was not granted this scope.
404NOT_FOUNDagent not foundagentId does not exist in your workspace.
422VALIDATION_ERRORInvalid body, or the agent has no phone number, or the number is not in a state that can call.
412CONTACT_OPTED_OUTContact has opted out.The contact is on your opt-out list. No call is placed.
502AI_ORIGINATE_FAILEDprompt was given and the voice provider rejected the call. message holds the provider’s reply. The call is marked FAILED.
503SIGNALWIRE_NOT_CONFIGUREDSignalWire is not configured on this RepLine deployment.Calling is not set up on the server. Checked before the scope.
500INTERNAL_ERRORFailed to originate callA text-to-speech call could not be started. The call is marked FAILED.

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

  • This places a real phone call to a real person. Test against a number you own.

GET/api/v1/calls

List recent calls

Returns the most recent calls in your workspace, newest first, with the AI summary, disposition and transcript when they have been captured.

This uses the same calls:originate scope as placing a call, because the response contains call summaries and transcripts. Grant it only to integrations that should see them.

Scope: calls:originate

Query parameters

GET /calls query parameters
NameTypeRequiredDescription
ai"1"NoPass 1 to return only calls handled by the AI. The filter is applied before limit, so you get the newest limit AI calls, however many other calls came in between.
limitintegerNoDefault 50. Values above 200 are capped at 200 and values below 1 are raised to 1. Never rejected.

Request

curl "https://repline.net/api/v1/calls?ai=1&limit=25" \
  -H "Authorization: Bearer $REPLINE_API_KEY"

Response: 200

{
  "calls": [
    {
      "id": "clx8call000001abcd",
      "direction": "OUTBOUND",
      "from": "+15555550123",
      "to": "+15555550100",
      "status": "COMPLETED",
      "startedAt": "2026-10-30T16:04:11.482Z",
      "endedAt": "2026-10-30T16:06:02.000Z",
      "durationSeconds": 111,
      "agentId": "clx4agent0001abcd",
      "contactId": "clx6contact001abcd",
      "purpose": "appointment confirmation",
      "disposition": null,
      "summary": null,
      "transcript": null,
      "isAi": false
    }
  ]
}
GET /calls response fields
FieldTypeDescription
idstringCall ID. Matches the callId returned by POST /calls.
direction"INBOUND" | "OUTBOUND"Which way the call went.
fromstringCalling number, E.164.
tostringCalled number, E.164.
statusstringOne of INITIATED, RINGING, ANSWERED, COMPLETED, FAILED, NO_ANSWER, BUSY, VOICEMAIL_DROPPED, AI_HANDLING.
startedAtstringISO 8601.
endedAtstring | nullISO 8601, or null while the call is live.
durationSecondsinteger | nullLength of the call once it has ended.
agentIdstring | nullThe agent the call belongs to.
contactIdstring | nullThe contact on the other end.
purposestring | nullThe purpose you passed to POST /calls, if any.
dispositionstring | nullOutcome recorded after an AI call. Null until recorded.
summaryJSON | nullThe AI’s post-call summary. Null until it has been captured.
transcriptJSON | nullThe call transcript. Null until it has been captured.
isAibooleanTrue for calls handled by the conversational AI.

Errors

Errors
Statuserror.codeerror.messageWhen
403FORBIDDENAPI key needs scope "calls:originate"The key is valid but was not granted this scope.

Plus the errors that apply to every endpoint: 401, 422 on bad input, 429 and 500.

  • There is no cursor. To see older calls than the latest 200, record call IDs as you place calls.

Webhooks

Instead of polling, give RepLine a URL and it sends you an HTTPS POST each time something you subscribed to happens. Every request is signed so you can prove it came from RepLine.

  1. Sign in as the workspace owner and open Settings, then Connections (/admin/integrations).
  2. Under "Webhooks", add your endpoint URL and choose the events you want. The URL must be a public https address. Internal and private addresses are refused.
  3. RepLine shows a signing secret that starts with whsec_. Store it on your server. The owner can copy it again from the same page.
  4. Return any 2xx status from your endpoint to acknowledge a delivery.

Request format

The body is JSON with the same envelope for every event.

Webhook envelope
FieldTypeDescription
idstringDelivery ID. The same value on every retry and every manual replay, so use it to de-duplicate.
typestringThe event name, such as message.received. Also sent in the X-RepLine-Event header.
tenantIdstringYour workspace ID.
createdAtstringISO 8601 time the event was created.
dataobjectThe event payload. Its shape depends on type, see below.

Headers

Webhook headers
X-RepLine-SignatureHex HMAC-SHA256 of `${timestamp}.${rawBody}`, keyed with your whole whsec_… secret.
X-RepLine-TimestampUnix time in seconds when this attempt was signed. It is regenerated on every retry.
X-RepLine-EventThe event name. Same as type in the body.
Content-Typeapplication/json
User-AgentRepLine-Webhooks/1.0

Delivery and retries

  • Your endpoint has 15 seconds to answer. Any 2xx status counts as delivered. Any other status, a timeout or a connection error counts as a failure and is retried.
  • RepLine tries up to 8 times. After a failed attempt it waits 30 seconds, 2 minutes, 5 minutes, 15 minutes, 1 hour, 4 hours, 12 hours, in that order, and after the eighth failure it stops.
  • An address that RepLine refuses to call (a private or internal address) fails at once and is not retried.
  • Retries and replays reuse the same delivery id and body, but get a fresh X-RepLine-Timestamp and signature. Make your handler idempotent: process each id once.
  • Managers can see every delivery, with your endpoint’s response, and replay a failed one from Admin, Integrations, Partner portal (/admin/integrations/partner-portal).
  • Deliveries are not guaranteed to arrive in order. Use occurredAt (or createdAt) to order events, not arrival time.
  • Respond quickly and do the real work afterwards. Acknowledge with a 2xx first, then process.

Events

These events are sent today. Each section shows the data object inside the envelope.

message.received

A contact texted one of your numbers.

message.received data
FieldTypeDescription
messageIdstringMessage ID.
conversationIdstringThe thread it belongs to.
direction"INBOUND" | "OUTBOUND"INBOUND is a text from the contact.
fromstringSender, E.164. The contact on inbound, your RepLine number on outbound.
tostringRecipient, E.164. Your RepLine number on inbound, the contact on outbound.
contactNamestring | nullThe contact’s name if RepLine has one.
bodystringThe message text.
agentIdstring | nullThe agent that owns the thread, if any.
statusstringMessage status when the event fired: QUEUED, SENDING, SENT, DELIVERED, FAILED or UNDELIVERED.
occurredAtstringISO 8601 time the thing happened.
receivedAtstringInbound only. The same value as occurredAt, kept for older integrations.
errorCodestringOnly present when the carrier reported a failure.
errorMessagestringOnly present when the carrier reported a failure.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "message.received",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "messageId": "clx9msg0000001abcd",
    "conversationId": "clx7convo00001abcd",
    "direction": "INBOUND",
    "from": "+15555550100",
    "to": "+15555550123",
    "contactName": "Dana Whitfield",
    "body": "Tomorrow at 10 works great, thanks!",
    "agentId": "clx4agent0001abcd",
    "status": "DELIVERED",
    "occurredAt": "2026-10-30T16:04:11.000Z",
    "receivedAt": "2026-10-30T16:04:11.000Z"
  }
}

message.sent

A text you sent was handed to the carrier, and again when the carrier confirmed delivery. Both events share the same messageId. Look at data.status: SENT, then DELIVERED.

message.sent data
FieldTypeDescription
messageIdstringMessage ID.
conversationIdstringThe thread it belongs to.
direction"INBOUND" | "OUTBOUND"INBOUND is a text from the contact.
fromstringSender, E.164. The contact on inbound, your RepLine number on outbound.
tostringRecipient, E.164. Your RepLine number on inbound, the contact on outbound.
contactNamestring | nullThe contact’s name if RepLine has one.
bodystringThe message text.
agentIdstring | nullThe agent that owns the thread, if any.
statusstringMessage status when the event fired: QUEUED, SENDING, SENT, DELIVERED, FAILED or UNDELIVERED.
occurredAtstringISO 8601 time the thing happened.
receivedAtstringInbound only. The same value as occurredAt, kept for older integrations.
errorCodestringOnly present when the carrier reported a failure.
errorMessagestringOnly present when the carrier reported a failure.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "message.sent",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "messageId": "clx9msg0000002abcd",
    "conversationId": "clx7convo00001abcd",
    "direction": "OUTBOUND",
    "from": "+15555550123",
    "to": "+15555550100",
    "contactName": "Dana Whitfield",
    "body": "Hi Dana, your inspection is confirmed for tomorrow at 10am.",
    "agentId": "clx4agent0001abcd",
    "status": "DELIVERED",
    "occurredAt": "2026-10-30T16:05:03.000Z"
  }
}

message.failed

A text you sent could not be delivered. errorCode and errorMessage say why when the carrier gave a reason.

message.failed data
FieldTypeDescription
messageIdstringMessage ID.
conversationIdstringThe thread it belongs to.
direction"INBOUND" | "OUTBOUND"INBOUND is a text from the contact.
fromstringSender, E.164. The contact on inbound, your RepLine number on outbound.
tostringRecipient, E.164. Your RepLine number on inbound, the contact on outbound.
contactNamestring | nullThe contact’s name if RepLine has one.
bodystringThe message text.
agentIdstring | nullThe agent that owns the thread, if any.
statusstringMessage status when the event fired: QUEUED, SENDING, SENT, DELIVERED, FAILED or UNDELIVERED.
occurredAtstringISO 8601 time the thing happened.
receivedAtstringInbound only. The same value as occurredAt, kept for older integrations.
errorCodestringOnly present when the carrier reported a failure.
errorMessagestringOnly present when the carrier reported a failure.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "message.failed",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "messageId": "clx9msg0000003abcd",
    "conversationId": "clx7convo00001abcd",
    "direction": "OUTBOUND",
    "from": "+15555550123",
    "to": "+15555550100",
    "contactName": "Dana Whitfield",
    "body": "Hi Dana, your inspection is confirmed for tomorrow at 10am.",
    "agentId": "clx4agent0001abcd",
    "status": "FAILED",
    "occurredAt": "2026-10-30T16:05:03.000Z",
    "errorCode": "30007",
    "errorMessage": "Message blocked as spam by the carrier"
  }
}

booking.created

A booking was made on one of your booking pages (including multi-host bookings). For a booking that needs payment up front, the event fires once the payment completes.

booking.created data
FieldTypeDescription
bookingIdstringBooking ID.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "booking.created",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "bookingId": "clxbbooking001abcd"
  }
}

booking.cancelled

A booking was cancelled, by staff or by the customer.

booking.cancelled data
FieldTypeDescription
bookingIdstringBooking ID.
reasonstring | nullThe reason given, or null.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "booking.cancelled",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "bookingId": "clxbbooking001abcd",
    "reason": "Customer rescheduled"
  }
}

booking.rescheduled

A booking was moved to a new time, by the customer from their manage link or by a rep. The booking keeps its ID. It is not cancelled and re-created, so you get this event and not booking.cancelled or booking.created.

booking.rescheduled data
FieldTypeDescription
bookingIdstringBooking ID.
startsAtstringNew start time, ISO 8601 (UTC).
endsAtstringNew end time, ISO 8601 (UTC).
previousStartsAtstringStart time before the move, ISO 8601 (UTC).
previousEndsAtstringEnd time before the move, ISO 8601 (UTC).
rescheduledBystring"attendee" when the customer moved it, "rep" when a team member did.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "booking.rescheduled",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "bookingId": "clxbbooking001abcd",
    "startsAt": "2026-11-03T16:00:00.000Z",
    "endsAt": "2026-11-03T16:30:00.000Z",
    "previousStartsAt": "2026-11-02T15:00:00.000Z",
    "previousEndsAt": "2026-11-02T15:30:00.000Z",
    "rescheduledBy": "attendee"
  }
}

booking.completed

Staff marked a booking as completed.

booking.completed data
FieldTypeDescription
bookingIdstringBooking ID.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "booking.completed",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "bookingId": "clxbbooking001abcd"
  }
}

booking.no_show

Staff marked a booking as a no-show.

booking.no_show data
FieldTypeDescription
bookingIdstringBooking ID.
Example body
{
  "id": "clxadelivery001abcd",
  "type": "booking.no_show",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "bookingId": "clxbbooking001abcd"
  }
}

conversation.created

A new conversation thread was started with a contact on one of your numbers: the contact texted in for the first time, you texted them first (from the app, the API, a card, a workflow, a reminder or a booking), or a rep opened a new thread from the app. It fires once per thread, not per message. It is not sent for verification-code threads, for the thread RepLine uses to forward texts to your Default number, or for simulated messages in the number-testing tool. Delivery is at least once: if two things start the same thread at the same instant you can get the event twice, so de-duplicate on conversationId.

conversation.created data
FieldTypeDescription
conversationIdstringConversation ID.
contactIdstringContact ID.
contactPhoneE164stringThe contact number, E.164.
contactNamestring | nullThe contact name, or null.
ourPhoneE164stringThe RepLine number the thread is on.
agentIdstring | nullThe rep who owns the thread, or null if nobody does yet.
startedBystringWhat started it: inbound_sms, inbound_rcs, api, compose, card_lead, send_card, workflow, reminder or booking.
occurredAtstringWhen the conversation was created, ISO 8601 (UTC).
Example body
{
  "id": "clxadelivery001abcd",
  "type": "conversation.created",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "conversationId": "clx7convo00001abcd",
    "contactId": "clx6contact001abcd",
    "contactPhoneE164": "+15555550100",
    "contactName": "Dana Whitfield",
    "ourPhoneE164": "+15555550123",
    "agentId": "clx4agent0001abcd",
    "startedBy": "inbound_sms",
    "occurredAt": "2026-10-30T16:04:11.000Z"
  }
}

conversation.tagged

A team member changed the context tag on a conversation. It also fires when the tag is cleared, with tag set to null. Saving the tag a conversation already has sends nothing.

conversation.tagged data
FieldTypeDescription
conversationIdstringConversation ID.
contactIdstringContact ID.
contactPhoneE164stringThe contact number, E.164.
tagstring | nullThe new tag, or null when the tag was cleared.
previousTagstring | nullThe tag before this change, or null if there was none.
agentIdstring | nullThe rep who owns the conversation, or null.
taggedByUserIdstringUser ID of the team member who made the change.
occurredAtstringWhen it changed, ISO 8601 (UTC).
Example body
{
  "id": "clxadelivery001abcd",
  "type": "conversation.tagged",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "conversationId": "clx7convo00001abcd",
    "contactId": "clx6contact001abcd",
    "contactPhoneE164": "+15555550100",
    "tag": "estimate-sent",
    "previousTag": "new-lead",
    "agentId": "clx4agent0001abcd",
    "taggedByUserId": "clx4user00001abcd",
    "occurredAt": "2026-10-30T16:12:40.000Z"
  }
}

profile.updated

A rep, or a manager on their behalf, saved changes to a rep profile: title, bio, social links, certifications or the photo. changedFields lists only what really changed, and a save that changes nothing sends nothing. Changing which card template a rep uses is not a profile edit and does not fire this event.

profile.updated data
FieldTypeDescription
agentIdstringAgent (rep) ID.
slugstringThe profile URL slug: /agents/{slug}.
changedFieldsstring[]What changed, never empty. Any of: title, bio, socialLinks, certifications, photo.
updatedBystring"self" when the rep saved their own profile, "manager" when someone else did.
updatedByUserIdstringUser ID of the person who saved.
occurredAtstringWhen it was saved, ISO 8601 (UTC).
Example body
{
  "id": "clxadelivery001abcd",
  "type": "profile.updated",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "agentId": "clx4agent0001abcd",
    "slug": "dana-whitfield",
    "changedFields": [
      "title",
      "bio"
    ],
    "updatedBy": "self",
    "updatedByUserId": "clx4user00001abcd",
    "occurredAt": "2026-10-30T16:20:05.000Z"
  }
}

profile.viewed

Someone opened a rep public profile page, or scanned the rep QR code that lands on it. This is a sampled signal, not a page-view counter: crawlers and link-preview bots are skipped, one visitor counts once per profile per 10 minutes, and each profile sends at most 60 of these an hour. Use the analytics dashboard for exact counts.

profile.viewed data
FieldTypeDescription
agentIdstringAgent (rep) ID.
slugstringThe profile URL slug: /agents/{slug}.
sourcestring"page" for a normal visit, "qr" when the visitor scanned the rep QR code.
occurredAtstringWhen it was viewed, ISO 8601 (UTC).
Example body
{
  "id": "clxadelivery001abcd",
  "type": "profile.viewed",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "agentId": "clx4agent0001abcd",
    "slug": "dana-whitfield",
    "source": "qr",
    "occurredAt": "2026-10-30T16:31:48.000Z"
  }
}

optout.created

A contact texted a stop keyword (STOP, STOPALL, UNSUBSCRIBE, CANCEL, END or QUIT) to one of your numbers and was added to your opt-out list. RepLine stops texting them from then on. It fires only for a new opt-out: a second STOP from a number that is already opted out sends nothing. If the contact later texts START, there is no event for that.

optout.created data
FieldTypeDescription
contactIdstringContact ID.
contactPhoneE164stringThe contact number, E.164.
ourPhoneE164stringThe RepLine number the contact texted STOP to.
conversationIdstringConversation ID.
agentIdstring | nullThe rep who owns the conversation, or null.
keywordstringThe keyword they sent, upper-case with spaces and punctuation removed.
occurredAtstringWhen it happened, ISO 8601 (UTC).
Example body
{
  "id": "clxadelivery001abcd",
  "type": "optout.created",
  "tenantId": "clx1tenant0001abcd",
  "createdAt": "2026-10-30T16:04:11.482Z",
  "data": {
    "contactId": "clx6contact001abcd",
    "contactPhoneE164": "+15555550100",
    "ourPhoneE164": "+15555550123",
    "conversationId": "clx7convo00001abcd",
    "agentId": "clx4agent0001abcd",
    "keyword": "STOP",
    "occurredAt": "2026-10-30T16:40:22.000Z"
  }
}

Reserved event names

You can already subscribe to these names, but RepLine does not send them yet: . A subscription to one of them simply receives nothing until it ships. Check this page for their payloads when they do.

Verifying signatures

Anyone who finds your endpoint URL can POST to it, so check the signature before you trust a request.

  1. Read the raw request body as a string, before any JSON parsing. Re-serialising parsed JSON changes the bytes and breaks the signature.
  2. Take the timestamp from X-RepLine-Timestamp. Reject the request if it is more than 5 minutes away from your clock.
  3. Compute HMAC-SHA256 over the string `${timestamp}.${rawBody}` (the timestamp, a dot, then the raw body), keyed with the entire signing secret including the whsec_ prefix. Hex-encode it.
  4. Compare it with X-RepLine-Signature using a constant-time comparison.
Node.js: verify
// verify-repline.js
const crypto = require("node:crypto");

const TOLERANCE_SECONDS = 300; // reject anything older than 5 minutes

// secret:    the whole whsec_... string from the API page
// rawBody:   the request body exactly as received, as a string
// signature: the X-RepLine-Signature header
// timestamp: the X-RepLine-Timestamp header
function verifyRepLineSignature({ secret, rawBody, signature, timestamp }) {
  const ts = Number.parseInt(timestamp, 10);
  if (!Number.isFinite(ts)) return false;
  if (Math.abs(Date.now() / 1000 - ts) > TOLERANCE_SECONDS) return false;

  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");

  const a = Buffer.from(expected, "hex");
  const b = Buffer.from(String(signature), "hex");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

module.exports = { verifyRepLineSignature };
Node.js: Express receiver
// server.js
const express = require("express");
const { verifyRepLineSignature } = require("./verify-repline");

const app = express();
const SECRET = process.env.REPLINE_WEBHOOK_SECRET; // the whsec_... string
const seen = new Set(); // use a database or Redis in production

// express.raw keeps the body as bytes, so the signature check sees exactly
// what RepLine signed. Do not use express.json() on this route.
app.post("/webhooks/repline", express.raw({ type: "application/json" }), (req, res) => {
  const rawBody = req.body.toString("utf8");

  const ok = verifyRepLineSignature({
    secret: SECRET,
    rawBody,
    signature: req.get("X-RepLine-Signature"),
    timestamp: req.get("X-RepLine-Timestamp"),
  });
  if (!ok) return res.status(400).send("bad signature");

  const event = JSON.parse(rawBody);

  // event.id is the same on every retry and replay: skip ones already handled.
  if (seen.has(event.id)) return res.sendStatus(200);

  switch (event.type) {
    case "message.received":
      console.log("Text from", event.data.from, ":", event.data.body);
      break;
    case "message.failed":
      console.log("Send failed:", event.data.errorCode, event.data.errorMessage);
      break;
    case "booking.created":
      console.log("New booking", event.data.bookingId);
      break;
    default:
      break; // events you did not plan for
  }

  seen.add(event.id); // only after it was handled, so a crash is retried
  res.sendStatus(200);
});

app.listen(3000);

Need a key or stuck on an integration?