Change how a site texts

update_site_messages

Turns texting on or off for a site, or sets the countries it may text.

POST /v1/update_site_messagesScopeconfig:writeMakes changes

Send only what changes. Texting is on for every site until someone turns it off, and enabled false refuses every text from the site until it is turned back on. countries replaces the whole list, up to 5 countries on Pro, and a text to any other country is refused. list_site_message_countries finds the codes. allCountries true picks every country texts can go to in one go, and is refused when the site's plan allows fewer countries than that. Send countries or allCountries, not both. Texts to US numbers go out from a US number of the site's own, which needs a paid plan, and adding US on a paid plan gets the site that number, see Countries. The tool tells the client to ask you first before it adds US and before it turns texting off. See Turn texting off and on.

Request

Call it with a POST to https://api.modulify.ai/v1/update_site_messages, sending the inputs below as a JSON object. The token needs the config:write scope.

It makes changes, so send an Idempotency-Key header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

curl -X POST https://api.modulify.ai/v1/update_site_messages \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID"}'

Over MCP, the same method is the update_site_messages tool.

Inputs

Input Type Required Description
projectId string Yes The site id.
enabled boolean No Turn texting on or off.
countries array of strings No Every ISO country code the site may text, replacing the list.
allCountries boolean No True to pick every country texts can go to, when the plan allows that many.

Response

Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.