Linje

Inbound Email Webhooks

Receive email inside your application.

Provision inboxes, receive inbound email as signed webhooks, download attachments, and replay delivery when your endpoint fails.

Inbox

Create or update an inbound address.

curl -fsS \
  -X POST \
  -H "Authorization: Bearer $LINJE_PROJECT_TOKEN" \
  -H "content-type: application/json" \
  -d '{
    "id":"support",
    "webhook-url":"https://app.example.com/linje/inbound"
  }' \
  https://api.linje.systems/v1/inboxes

Webhook

Linje posts a stable envelope to your endpoint.

POST https://app.example.com/linje/inbound
x-linje-inbound-id: ...
x-linje-delivery-id: ...
x-linje-timestamp: ...
x-linje-signature: sha256=...

{
  "schema":"linje.inbound-email.v1",
  "event-id":"...",
  "email": {
    "from":"customer@example.com",
    "subject":"Need help"
  },
  "attachments":[
    {"download":{"url":"https://api.linje.systems/..."}}
  ]
}

Signatures

Verify against raw request body bytes.

expected = HMAC_SHA256(secret, timestamp + "." + raw_body)
x-linje-signature = "sha256=<hex>"

Webhook delivery is at least once. Use the payload event id or inbound id to dedupe.