POST
/v1/email/eventsNo key needed
The email provider calls this when an email we sent is delivered, bounces, is delayed, is marked as spam, fails, or is suppressed. Each becomes one api:email-* line in the history of the invoice the email carried. A call the provider retries adds nothing twice. An event for an email we did not send is answered and ignored.
The call is signed with the svix-id, svix-timestamp and svix-signature headers. A call that does not verify is refused and nothing is read.
Headers
- svix-idstringRequired
- svix-timestampstringRequired
- svix-signaturestringRequired
Request body
application/json, required
- typestringRequired
- created_atstring
- dataobjectRequired
Response
A 200 answer carries these fields.
- outcomestringRequiredOne of
recorded,already-recorded,filed,refused,no-invoice-file,unreadable-zip,ignored.
Status codes
| Status | Meaning |
|---|---|
200 |
The call was read. |
401 |
The call is not signed with our secret (invalid_signature). Nothing was read. |
503 |
This deployment has no signing secret (email_events_not_configured), or a mail from an approved sender carries an invoice and no key can read it (email_inbox_not_configured). The provider tries again later. |
POST
/v1/email/eventsExample
curl -X POST https://api.certinvo.com/v1/email/events \
-H "svix-id: string" \
-H "svix-timestamp: string" \
-H "svix-signature: string" \
-H "Content-Type: application/json" \
--data-binary @body.jsonimport { readFile } from 'node:fs/promises'
const response = await fetch(`https://api.certinvo.com/v1/email/events`, {
method: 'POST',
headers: {
'svix-id': 'string',
'svix-timestamp': 'string',
'svix-signature': 'string',
'Content-Type': 'application/json',
},
body: await readFile('body.json'),
})
console.log(response.status, await response.json())import requests
response = requests.post(
"https://api.certinvo.com/v1/email/events",
headers={"svix-id": "string", "svix-timestamp": "string", "svix-signature": "string", "Content-Type": "application/json"},
data=open("body.json", "rb"),
)
print(response.status_code, response.text)200
application/json
{
"outcome": "recorded"
}Success response