Api Documentation
| Version | Docs |
|---|---|
| Latest | Api-latest docs |
You can send sms via the api or create webhooks to get notified in your own backend of received sms on your connected smartphone.
Optional: omit sim_card to use your primary SIM; if it is unavailable, the next SIM by route priority is used as fallback. Configure priorities under MCP Setup / Dashboard.
MCP agent
Before you can use the api, you should generate an access token.
Fetch list of sim cards
curl \
--header 'Accept: application/json; indent=4' \
--header 'Authorization: Token <ACCESS_TOKEN>' \
--request GET https://www.tincansmartphone.com/api/sim-card/
Send sms via a specific sim card
curl \
--header 'Content-Type: application/json' \
--header 'Accept: application/json; indent=4' \
--header 'Authorization: Token <ACCESS_TOKEN>' \
--data '{"sim_card":"<SIM_CARD_ID>", "to_number":"<RECEIVER_PHONE_NUMBER>", "text": "Hello!"}' \
--request POST https://www.tincansmartphone.com/api/sms-out/
Create webhook for received sms
curl \
--header 'Content-Type: application/json' \
--header 'Accept: application/json; indent=4' \
--header 'Authorization: Token <ACCESS_TOKEN>' \
--data '{"target": "http://example.com/target.php", "event": "sms.in.received"}' \
--request POST https://www.tincansmartphone.com/api/hooks/
Create webhook for sent sms
curl \
--header 'Content-Type: application/json' \
--header 'Accept: application/json; indent=4' \
--header 'Authorization: Token <ACCESS_TOKEN>' \
--data '{"target": "http://example.com/target.php", "event": "sms.out.created"}' \
--request POST https://www.tincansmartphone.com/api/hooks/
Fetch list of webhooks
curl \
--header 'Accept: application/json; indent=4' \
--header 'Authorization: Token <ACCESS_TOKEN>' \
--request GET https://www.tincansmartphone.com/api/hooks/
Delete a webhook
curl \
--header 'Accept: application/json; indent=4' \
--header 'Authorization: Token <ACCESS_TOKEN>' \
--request DELETE https://www.tincansmartphone.com/api/hooks/<HOOK_ID>/
Available webhooks
| Event | Description |
|---|---|
| sms.out.created | Sms was sent to the Api for dispatch |
| sms.out.sent | The sms was marked as sent |
| sms.in.received | A sms was received |
| simcard.added | A sim card was added |
| simcard.changed | A sim card was changed |
| simcard.removed | A sim card was removed |
You can create a webhook via the Rest-Api (create webhook - api) or via the website (create webhook - web).