Webhook API
Premium. Other systems can send secure messages and credential requests through Emberseal: a service desk replying to a ticket securely, an onboarding workflow sending a new starter their first password, an HR system collecting bank details. The full request and response schemas are in the API reference.
Tokens
Create a token under API & MCP tokens → New token, kind API. The secret (es_api_…) is shown once. Messages sent with a token belong to the admin who created it, unless the token was created with Send as the staff member named in each request: then a request's sender_email makes that staff member the owner (replies and submissions go to them).
Send a message
curl -s https://secure.example.com/api/v1/messages \
-H "Authorization: Bearer $EMBERSEAL_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ticket-1234-reply-5" \
-d '{
"type": "message",
"recipients": [{ "email": "jane@customer.example", "name": "Jane Doe" }],
"subject": "Your VPN access",
"body": "Hi Jane,\n\nUsername: jane.doe\nPassword: Tide-Harbor-41!",
"note": "Reply to ticket #1234",
"expiry_hours": 48,
"view_limit": 2,
"on_delivery_failure": "queue"
}'
Idempotency-Key: retrying with the same key replays the first answer for 24 hours instead of sending twice.- Templates: send
"template": "<id or exact name>"and"variables": {…}; anything else you send overrides the template. - Attachments:
"attachments": [{ "name": "guide.pdf", "content_base64": "…" }], with the same limits and virus scanning as the interface. - Several recipients: up to 50, with
"show_recipients": trueto let them see each other. - Credential requests:
"type": "request", onerecipient, atitle,instructionsandfields: [{ "label": "Password", "secret": true }]. - Delivery: with the default
"on_delivery_failure": "fail", if a notification can't be delivered right away the message is destroyed and you get502. With"queue", Emberseal keeps it and retries (you get202).
Recipient links are never returned by the API; recipients get them by email.
Follow up
POST /api/v1/messages/statuswith{ "ids": ["message:…"] }: status, per-recipient views and delivery, reply count and submission time. Never content.POST /api/v1/messages/revokewith{ "message_id": "message:…", "emails": ["…"] }removes those recipients; withoutemailsit revokes the whole message.GET /api/v1/templateslists templates;GET /api/v1/optionslists what a send may ask for right now (verification modes, limits, attachment limits, server version).
Errors worth handling
| Status | Meaning |
|---|---|
400 | Invalid input, or unfilled template variables (variables lists them). |
401 / 403 | Bad token, or the licence doesn't allow sending (code says why). |
422 | An attachment was rejected (file, reason), or DLP blocked the send (code: "dlp_blocked" or "dlp_warning", with findings, can_override and can_request_approval). Resend with "dlp": { "action": "override" | "request_approval", "justification": "…" } if allowed. |
502 | Notification failed and nothing was sent (default on_delivery_failure). |
503 | code: "dlp_unavailable": DLP couldn't be reached. Try again later; don't fall back to plain email. |
The Webhook API page in Emberseal builds the JSON and curl for you.

