/api/inboundSubmit a message
Validates the message, applies the per-address rate limit (10 runs per 10 minutes by default) and the daily model budget, creates a run and answers 202. Bodies are limited to 16 KB. If the deployment sets TRIAGE_WEBHOOK_SECRET and the request carries X-Triage-Signature (hex HMAC-SHA256 of the raw body), the signature must verify.
Open to anyone. Optionally signed with X-Triage-Signature.
Request body
application/json · InboundRequest
Web form
{
"channel": "web_form",
"name": "Sam Rivera",
"email": "sam@acme.example",
"company": "Acme",
"message": "We are rebranding in March and have set aside a budget of 60,000 USD. Can we talk this week?"
}Email payload
{
"channel": "email",
"from": "Dana Cole <dana@acme.example>",
"subject": "Quote for lifecycle email",
"text": "Hello, we would like a quote for a lifecycle email programme."
}One of the 20 sample messages
{
"channel": "fixture",
"fixtureId": "tallgrass-rebrand"
}curl
curl -sS -X POST "$BASE/api/inbound" \
-H 'content-type: application/json' \
-d '{"channel":"web_form","name":"Sam Rivera","email":"sam@acme.example","company":"Acme","message":"We are rebranding in March and have set aside a budget of 60,000 USD. Can we talk this week?"}'Responses
Accepted. The run has started; follow it through the links.
Headers: Location, RateLimit-Limit, RateLimit-Remaining
Example body
{ "id": "run_k3x9m2qaz7", "status": "queued", "links": { "page": "/runs/run_k3x9m2qaz7", "events": "/api/runs/run_k3x9m2qaz7/events", "run": "/api/runs/run_k3x9m2qaz7" } }The body is not valid JSON.
Example body
{ "error": { "code": "invalid_json", "message": "The request body is not valid JSON." } }A signature was sent and does not match the body.
Example body
{ "error": { "code": "bad_signature", "message": "X-Triage-Signature does not match the request body." } }The fixture id is not one of the 20 samples.
Example body
{ "error": { "code": "unknown_fixture", "message": "Unknown fixture \"nope\"" } }The body is larger than 16 KB.
Example body
{ "error": { "code": "payload_too_large", "message": "Request bodies are limited to 16 KB." } }The body or query did not pass validation.
Example body
{ "error": { "code": "invalid_payload", "message": "The message did not pass validation.", "details": [ { "path": "email", "message": "Invalid input" } ] } }Too many requests from this address in the current window.
Headers: Retry-After, RateLimit-Limit, RateLimit-Remaining
Example body
{ "error": { "code": "rate_limited", "message": "Too many requests: 30 per 10 minutes. Try again in 212 seconds." } }Today's model budget is used up. It resets at 00:00 UTC.
Headers: Retry-After
Example body
{ "error": { "code": "daily_budget_exhausted", "message": "Today's model budget for this demo is used up. It resets at 00:00 UTC." } }