Read how a site texts
get_site_messages
Reads whether a site sends texts, the countries it may text, its sender name, prices, limits and this month's usage.
enabled says whether texting is on, which it is unless someone turned it off, and isPaid whether the workspace is on a paid plan, which texts to the United States need. allowance has the credits for texts the plan includes this calendar month, how many the site used, how many are left and when they start again. paused is true while Modulify paused texting on the site. countries lists the ISO codes of the countries the site may text, and with none it cannot text anyone yet. profile.shortName is the sender name, prices the credits one SMS part costs to each country, and contactCredits the fee for the first text to a number in a calendar month. limits and usage carry the limits and this month's texts, and get_site_message_stats counts them over any period. See Messages.
Request
Call it with a POST to https://api.modulify.ai/v1/get_site_messages, sending the inputs below as a JSON object. The token needs the config:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/get_site_messages \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID"}'Over MCP, the same method is the get_site_messages tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
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.