Skip to content

API reference

Receive an email event from the email provider

Other routes API

POST/v1/email/events
No 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.

  • outcomestringRequired
    One 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/events
Example
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.json
import { 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
POST
/v1/email/events
Receive an email event from the email provider
All
›AuthenticationNoneBearerAuth

This endpoint does not require authentication.

›Headers2
›Bodyapplication/json
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/email/events" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "string",
  "created_at": "string",
  "data": {}
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close