SMS
Calling it
This is your own data, so a call has to say who you are. Make a token at /token and send it as a header.
curl -H "Authorization: Bearer $MU_TOKEN" \ https://micro.mu/api/v1/sms/history
Methods
GET /api/v1/sms/historyRead the texts this account has sent and received, newest first. Both directions, which is why it is not called an inbox
| Argument | Type | Description |
|---|---|---|
limit | number | How many messages to return, newest first (default 50, max 200) |
curl \ -H "Authorization: Bearer $MU_TOKEN" \ "https://micro.mu/api/v1/sms/history"
GET /api/v1/sms/numberThe number texts are sent from, which numbers are verified as yours, and how many messages are left today
curl \ -H "Authorization: Bearer $MU_TOKEN" \ "https://micro.mu/api/v1/sms/number"
POST /api/v1/sms/sendMessage somebody from this instance's number, by text or on WhatsApp. A text is charged per 160-character segment; WhatsApp is charged per 24-hour conversation and only reaches somebody who wrote in within the last day. Capped per day either way, and the recipient can stop it with STOP
| Argument | Type | Description |
|---|---|---|
to * | string | The number to message, in international format, e.g. +447700900123. Use contacts_find to turn a name into one |
text * | string | What to say. A text is charged per 160-character segment, so brevity is not only good manners |
channel | string | How to send it: 'sms' (the default) or 'whatsapp'. WhatsApp only works with somebody who messaged this instance in the last 24 hours — reply on the channel they used |
curl -X POST \
-H "Authorization: Bearer $MU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text":"text","to":"to"}' \
https://micro.mu/api/v1/sms/sendPOST /api/v1/sms/verifyClaim a number as your own, so texts arriving from it reach this account. Call it with just the number to have a code texted there, then again with the code
| Argument | Type | Description |
|---|---|---|
number * | string | Your own number, in international format |
code | string | The code that was texted to that number. Omit to have one sent |
curl -X POST \
-H "Authorization: Bearer $MU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"number":"number"}' \
https://micro.mu/api/v1/sms/verifyThe same methods are tools over MCP, and every service on this instance is in one reference.
