Receive incoming emails through webhooks
https://0fcbcda91e79.ngrok.app/webhook/email
)Field | Type | Description |
---|---|---|
email_id | string | Unique identifier for the received email |
subject | string | Subject line of the email |
sender_address | string | Email address of the sender |
recipient_address | string | Your A1Base email address that received the message |
timestamp | string | ISO 8601 timestamp of when the email was received |
service | string | Always “email” for email webhooks |
raw_email_data | string | Complete raw email content including headers and body |
company_id
as the secret key.
company_id
in the A1Mail tab of your dashboard.x-timestamp
header containing the Unix timestamp (in seconds) of when the request was created. This helps protect against replay attacks.
company_id
as the secret key.
x-signature
header of the request.
x-timestamp
and x-signature
headers.
x-timestamp
is recent (e.g., within the last 5 minutes). If the timestamp is too old, you may choose to reject the request.
message_to_sign
by concatenating the value from the x-timestamp
header with the complete, raw body of the POST request.
Important: It is critical to use the raw, unmodified request body. Any parsing or modification of the JSON before creating the signature string will result in a mismatch.
company_id
as the secret key, compute the HMAC-SHA256 hash of the message_to_sign
you just created. The output should be a hex-encoded string.
x-signature
from the request header with your generated signature. If they match exactly, the webhook is authentic and can be trusted. If they do not match, the request should be discarded.
raw_email_data
field contains the complete email including headers, which you can parse to extract additional information like: