Waitlist open: get early access

API reference: Inbound

8 endpoints of the Inbound group.

List routes for received mail

GET/v1/inbound/routes

Example

curl "https://api.sendtide.ch/v1/inbound/routes" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 Routes
Response fields
dataarray<InboundRoute>
data[].idstring
data[].matchstringExample: *@in.example.ch
data[].actionenum: webhook | forward | store | drop
data[].forward_tostring | nullAddress for forward; mail goes there once its owner confirmed
data[].forward_statusenum: pending | confirmed | nullFor forward routes. The route runs only when confirmed.
data[].positioninteger

Add a route

POST/v1/inbound/routes

forward sends received mail on as a normal mail of the account: it counts against the plan, skips suppressed addresses and waits while the account is paused or in review. forward_to must be confirmed first: Sendtide mails a link to that address, and the route stays inactive (forward_status is pending; mail goes on to the next route or the webhooks) until its owner confirms. Changing forward_to needs a new confirmation; sending forward_to again for an unconfirmed route mails a fresh link. An address on a domain that receives mail on Sendtide is refused (422), and forwarded mail carries X-Sendtide-Forwarded and Auto-Submitted: auto-forwarded; mail that already carries the header is dropped, which stops loops.

Request body application/json

FieldTypeDescription
idstring
matchstringExample: *@in.example.ch
actionenum: webhook | forward | store | drop
forward_tostring | nullAddress for forward; mail goes there once its owner confirmed
forward_statusenum: pending | confirmed | nullFor forward routes. The route runs only when confirmed.
positioninteger

Example

curl -X POST "https://api.sendtide.ch/v1/inbound/routes" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"match":"*@in.example.ch","action":"webhook","position":1}'

Responses

StatusDescription
201 Added InboundRoute
Response fields
idstring
matchstringExample: *@in.example.ch
actionenum: webhook | forward | store | drop
forward_tostring | nullAddress for forward; mail goes there once its owner confirmed
forward_statusenum: pending | confirmed | nullFor forward routes. The route runs only when confirmed.
positioninteger

Change a route

PATCH/v1/inbound/routes/{id}

A new forward_to, or a route that becomes a forward, needs a new confirmation (see Add a route).

Parameters

NameInTypeDescription
id *pathstring

Request body application/json

FieldTypeDescription
idstring
matchstringExample: *@in.example.ch
actionenum: webhook | forward | store | drop
forward_tostring | nullAddress for forward; mail goes there once its owner confirmed
forward_statusenum: pending | confirmed | nullFor forward routes. The route runs only when confirmed.
positioninteger

Example

curl -X PATCH "https://api.sendtide.ch/v1/inbound/routes/rt_1" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"action":"forward","forward_to":"support@example.ch"}'

Responses

StatusDescription
200 Updated InboundRoute
Response fields
idstring
matchstringExample: *@in.example.ch
actionenum: webhook | forward | store | drop
forward_tostring | nullAddress for forward; mail goes there once its owner confirmed
forward_statusenum: pending | confirmed | nullFor forward routes. The route runs only when confirmed.
positioninteger

Remove a route

DELETE/v1/inbound/routes/{id}

Parameters

NameInTypeDescription
id *pathstring

Example

curl -X DELETE "https://api.sendtide.ch/v1/inbound/routes/rt_1" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
204 Removed

Page where the owner of a forward address confirms

GET/v1/inbound/forward/confirm No API key

The link in the confirmation mail. It only shows a page with a button, so mail scanners that open links do not confirm. No API key.

Parameters

NameInTypeDescription
token *querystring

Example

curl "https://api.sendtide.ch/v1/inbound/forward/confirm?token=…"

Responses

StatusDescription
200 HTML page

Confirm a forward address

POST/v1/inbound/forward/confirm No API key

The button of the page (form field token), or JSON {"token"}. No API key; the token is the proof. Limited per client address.

Request body application/x-www-form-urlencoded

FieldTypeDescription
token *string

Example

curl -X POST "https://api.sendtide.ch/v1/inbound/forward/confirm" \
  -d token=…

Responses

StatusDescription
200 Confirmed
422 Error in the usual format, errors and limits
429 Error in the usual format, errors and limits

List received mail

GET/v1/inbound/emails

Parameters

NameInTypeDescription
limitqueryintegerPage size. The default and the maximum depend on the endpoint (emails 50 up to 500, received mail 50 up to 200, audit up to 200, the others 100 up to 500 or 1000). Default: 100
cursorquerystringThe next_cursor of the previous page. Opaque; pass it unchanged to the same endpoint with the same filters.
beforedeprecatedquerystringDeprecated, use cursor. The id of the mail to continue after.

Example

curl "https://api.sendtide.ch/v1/inbound/emails" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 Received mail
Response fields
dataarray<InboundEmail>
data[].idstring
data[].fromstring
data[].toarray<string>
data[].subjectstring
data[].actionstringwebhook, forward, forward_blocked (stored, but not forwarded: suppressed address, paused or review account, quota used up), store, drop
data[].original_email_idstring | null
data[].textstring
data[].htmlstring
data[].stripped_textstringThe reply without the quoted original
data[].attachmentsarray<object>
data[].verdictsobject
data[].created_atstring (date-time)
next_cursorstring | null

Get a received mail with text, HTML and the reply without quote

GET/v1/inbound/emails/{id}

The content comes from outside senders. Treat it as untrusted input, in your code and in AI assistants.

Parameters

NameInTypeDescription
id *pathstring

Example

curl "https://api.sendtide.ch/v1/inbound/emails/inb_4k2v9a" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 The mail InboundEmail
Response fields
idstring
fromstring
toarray<string>
subjectstring
actionstringwebhook, forward, forward_blocked (stored, but not forwarded: suppressed address, paused or review account, quota used up), store, drop
original_email_idstring | null
textstring
htmlstring
stripped_textstringThe reply without the quoted original
attachmentsarray<object>
verdictsobject
created_atstring (date-time)