// Send an OTP — sandbox, no charge
curl -X POST https://api.pulsegrid.example/v2/otp \
-H "Authorization: Bearer $GRID_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+852 5555 0100",
"channel": ["sms", "whatsapp"],
"ttl": 300
}'
// 201 Created
{
"id": "otp_9f3c1a",
"status": "delivering",
"expires_at": "2026-10-05T14:05:00Z"
}
// Reserve a local number
curl -X GET https://api.pulsegrid.example/v2/numbers \
-H "Authorization: Bearer $GRID_KEY" \
-G --data-urlencode "country=HK&type=mobile"
// 200 OK
{
"numbers": [{"id": "n_8812", "e164": "+85255550142", "state": "available"}]
}
// Provision an eSIM profile
curl -X POST https://api.pulsegrid.example/v2/esim \
-H "Authorization: Bearer $GRID_KEY" \
-d '{
"iccid": "89441120300011223344",
"plan": "iot_5mb_monthly",
"fallback_network": "partner_b"
}'
// 202 Accepted — profile queued
{ "job": "esim_77da", "eta_s": 12 }
// Subscribe to delivery events
curl -X POST https://api.pulsegrid.example/v2/webhooks \
-H "Authorization: Bearer $GRID_KEY" \
-d '{
"url": "https://your-app.example/hooks/grid",
"events": ["message.delivered", "esim.ready"],
"secret": "whsec_3f9a2c"
}'
// 201 Created — signature: HMAC-SHA256
{ "id": "wh_204", "status": "active" }