Skip to content

POST /v1/send

Queue a notification request for asynchronous Telegram delivery.

Bearer API key (Authorization: Bearer <key>).

{
"user_id": "string",
"message": "string",
"priority": 0
}

Validation:

  • priority is integer 0..9
  • message is 1..4096 characters pre-branding

202 Accepted

{
"tracking_id": "uuid",
"status": "queued"
}
  • 401 unauthorized: invalid/inactive API key.
  • 400 invalid_request: malformed schema.
  • 400 message_too_long_after_branding: branded text exceeds Telegram limit.
  • 409 phone_unverified: user missing verified phone state.
  • 502 queue_error: enqueue failed.
Terminal window
curl -X POST "$GATEWAY_BASE_URL/v1/send" \
-H "Authorization: Bearer $ETN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id":"user_123","message":"Your OTP is 194881","priority":8}'
  • Branded body is rendered at enqueue-time snapshot:
A message from <key_label_or_fallback>
<original_message>
  • Priority routing: >= 7 routes to high-priority queue.