Skip to content

Process inbound emails into tickets (POST)

POST
/cron/inbound-email
curl --request POST \
--url https://example.com/api/cron/inbound-email

Scheduled hourly as the inbound-email stage of the hourly-sweeps Slipstream schedule, via scripts/cron-inbound-email.sh. pg_cron is not installed on this project, so a cron.schedule migration would be a silent no-op. Protected by CRON_SECRET via the x-cron-secret header only.

Inbound sweep result

Media type application/json
object
ok
required

False when any row errored or the ledger selection itself failed. A truncated batch is NOT a failure — the next hourly fire takes the rest.

boolean
sweep
required
object
scanned
required

Eligible ledger rows the selection returned.

integer
claimed
required

Rows this sweep took the five-minute lease on.

integer
ticket_created
required
integer
routing_failed
required
integer
processing_failed
required

Rows terminalized because the three-attempt ceiling was passed.

integer
skipped_in_progress
required

Rows another worker holds a LIVE lease on.

integer
skipped_duplicate
required

Rows already terminal.

integer
receipts
required

Receipt outcomes by name (sent, failed, delivery_unknown, skipped, errored). A bad receipt never undoes ticket_created.

object
key
additional properties
integer
errors
required
integer
truncated
required

The batch cap or the internal deadline stopped the sweep with work left over.

boolean
bounds
required
object
limit
required
integer
deadline_ms
required
number

Missing or invalid CRON_SECRET