API docs
Transactional email and inbound email webhooks.
Linje handles product email in both directions. Your app can send transactional email with one API call, and inbound mail can come back as a signed JSON webhook.
POST /v1/messages
POST /v1/inboxes
Portal -> Settings
Auth
Portal access plus two scoped credentials.
Send email
Use POST /v1/messages for transactional mail.
This is the core send endpoint. It is intended for receipts, magic links, password resets, invites, and other product mail.
curl -fsS \
-H "Authorization: Bearer $LINJE_PROJECT_TOKEN" \
-H "content-type: application/json" \
-H "idempotency-key: magic-link:user-123" \
-d '{
"from":"auth@tx.example.com",
"to":["you@example.com"],
"subject":"Your sign-in link",
"text":"Use the sign-in link in your app.",
"html":"<p>Use the sign-in link in your app.</p>"
}' \
https://api.linje.systems/v1/messages
Use a project token for normal sending.
Set an `idempotency-key` for safe retries.
Project-token sends must use an allowed `from` domain.
Quickstarts
Start with the job your app needs.
Inbound email
Use POST /v1/inboxes to turn email into webhooks.
You can provision a Linje inbox, point mail directly at it, or forward mail into it. When Linje receives a message, it POSTs a structured JSON payload to your endpoint.
curl -fsS \
-H "Authorization: Bearer $LINJE_PROJECT_TOKEN" \
-H "content-type: application/json" \
-d '{
"id":"support",
"webhook-url":"https://app.example.com/inbound"
}' \
https://api.linje.systems/v1/inboxes
POST https://app.example.com/inbound
x-linje-inbound-id: ...
x-linje-signature: sha256=...
{
"event-id":"...",
"from":"user@example.com",
"to":"support@in.example.com",
"subject":"Need help",
"attachments":[...]
}
Signatures
Webhook signatures use HMAC-SHA256 over timestamp + body.
Verify against the raw request body bytes, not re-serialized JSON. Linje sends `x-linje-timestamp` and `x-linje-signature` on inbound and outbound webhooks.
expected = HMAC_SHA256(secret, timestamp + "." + raw_body)
x-linje-signature = "sha256=<hex>"
`x-linje-inbound-id`, `x-linje-delivery-id`, `x-linje-timestamp`, `x-linje-signature`
Webhook delivery is at least once, so your endpoint should be idempotent.
Projects and domains
Projects give you scoped tokens and sender-domain rules.
Project owners do setup in the portal. Claim sender domains there, publish the DNS records Linje gives you, then attach verified domains and copy the project token for runtime use in your application.
Portal -> Settings
1. Create your first project
2. Claim a sender domain
3. Publish the DNS records
4. Wait for verification, then attach the domain
5. Copy the project token and webhook secret
Use it for `POST /v1/messages`, `GET /v1/messages`, `GET /v1/events`, and `POST /v1/inboxes`.
Use the portal for day-to-day timelines and replay, or call the message/event endpoints directly.
DNS instructions live in the portal so the exact records stay attached to the claim state.
Outbound event webhooks
Projects can receive delivery lifecycle events too.
If a project has an outbound webhook configured, Linje can emit `message.accepted`, `message.delivered`, `message.bounced`, and `message.dead` events.
Boundary
Linje is deliberately not a marketing email platform.
Linje does transactional outbound email and inbound email-to-webhook delivery. It does not do campaigns, audiences, lists, open tracking, click tracking, journeys, visual template building, or business-specific routing rules.
Email delivery, webhook delivery, attempts, bounces, signatures, and replay.
Business logic, customer workflows, extraction, triage, and follow-up actions.
Stable events and artifacts in, explicit API calls and webhooks out.
Reference
Key endpoints.
/v1/messages
Send transactional email
/v1/messages
List outbound messages for one project
/v1/messages/:id
Inspect one message
/v1/inboxes
Create or update an inbound inbox
/v1/inboxes
List inboxes
/v1/events
List delivery events for one project
/v1/events/:id/replay
Replay one outbound webhook event
/v1/inbound/messages/:id
Inspect one inbound message
/v1/inbound/messages/:id/replay
Replay one inbound webhook delivery