Quick start
From zero to a sent SMS in five minutes, in a terminal.
1. API key
- Log in to the panel and open Settings → API.
- Turn on the “HTTP protocol” switch and save. The key does not work without it.
- Copy “Your API key”.
export ESMSY_API_KEY="paste-your-key-here"2. Check the connection
curl https://panel.esmsy.pl/api/v1/ping -H "X-Api-Key: $ESMSY_API_KEY"The answer when the key works:
{"ok": true, "user_id": 1042}If you get 401, see Authentication.
3. Send an SMS
curl -X POST https://panel.esmsy.pl/api/v1/messages \
-H "X-Api-Key: $ESMSY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "48500600700", "text": "Test from the esmsy.pl API"}'The message is accepted: keep messageId.
{"messageId": 918273, "campaignId": 55120, "status": "pending", "cost": 0.11}4. Check the status
curl https://panel.esmsy.pl/api/v1/messages/918273 -H "X-Api-Key: $ESMSY_API_KEY"When the status is delivered, the SMS reached the phone. All statuses: Delivery statuses.