Connect an AI agent (MCP)
Smarter Contact runs a remote MCP server. Any MCP client (Claude, ChatGPT, Grok, Cursor, Codex, Gemini CLI, VS Code, Devin, or your own agent) can connect to it. Step-by-step setup per client is on the MCP tab of the ConnectSI page.
Server URL: https://api.smartercontact.com/rest/mcp
Tools
| Tool | What it does | Scope | Inputs |
|---|---|---|---|
read_contact |
Read one contact: status (active, or deleted when it is in the Deleted folder), name, phone, email, opt-out state, standard fields (address, city, state, zip…) and label_ids, the ids of its labels. |
contacts:read |
contact_id |
list_contacts |
Find the contact with this exact phone in the connected account. Returns items, empty when no contact has that phone. A deleted contact is returned with status deleted. Sub-accounts are not searched. |
contacts:read |
phone (E.164 like +12025550123, or a US national number) |
list_conversations |
Your conversations, most recently active first, to triage the inbox and find contact ids: contact id, account id, name, email, phone. | conversations:read |
category (all by default, unread, missed_calls, unreplied, awaiting_reply, opted_out, deleted), limit (1 to 100, default 25), next_page_token from the previous page, mark_read (true marks every conversation on the returned page read, default false; a primary account's list has only its own conversations, so its sub-accounts' conversations are never marked here; the response then has marked_read, and when it is false a marked_read_reason: no_conversation when a contact has no conversation yet, not_marked when a conversation could not be marked) |
read_conversation |
Message history with one contact, newest first. Each item has direction (incoming or outgoing), status (sent, delivered, undelivered or failed for a message; see calls below), type (sms, mms, vmd for a voicemail drop, or call), source (campaign, workflow or direct, which covers one-to-one texts, API and MCP sends and AI draft replies), from_number and to_number (E.164 when known; outgoing: from_number is your number, incoming: to_number is your number), content with the typed text only (empty for an MMS with only files and for a vmd) and attachments, a list of index, content_type and url (empty when the message has none). Each url is a signed download link valid for one week from the call; read the conversation again for fresh links. Calls are items with type call, direction, status missed or completed, duration_seconds only when the call connected and, for outgoing dialer calls, dialer_campaign_name. An unanswered dialer call reads as missed. A 1:1 call still in progress reads as completed without duration_seconds. |
conversations:read |
contact_id, limit (1 to 100, default 50), next_page_token from the previous page, mark_read (true marks the conversation read, including a sub-account's conversation when you are its primary account, default false; the response then has marked_read, and when it is false a marked_read_reason: no_conversation when the contact has no conversation yet, not_marked when the conversation could not be marked) |
generate_draft |
Write a reply draft for a conversation with SI. Nothing is sent: pass the text to send_reply. See SI drafts. |
drafts:write |
conversation_id, user_draft, prior_drafts, mode |
send_reply |
Reply to a contact who wrote first. | messages:write |
contact_id, content |
set_conversations_read |
Mark the named conversations read or unread, as Messenger does. Nothing is sent. See Marking conversations read. | conversations:write |
contact_ids (1 to 100), read (true or false) |
list_labels |
The account's labels, in the order Label management shows them: id, name and types (messaging, calling or both). Use the ids with set_contact_labels. A primary account lists only its own labels. |
contacts:read |
type (messaging or calling, both when absent), limit (1 to 100, default 50), next_page_token from the previous page |
list_workflows |
The account's contact workflows, in the order the Contact workflows page shows them: id, name, created_at and messages in sending order. Each message has body (the text sent, with its {placeholders}), delay_days (whole days to wait after the previous message, or after enrollment for the first one), delivery_window (days, 1 Monday to 7 Sunday, and from and to as HH:mm, in the contact's timezone) and reply_action (null when the message has none, otherwise when, one of reply, sms_reply, call_reply or no_reply, and group_id and label_id, the group and label the contact is then moved to, null when not set; list_labels gives label names). Billed as one API call per page. |
workflows:read |
limit (1 to 100, default 50), next_page_token from the previous page |
list_contact_enrollments |
What one contact is enrolled in: items, each with resource, resource_id and resource_name. Only workflows for now, so resource is workflows and there is at most one item. An empty items means the contact is not enrolled in any workflow. Billed as one API call, also when empty. See Reading a contact's workflow. |
workflows:read |
contact_id |
enroll_contact_in_workflow |
Enroll one contact in a contact workflow, from the contact's current outgoing number. Refused when the contact is already in another workflow, naming it. Billed as one API call plus the workflow's messages. See Enrolling a contact in a workflow. | workflows:write |
workflow_id (from list_workflows), contact_id |
remove_contact_from_workflow |
Remove a contact from a workflow. Its messages not sent yet are unscheduled and refunded; sent messages stay. Nothing is sent. See Removing a contact from a workflow. | workflows:write |
workflow_id (from list_workflows), contact_id |
set_contact_labels |
Replace the labels of one contact with exactly label_ids. Nothing is sent. See Setting contact labels. |
metadata:write |
contact_id, label_ids (an empty array removes every label) |
read_contact_fields |
Read every standard field of one contact, as the Info tab shows them: id, name and value, an empty value when it is not set. Use the ids with set_contact_fields. See Setting contact fields. |
contacts:read |
contact_id |
set_contact_fields |
Set, change or clear standard fields of one contact by id, as saving the Info tab does. Nothing is sent. See Setting contact fields. | metadata:write |
contact_id, fields (an object mapping each field id to its new value; an empty string clears it) |
create_contact |
Create a contact in the connected account. Nothing is sent. See Creating a contact. | contacts:write |
phone (E.164 like +12025550123, or a US national number), first_name, last_name, email (all optional, may be empty) |
list_webhooks |
Your webhook endpoints: name, active or inactive, subscribed events, shortened URL. Read-only. | webhooks:read |
none |
get_si_settings |
Read the account's SI Agent settings that shape every SI draft: playbook, writing_style and tone. See SI settings. |
drafts:write |
none |
update_si_settings |
Change the account's SI Agent playbook, tone or both, as on the SI Agent settings page. See SI settings. |
drafts:write |
playbook, tone (at least one) |
The tools return the same data as the API reference. tools/list only shows the tools your sign-in granted a scope for.
The server speaks Streamable HTTP over POST only, one JSON-RPC message per request (no batches). It keeps no session between requests.
Sign-in
There is no API key. When you add the server, your client opens a Smarter Contact sign-in and a consent screen that lists what the client is asking for (Read a contact, List and read conversations, Mark conversations as read or unread, Send a reply, Generate an SI draft, Set labels and properties on a contact, Create a contact, List workflows, Add and remove contacts in workflows, Read webhooks list). You approve it once. Clients discover everything they need from https://api.smartercontact.com/.well-known/oauth-protected-resource/rest/mcp.
The account owner accepts the Smarter Contact Terms of Service (sign in to the app to accept them) first. Until then every request to the server, initialize included, is refused with HTTP 403 terms_not_accepted.
Auto-reply
Your AI client cannot listen for new messages and Smarter Contact cannot wake it. Real-time auto-reply needs an endpoint that is active and subscribed to message.received.v1 (check with list_webhooks), pointing at your own n8n, Zapier, Make or server. On each event the automation calls read_conversation, then generate_draft, then send_reply with the draft text unless blocked is true. The setup steps are in the n8n auto-reply recipe.
Sending replies safely
send_reply sends a real SMS from your account.
- It only replies. A contact who has not written in the last 7 days is refused (
reply_required). - An account whose messaging registration (10DLC) is not approved, or that has no sending number, is refused (
ten_dlc_not_approved,sender_number_unavailable) until that is set up in Smarter Contact, so retrying does not help. - It waits at least 60 seconds after the contact's last message and after your last message to them, from any source. Too soon returns a tool error whose text is JSON:
{"code":"too_many_requests","reason":"reply_too_soon","message":"The reply floor has not passed yet, wait Ns and retry","retry_after_seconds":N}. - Keep your client's per-call approval on for
send_reply, so a person sees each message before it goes out. - Grant
messages:writeonly to clients that need to send.
SI drafts
generate_draft writes a reply draft for a conversation. It needs the drafts:write scope, shown as "Generate an SI draft" when you sign in. A client connected before that scope existed does not see generate_draft until you reconnect it and approve the new permission.
A draft is text only. Nothing is sent. To send it, pass text to send_reply.
One draft per contact generates at a time. The call returns once the draft is done, usually within seconds. While it generates, anyone with that contact open in Messenger sees the SI draft loading state.
Inputs
| Input | Required | What it does |
|---|---|---|
conversation_id |
yes | The conversation id, equal to the contact id. |
user_draft |
no | Text you already wrote. It is checked against the banned-word list before anything is generated. |
prior_drafts |
no | Drafts you already showed for this turn, so the next one differs. |
mode |
no | Leave it out: the draft is a followup when your message or a missed call from the contact was last, and a rewrite when user_draft is set. Set it only to override: generate, followup, rewrite or followup_rewrite (the rewrite modes need user_draft). |
Context. The draft is written from the contact's recent message history, their standard and custom fields, their notes, and your account's SI tone and playbook settings.
Response. { "text": "...", "blocked": false }. When SI decides a person should handle the conversation, you get { "text": "", "blocked": true, "message": "Needs human attention" }. Do not send anything in that case.
Refused when
- Your sign-in did not grant
drafts:write(403 scope_denied). - Your subscription does not include SI drafts (
403 si_drafts_not_available). - The contact does not exist or is not of your account or its sub-accounts (
404 contact_not_found). - You are a primary account and the contact belongs to a sub-account (
403 sub_account_contact). Sign in to that sub-account instead. modeis not one of the four (400 invalid_draft_mode), orprior_draftsis not an array of strings (400 invalid_prior_drafts).- The contact is unreachable for compliance reasons, has a landline number, or has no message history (
400 bad_request, noreason;messagesays which). user_draftcontains a banned word (400 content_not_allowed).- The balance does not cover the call (
402 insufficient_balance). - A draft for the same contact is still generating, from another call or from SI Reply in the app (
429, reasondraft_in_progress). Waitretry_after_seconds, then call again. This refusal is not charged. - The draft could not be generated on our side (
internal_error, reasondraft_generation_failed). This is still a tool error withisError: true, not charged. Try again later.
Billing. Each call counts as one API call plus one SI draft.
Marking conversations read
set_conversations_read marks the conversations you name read (read: true) or unread (read: false), the same as POST /conversations/v1/read. It needs the conversations:write scope, shown as "Mark conversations as read or unread" when you sign in; conversations:read cannot call it. A client connected before that scope existed does not see set_conversations_read until you reconnect it once and approve the new permission.
- Call it only when the operator names the threads. There is no way to mark every conversation at once.
- A reply sent with
send_replyalready marks its conversation read.list_conversationsandread_conversationchange the read state only whenmark_readistrue. mark_readonlist_conversationsandread_conversationtakestrueorfalse. Any other value is a tool error whose text is JSON:{"code":"bad_request","reason":"invalid_mark_read","message":"The call failed: mark_read must be true or false"}, and nothing is marked.- Marking read moves a conversation whose last message is from the contact from Unread to Unreplied. Marking unread moves it back to Unread.
- Pass 1 to 100 distinct contact ids. Duplicates count once.
- Deleted contacts work as in Messenger:
read_conversation,set_conversations_readandlist_conversationswithcategorydeletedread and mark their conversations, andsend_replyreplies to them. Replying does not restore the contact; a reply from the contact does. - Marking a conversation read or unread runs one at a time per contact. If another mark read for the same contact is in progress, from this tool,
mark_readorPOST /conversations/v1/read, the call waits for it to finish instead of failing, so it can take a little longer. - A primary account can mark its sub-accounts' conversations. A contact of another account (or, for a sub-account sign-in, of the primary or a sibling sub-account) gets
404 contact_not_found, the same as an id that does not exist or a contact that has no conversation yet, and nothing changes.
Response. { "contact_ids": [...], "read": true }, with the ids marked, without duplicates, sorted.
Refused when (nothing changes in any of these cases)
- Your sign-in did not grant
conversations:write(403 scope_denied). contact_idsis missing, empty, or has an id that is not a UUID (400 invalid_contact_ids).contact_idshas more than 100 distinct ids (400 too_many_contact_ids: the maximum is 100).readis nottrueorfalse(400 invalid_read).- Any id does not exist, is a contact that has no conversation yet, or is a contact of another account (
404 contact_not_found).
Setting contact labels
set_contact_labels replaces the labels of one contact with exactly label_ids, the same as PUT /contacts/v1/{id}/labels. It needs the metadata:write scope, shown as "Set labels and properties on a contact" when you sign in. A client connected before that scope existed does not see set_contact_labels until you reconnect it once and approve the new permission.
- It is a full replace: labels not in
label_idsare removed, and an empty array removes every label. To add one label, read the contact withread_contact, then send its currentlabel_idsplus the new one. - Sending the labels the contact already has changes nothing and is not an error. Duplicates count once.
label_idsare ids of labels that already exist in the contact's account;list_labelslists them. Creating, renaming or deleting labels is done in Smarter Contact.- A primary account can set the labels of its sub-accounts' contacts, using the sub-account's own labels. A contact of another account (or, for a sub-account sign-in, of the primary or a sibling sub-account) gets
404 contact_not_found, the same as an id that does not exist. - Nothing is sent to the contact.
Response. { "contact_id": "...", "label_ids": [...] }, with the labels the contact has now, without duplicates.
Refused when (nothing changes in any of these cases)
- Your sign-in did not grant
metadata:write(403 scope_denied). label_idsis missing, is not an array, or has an item that is not a string (400 invalid_label_ids).label_idshas more than 100 distinct ids (400 too_many_label_ids: the maximum is 100).- The contact does not exist or is not of your account (
404 contact_not_found). - Any id is not a label of the contact's account (
404 label_not_found). The message lists every id that was not found:{ids} not found in this account. You can create the label in Smarter Contact.
Setting contact fields
read_contact_fields and set_contact_fields read and change the standard fields of one contact, the ones its Info tab shows (name, email, phone, address, city, state, zip and their mailing versions), the same as GET and PUT /contacts/v1/{id}/fields. Custom fields and real estate property fields are not available through these tools yet.
- Every field has a stable
id. Use the ids fromread_contact_fields; names are not accepted, because they can change. read_contact_fieldsreturns every standard field, also the ones without a value (valueis an empty string).set_contact_fieldstakesfields, an object mapping each field id to its new value. An empty string clears the field. Fields left out keep their value, so you can change one field or several in one call.- The values follow the same rules as the Info tab. First name, last name and email cannot be cleared, the phone cannot be changed, and each field keeps the Info tab's length and format limits (for example 30 characters for a name, 100 for a city, a valid email, a 5-digit zip with an optional 4-digit extension). Values are trimmed before they are saved.
- All or nothing: if any entry is refused, the call fails with that entry's error and no field changes.
- Deleted contacts work the same way as active ones. A primary account can read and set the fields of its sub-accounts' contacts, using the sub-account's own field ids.
- Nothing is sent to the contact. Each successful call is billed once, however many fields it changes; a refused call is not billed.
Response. Both tools return { "contact_id": "...", "fields": [{ "id": "...", "name": "...", "value": "..." }] }, every standard field of the contact, after the change for set_contact_fields.
Refused when (nothing changes in any of these cases)
- Your sign-in did not grant the tool's scope (
403 scope_denied). fieldsis missing, empty, or has a value that is not a string (400 invalid_field_values).- The contact does not exist, is not of your account, or is a DNC number never added as a contact (
404 contact_not_found). - An id is not a field of the contact's account (
404 field_not_found:Field {id} not found!). - An id is a custom field (
400 custom_field_not_supported:Custom fields are not supported). - An id is the phone field (
400 field_read_only:Phone cannot be changed). - A value is too long (
400 value_too_long:{Field name} cannot be more than {N} characters). - First name, last name or email is cleared (
400 required_field:{Field name} is a required field and cannot be empty). - A value has characters the field does not accept (
400 invalid_format:{Field name} should only contain {supported characters}).
Creating a contact
create_contact creates a contact in the connected account, the same as POST /contacts/v1. It needs the contacts:write scope, shown as "Create a contact" when you sign in. A client connected before that scope existed does not see create_contact until you reconnect it once and approve the new permission.
- Only
phoneis required.first_name,last_nameandemailare optional and may be empty. No other input is accepted. - Names can have up to 30 characters and the email up to 74, and the email must be valid.
- Nothing is sent to the contact. Each successful create is billed once; a refused call is not billed.
- Retrying is safe: a phone can only be created once per account. If a retry is refused with
409 phone_taken, the contact already exists, for example because the first call went through before the connection dropped. Find it withlist_contactsby the same phone.
Response. The created contact, in the same shape as read_contact.
Refused when (nothing is created in any of these cases)
- Your sign-in did not grant
contacts:write(403 scope_denied). - The phone is not valid (
400 invalid_phone:Invalid phone number). - A value is too long (
400 value_too_long:First Name cannot be more than 30 characters,Last Name cannot be more than 30 charactersorEmail cannot be more than 74 characters), or the email is not valid (400 invalid_format). - The phone is opted out on brand level (
400 contact_opted_out:Contact with this number is opted out on brand level). - The contact can't be messaged (
400 contact_cannot_be_messaged:This contact can't be messaged.). - A contact with this phone already exists in the account, also in the Deleted folder (
409 phone_taken:Contact with this number already exists).
Reading a contact's workflow
list_contact_enrollments tells you which workflow a contact is in, the same as GET /contacts/v1/{id}/enrollments. It needs the workflows:read scope. A client that does not show list_contact_enrollments yet gets it after you reconnect it once.
resourcetells you which tool to use withresource_id. Today it is alwaysworkflows:resource_idis a workflow id forremove_contact_from_workfloworenroll_contact_in_workflow. Campaigns and scheduled messages may be added later as newresourcevalues; skip the ones you do not know.- A contact can be in one workflow at a time, so there is at most one item. To move a contact to another workflow, read it here, remove it with
remove_contact_from_workflow, then enroll it withenroll_contact_in_workflow. - A contact in the Deleted folder is read as in Messenger.
- A successful call is billed as one API call, also when the contact is not enrolled. A refused call is not billed.
Response. { "items": [ { "resource": "workflows", "resource_id": "...", "resource_name": "Seller follow-up" } ] }. When the contact is not enrolled in any workflow: { "items": [], "message": "This contact is not enrolled in any workflow." }.
Refused when (nothing is billed in any of these cases)
- Your sign-in did not grant
workflows:read(403 scope_denied). - The contact does not exist or is not of your account or its sub-accounts (
404 contact_not_found). - You are a primary account and the contact belongs to a sub-account (
403 sub_account_contact:Workflows of a sub-account contact can only be read inside that sub-account. Switch to this sub account to see the contact's workflows).
Enrolling a contact in a workflow
enroll_contact_in_workflow enrolls one contact in a contact workflow, the same as POST /workflows/v1/{id}/enrollments. The workflow's messages are scheduled as the workflow is configured. It needs the workflows:write scope, shown as "Add and remove contacts in workflows" when you sign in. A client connected before that scope existed does not see enroll_contact_in_workflow until you reconnect it once and approve the new permission.
workflow_idcomes fromlist_workflows,contact_idfromlist_contacts,list_conversationsorcreate_contact.- The messages go from the contact's current outgoing number, the one its conversation uses in Smarter Contact. The number is locked in at enrollment: changing it later does not move the messages already scheduled.
- The reply window does not apply: the contact does not need to have written first. A contact in the Deleted folder is enrolled as in the app.
- A contact can be in one workflow at a time. Enrolling it again in the same workflow returns the existing enrollment, schedules nothing and is not billed, so retrying is safe.
Response. { "workflow_id": "...", "workflow_name": "...", "contact_id": "...", "created_at": "..." }. created_at is when the contact was enrolled, and may be absent when a repeat returns an existing enrollment.
Refused when (nothing is scheduled or charged in any of these cases)
- Your sign-in did not grant
workflows:write(403 scope_denied). contact_idis missing or empty, for example sent ascontactId(400 required_field:contact_id is a required field and cannot be empty).- The subscription does not include contact workflows (
403 workflows_not_available). - The contact does not exist or is not of your account (
404 contact_not_found:We couldn't find this contact on this account). - The workflow does not exist or is not of your account (
404 workflow_not_found:We couldn't find this workflow on this account). - The contact belongs to a sub-account and you signed in to the primary account (
403 sub_account_contact:Messages cannot be sent from the primary account to sub account contacts. Switch to this sub account to send messages). - The contact opted out (
400 contact_opted_out:Messages cannot be sent to contacts that opted out), is a litigator (400 contact_cannot_be_messaged:Messages cannot be sent for compliance reasons), has a landline number (400 contact_no_sms:Messages cannot be sent to landline numbers. They can only receive calls) or is on your DNC list (400 contact_on_dnc:Messages cannot be sent to contacts while they are on your DNC list). - The contact has no outgoing number, it is not one of your account's numbers, or it cannot send messages (
400 sender_number_required:The contact has no outbound number. Choose one of your messaging numbers on Smarter Contact for this contact). Choose a messaging number for the contact in Smarter Contact first. - The outgoing number is a messaging (10DLC) number and the account's registration is not submitted, deactivated or declined (
403 ten_dlc_not_approved:Please register your brand before adding contacts to a workflow), or is in review, pending or reactivation submitted (403 ten_dlc_in_review:Your registration is in progress. You can add contacts to a workflow once it is approved). A calling (Dialer) number skips this check. - The contact is already in another workflow (
409 already_enrolled:This contact is already enrolled to {workflow name} workflow. Remove first). The error also carriesworkflow_id, the workflow the contact is in. - Free SMS credits and the wallet do not cover the call and all the workflow's messages (
402 insufficient_balance:Current balance: $X. To add contacts to this workflow, you need a minimum of $Y in your wallet. Please recharge; a sub-account getsPlease contact your primary accountinstead ofPlease recharge).
Billing. A new enrollment counts as one API call, plus the workflow's messages, charged as in the app: Free SMS credits first, then the wallet, on that day's Contact workflows item in Billing history. A sub-account, or a brand under centralized billing, is charged to the primary account's wallet. A refused call and a repeat into the same workflow are not billed.
Removing a contact from a workflow
remove_contact_from_workflow removes a contact from a workflow, the same as DELETE /workflows/v1/{id}/enrollments/{contact_id}. It needs the workflows:write scope, shown as "Add and remove contacts in workflows" when you sign in. A client connected before that scope existed does not see remove_contact_from_workflow until you reconnect it once and approve the new permission.
- The workflow's messages not sent yet to this contact are unscheduled and refunded. Messages already sent stay.
- Retrying is safe: removing a contact that is not in the workflow, or no longer is, changes nothing and is not an error.
- A primary account cannot remove its sub-accounts' contacts. Sign in to that sub-account instead.
- Nothing is sent to the contact. A removal is billed once, only when the contact was in the workflow and was removed; a refused call, or one that found nothing to remove, is not billed.
Response. { "workflow_id": "...", "contact_id": "..." }, the same for a removal and for a contact that was not in the workflow.
Refused when (nothing changes in any of these cases)
- Your sign-in did not grant
workflows:write(403 scope_denied). - The contact does not exist or is not of your account or its sub-accounts (
404 contact_not_found). - You are a primary account and the contact belongs to a sub-account (
403 sub_account_contact:Contacts of a sub-account can only be removed from a workflow inside that sub-account. Switch to this sub account to remove the contact). - The workflow does not exist or is not of your account (
404 workflow_not_found:We couldn't find this workflow on this account).
SI settings
get_si_settings and update_si_settings read and change the account's SI Agent settings, the same as GET and PATCH /si-settings/v1. The next SI drafts, in the app and through the API, use them. Both need the drafts:write scope and a subscription that includes SI drafts (403 si_drafts_not_available otherwise).
playbook:re(Real estate, sellers),hs(Home services),roofing,solar,financing,leadgen(Lead gen, B2B),foreclosure(Foreclosure help) orother.tone:friendly,formal(Professional) ordirect.writing_styleis alwaysprovenand cannot be changed.
Response. { "playbook": "re", "writing_style": "proven", "tone": "friendly" }, after the change for update_si_settings.
Refused when (nothing changes in any of these cases)
playbookis not one of the values above (400 invalid_playbook), ortoneis not (400 invalid_tone). The message lists the allowed values.update_si_settingsgets neitherplaybooknortone(400 settings_required).
Billing. Each call counts as one API call.
Sessions
Every connected client appears on the Sessions tab of the ConnectSI page, with what it can do and when it was last used. Revoke it there and it loses access immediately. An account can have up to 50 connected clients; past that, signing in a new one fails. To connect a client step by step, see how to connect an AI client.
Limits
- Sends: 300 per account per UTC hour. Every
send_replycall counts, including one that is refused. - SI drafts: 300 per account per UTC hour, counted apart from sends and shared with
POST /drafts/v1. Everygenerate_draftcall counts, including one that is refused, unless your sign-in lacksdrafts:write. - Label, field, contact and workflow writes: 300 per account per UTC hour, counted apart from sends and SI drafts and shared with
POST /contacts/v1,PUT /contacts/v1/{id}/labels,PUT /contacts/v1/{id}/fields,POST /workflows/v1/{id}/enrollmentsandDELETE /workflows/v1/{id}/enrollments/{contact_id}. Everycreate_contact,set_contact_labels,set_contact_fields,enroll_contact_in_workflowandremove_contact_from_workflowcall counts, including one that is refused, unless your sign-in lacks the tool's scope (contacts:write,metadata:writeorworkflows:write). - Reads: 3 per second per account per scope, shared with the REST API.
list_labelsandread_contact_fieldscount ascontacts:readreads,list_workflowsandlist_contact_enrollmentsasworkflows:readreads.set_conversations_readcounts as a read.get_si_settingsandupdate_si_settingscount asdrafts:writereads, shared withGETandPATCH /si-settings/v1, so they never use up SI drafts. - A limit is not a tool error: the whole request gets HTTP
429with{"code":"too_many_requests","reason":"rate_limited",...},retry_after_secondsin the JSON body and aRetry-Afterheader. A well-behaved client waits that long and retries.
Errors
A refused tool call is a tool result with isError: true whose text is JSON, the same body as the API reference: {"code":"...","reason":"...","message":"..."}, plus retry_after_seconds on too_many_requests. code is generic and follows the HTTP status; branch on reason, which is absent when there is none. message is for people and can change.
| Code | Reasons | Tools |
|---|---|---|
bad_request |
invalid_phone (Invalid phone number) |
list_contacts |
bad_request |
invalid_category |
list_conversations |
bad_request |
invalid_limit, invalid_page_token, invalid_mark_read |
list_conversations, read_conversation |
bad_request |
content_required, contact_opted_out, contact_on_dnc, contact_no_sms, contact_cannot_be_messaged, sms_quota_reached, sender_number_unavailable (the number last used with this contact no longer belongs to your account, or the account has no sending number) |
send_reply |
bad_request |
content_not_allowed (the text has words that are not allowed) |
send_reply, generate_draft |
bad_request |
invalid_draft_mode, invalid_prior_drafts, and no reason when the contact is unreachable for compliance, has a landline number or has no message history |
generate_draft |
bad_request |
invalid_contact_ids, too_many_contact_ids, invalid_read |
set_conversations_read |
bad_request |
invalid_label_type, invalid_limit, invalid_page_token |
list_labels |
bad_request |
invalid_limit, invalid_page_token |
list_workflows |
bad_request |
invalid_label_ids, too_many_label_ids |
set_contact_labels |
bad_request |
invalid_field_values, custom_field_not_supported, field_read_only, value_too_long, required_field, invalid_format |
set_contact_fields |
bad_request |
invalid_phone, value_too_long, invalid_format, contact_opted_out, contact_cannot_be_messaged |
create_contact |
bad_request |
required_field, contact_opted_out, contact_cannot_be_messaged, contact_no_sms, contact_on_dnc, sender_number_required (the contact has no usable outgoing number) |
enroll_contact_in_workflow |
bad_request |
invalid_playbook, invalid_tone, settings_required |
update_si_settings |
payment_required |
insufficient_balance (the balance does not cover the call) |
all |
forbidden |
scope_denied (the sign-in did not grant the tool's scope) |
all |
forbidden |
reply_required, ten_dlc_not_approved (the sending account's messaging registration (10DLC) is not approved yet) |
send_reply |
forbidden |
si_drafts_not_available (the subscription does not include SI drafts) |
generate_draft, get_si_settings, update_si_settings |
forbidden |
sub_account_contact (a primary account asked for a sub-account's contact) |
generate_draft, list_contact_enrollments, enroll_contact_in_workflow, remove_contact_from_workflow |
forbidden |
workflows_not_available (the subscription does not include contact workflows), ten_dlc_not_approved, ten_dlc_in_review (the messaging registration (10DLC) is not approved yet, or is still in review) |
enroll_contact_in_workflow |
conflict |
phone_taken |
create_contact |
conflict |
already_enrolled (the contact is in another workflow; the error also carries its workflow_id) |
enroll_contact_in_workflow |
not_found |
contact_not_found (no contact with this id in your account or its sub-accounts) |
read_contact, read_conversation, send_reply, generate_draft, set_conversations_read, set_contact_labels, read_contact_fields, set_contact_fields, list_contact_enrollments, enroll_contact_in_workflow, remove_contact_from_workflow |
not_found |
workflow_not_found (no workflow with this id in your account) |
enroll_contact_in_workflow, remove_contact_from_workflow |
not_found |
label_not_found |
set_contact_labels |
not_found |
field_not_found |
set_contact_fields |
too_many_requests |
reply_too_soon, rate_limited (another send to this contact is in progress) |
send_reply |
too_many_requests |
draft_in_progress |
generate_draft |
internal_error |
draft_generation_failed |
generate_draft |
A tool name the server does not know is a tool error whose text is plain Unknown tool: <name>, not JSON. Any other unexpected failure inside a tool is not a tool result: it is a JSON-RPC error with the message Internal server error. Errors before a tool runs (sign-in unauthorized, forbidden for the account, forbidden with scope_undeclared for an internal misconfiguration that should not happen, the 429 rate_limited above) are HTTP responses with the same JSON body. Protocol errors (a batch, a GET) stay JSON-RPC errors.