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:
- Click New integration.
- For webhook, choose the scope: General (all channels) or Specific channel.
- If "Specific channel", pick the type (
whatsapp/email/sms) and instance. - For webhook: provide the URL and, optionally, a bearer token sent in
the
Authorizationheader. - 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 send
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"
}'
| Field | Type | Required |
|---|---|---|
number | string (E.164 without +) | yes |
message | string | yes |
name | string | no |
email | string | no |
url | string (UTM) | no |
files | string[] (URLs) | no |
sector | string (queue id) | no |
Email send
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"]
}'
| Field | Type | Required |
|---|---|---|
to | string or string[] (emails) | yes |
subject | string | yes |
body or html | string | one of |
bcc | string or string[] | no |
text | string | no |
fromName | string | no |
inReplyTo | string | no |
references | string or string[] | no |
The sender address (fromEmail) is the channel bound to the token.
SMS
SMS send
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"
}'
| Field | Type | Required |
|---|---|---|
to | string (E.164 with +) | yes |
body | string (≤ 1600 chars) | yes |
mediaUrls | string[] (public URLs) | no |
metadata | object | no |
Response codes
| HTTP | error | Meaning |
|---|---|---|
| 200 | — | Success |
| 400 | VALIDATION_ERROR | Invalid payload — see details[] |
| 401 | ERR_NO_PERMISSION | Missing/invalid token |
| 402 | PROVIDER_ERROR | No credits on this channel |
| 404 | CHANNEL_NOT_FOUND | Channel deleted after token created |
| 502 | PROVIDER_ERROR | Provider failure (Twilio, Resend, …) |
| 410 | GONE | Deprecated 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
Never embed tokens in browser JavaScript, public repos, screenshots, or logs. Treat the token like a password. Store it in environment variables, a vault, or a secret manager. If exposed, rotate immediately.
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.