Integrations (Server)

Sendeasy offers two integration products:

  • Webhook — Sendeasy pushes events from your project to a URL you control.
  • Custom (generic) — your application calls Sendeasy to send messages.

Webhooks support two scopes:

  • General: receives events from every channel of the company.
  • Channel-specific: receives events only from the chosen channel (one WhatsApp instance, one Email mailbox, one SMS number).

The two scopes coexist: you can have 1 general webhook + N per-channel webhooks active at the same time. Each event fires the UNION of applicable webhooks (general + specific). Custom tokens always require a specific channel.

UI configuration

Go to Settings → Integrations. There you'll see a list of integrations. For each one:

  1. Click New integration.
  2. For webhook, choose the scope: General (all channels) or Specific channel.
  3. If "Specific channel", pick the type (whatsapp/email/sms) and instance.
  4. For webhook: provide the URL and, optionally, a bearer token sent in the Authorization header.
  5. For custom: the token is generated by the system and shown only once. Copy and save it immediately.

Sending messages — POST /api/integration/generic

This endpoint now has different payloads per channel type. The destination channel is derived from the token — your application does NOT send channelType in the body. A token created for Email can only send Email; an SMS token can only send SMS.

Required header:

Authorization: Bearer 

WhatsApp

WhatsApp send

POST
/api/integration/generic
curl -X POST https://server.sendeasy.pro/api/integration/generic \
  -H "Authorization: Bearer 12G3N3R1$..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "WhatsApp Lead",
    "number": "5511999999999",
    "message": "I want to talk to sales",
    "email": "lead@company.com",
    "url": "https://landing.com/?utm_source=meta",
    "files": ["https://landing.com/deck.pdf"],
    "sector": "12"
  }'
FieldTypeRequired
numberstring (E.164 without +)yes
messagestringyes
namestringno
emailstringno
urlstring (UTM)no
filesstring[] (URLs)no
sectorstring (queue id)no

Email

Email send

POST
/api/integration/generic
curl -X POST https://server.sendeasy.pro/api/integration/generic \
  -H "Authorization: Bearer 12G3N3R1$..." \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["customer@company.com"],
    "subject": "Order confirmation",
    "html": "<p>Thanks for your purchase!</p>",
    "bcc": ["archive@company.com"]
  }'
FieldTypeRequired
tostring or string[] (emails)yes
subjectstringyes
body or htmlstringone of
bccstring or string[]no
textstringno
fromNamestringno
inReplyTostringno
referencesstring or string[]no

The sender address (fromEmail) is the channel bound to the token.

SMS

SMS send

POST
/api/integration/generic
curl -X POST https://server.sendeasy.pro/api/integration/generic \
  -H "Authorization: Bearer 12G3N3R1$..." \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+5511999999999",
    "body": "Your code: 123456"
  }'
FieldTypeRequired
tostring (E.164 with +)yes
bodystring (≤ 1600 chars)yes
mediaUrlsstring[] (public URLs)no
metadataobjectno

Response codes

HTTPerrorMeaning
200Success
400VALIDATION_ERRORInvalid payload — see details[]
401ERR_NO_PERMISSIONMissing/invalid token
402PROVIDER_ERRORNo credits on this channel
404CHANNEL_NOT_FOUNDChannel deleted after token created
502PROVIDER_ERRORProvider failure (Twilio, Resend, …)
410GONEDeprecated legacy endpoint

Token rotation

custom tokens can be rotated at any time under Settings → Integrations. Rotation invalidates the previous token immediately. We recommend periodic rotation (90 days) and immediate rotation on suspected leaks.

Security

Where to manage

All token and webhook management lives on the platform, under Settings → Integrations. Previously created tokens continue to work — just review and adjust the configuration on the new screen.

Essa informação foi útil?