Technical Reference

Developer-focused runbook for real integrations: endpoint, payload, response and operational behavior.

Integration TL;DR

  • Base URL: https://server.sendeasy.pro
  • Auth: Authorization: Bearer <token>
  • Formats: application/json and multipart/form-data
  • Many flows are queued asynchronously
  • Treat error as stable machine contract

Main send endpoint

POST /api/messages/send

curl --location 'https://server.sendeasy.pro/api/messages/send' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer CHANNEL_TOKEN' \
  --data '{
    "number": "5511999999999",
    "body": "Hello from integration"
  }'

Typical response:

{
  "message": "Message queued successfully"
}

WABA quick reference

Prefix:

/api/v1/waba/:whatsappId

Examples:

  • GET /templates
  • POST /send
  • POST /send-text
  • POST /send-image
  • POST /send-document
  • POST /marketing-lite/send

Webhook quick reference

Payload shape sent to your webhook URL:

{ event, channel, data, channelId }

Example:

{
  "event": "messages.upsert",
  "channel": "whatsapp",
  "data": {},
  "channelId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Error strategy

function normalizeApiError(status, body) {
  return {
    status,
    code: body?.error || 'UNKNOWN_ERROR',
    message: body?.message || null,
  }
}

Essa informação foi útil?