API Tokens & Sending via API
API Tokens
Nidaa uses bearer token authentication for its REST API. Tokens are device-scoped — each token can only send from the device it was created for.
Creating a Token
- Go to the API & Token tab.
- Select your Device.
- Click + Create Token and enter a name (e.g., "CRM integration").
- Copy the token — it is shown only once. Store it securely.
Sending via API
curl -X POST https://api.nidaa.id/api/v1/messages/send \
-H "Token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"target":"6281234567890","message":"Hello from Nidaa API!"}'Response
{ "ok": true, "id": "msg_xxx", "status": "queued" }Webhooks
Set a webhook URL on your device to receive inbound messages and status updates:
- Devices tab → click Webhook on a device.
- Enter your endpoint URL.
- Nidaa will POST to that URL for every incoming message and status change.
Webhook payload (inbound message)
{
"event": "message.inbound",
"deviceId": "dev_xxx",
"from": "6281234567890",
"body": "Hello!",
"timestamp": "2026-06-30T10:00:00Z"
}For full API documentation, visit api.nidaa.id/docs.