Tray.io webhooks

Tray.io webhooks are the HTTP requests a Tray.ai workflow sends to your endpoint through the HTTP Client connector, in whatever shape the workflow builds.

These pages cover requests a Tray workflow sends to your endpoint. To send data into Tray and start a workflow, see Tray's Webhook Trigger docs. Log streaming, which sends workflow logs to an endpoint, is a separate feature and isn't covered here.

How Tray.io webhooks work

A workflow calls your endpoint as soon as it has data, so your app doesn't have to poll for it. The step waits up to 15 minutes for your response. From version 5.0, any status outside 2xx fails the step unless you list other expected codes, and before 5.0 any returned status counts as success.

Tray defines no event types, envelope or version for these requests. The workflow's builder chooses the method, headers and body, which can be raw, form-data, form-urlencoded or binary. To route requests, put an event name and a stable id in the body yourself.

Key facts

Signature header
None (unsigned)
How events are identified
None from Tray: the workflow chooses the body
Body format
SENDER-DEFINED

Content type: application/x-www-form-urlencoded.

Other headers
accept
Agent skill
npx skills add hookdeck/webhook-skills --skill tray-io-webhooks

Verify Tray.io webhooks →

Setting up Tray.io webhooks

  • In a workflow, add an HTTP Client step with the operation you want, usually POST, and set its URL.
  • Choose the raw body type and add a Content-Type: application/json header. With no body type selected, Tray sends application/x-www-form-urlencoded.
  • Tray's cloud can't reach localhost, so test through a public HTTPS URL. hookdeck listen 3000 tray-io gives you one and forwards requests to your machine, then a manual trigger runs the workflow.
  • Resend with a replay from the workflow's logs, which starts a new run. Logs and replay last 7 or 30 days depending on your package.

Delivery behaviour

  1. Your outage fails the workflow

    From version 5.0, a status outside 2xx fails the HTTP Client step, and what happens next depends on its error handling. Choose Manual or Continue deliberately if a run shouldn't stop when your endpoint is down.

    Retries and failed steps →
  2. Errors that never show up

    Before version 5.0, Tray treats any returned status as success, including 403 and 504. On those versions, check the status with a Boolean condition step.

    Make failures visible →
  3. The same request arrives twice

    Tray can retry a failed step, and a replay from the logs runs the workflow again. Put a stable id in the body and deduplicate on it.

    Handle duplicates →
  4. Requests with nothing to route on

    Tray adds no event name, so nothing tells your endpoint which workflow sent a request unless the body says so. Add an event field to every body.

    Name your events →

Tray.io webhook best practices

In this hub

MCP events → How an agent subscribes to Tray.io events as MCP events.
Verify signatures → Signature facts, verification code and common failures.
Production guide → Production problems, such as timeouts and retries, and how to handle them.
Agent skill → Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill tray-io-webhooks

Keep an outage on your side from failing a Tray workflow.

Event Gateway checks the header you set on each request from the step, queues it and retries to your service on your schedule, so your downtime doesn't become a failed step in the workflow.

Not affiliated with Tray.io. Facts are compiled from public sources and linked inline.