message.enrich
Called synchronously before a new mail is stored and delivered; the response enriches it. At most one endpoint per application.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”t=<unix seconds>,v1=<hex HMAC-SHA256>. The MAC covers <t>.<raw body> with the endpoint’s signing secret. During a secret rotation a second v1 carries the previous secret’s MAC. Reject a t older than 5 minutes.
Example
t=1761206400,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bdt=<unix seconds>,v1=<hex HMAC-SHA256>. The MAC covers <t>.<raw body> with the endpoint’s signing secret. During a secret rotation a second v1 carries the previous secret’s MAC. Reject a t older than 5 minutes.
The envelope’s id. Stable across retries: dedupe on it.
The envelope’s id. Stable across retries: dedupe on it.
Request Body
Section titled “Request Body”object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Responses
Section titled “Responses”The enrichment to store on the mail.
object
Stored on the mail as enrichment.application. A JSON object of at most 16 KB serialized and 8 levels deep. Keys __proto__, constructor and prototype are refused, as are strings and keys with \u0000 or invalid Unicode. Absent or null: nothing to add.
Example
{ "enrichment": { "crmId": "42", "category": "support" }}Nothing to add.
default
Section titled “default”One attempt, no retry. Within 5 seconds, body read included; at most 32 KB of the body are read. On any failure the mail is processed and delivered without enrichment.