API Reference

Technical reference for how Juice Machine talks to your destinations.

Per-channel payload formats

Slack, Microsoft Teams, Discord, Email, PagerDuty, and Telegram receive natively-rendered messages — Juice Machine formats each event into the right shape for that channel (Block Kit, Adaptive Card, embed, HTML, Events API v2, etc.) and you don't need to do anything to consume them.

For Generic Webhook destinations, the request body is a versioned JSON envelope. The exact schema, including a complete example, is documented in the Destinations — Generic Webhook section.

If you've configured a customer user lookup URL on the app, the payload also includes a top-level enriched_user key carrying the validated response from your lookup endpoint (name, primary_url, fields, links). It's null when no lookup is configured or the event has no appAccountToken.

Outbound HTTP headers

Headers sent with every Generic Webhook delivery:

Header Description
Content-Type application/json
User-Agent JuiceMachine/1.0 (+https://juicemachine.net)
X-JuiceMachine-Event The Apple event type (e.g. DID_RENEW, APP_STORE_VERSION_STATE_CHANGED). Lets you route without parsing the body.
X-JuiceMachine-Schema-Version The payload schema version (currently 1). Old versions stay supported for as long as you're on them.
X-JuiceMachine-Signature sha256=<hex digest> — an HMAC-SHA256 of the raw request body, keyed with the destination's signing secret. See Authentication for verification code. Omitted for destinations created before signing shipped (they have no secret).

Timeouts

Juice Machine waits up to 30 seconds for a response. Anything slower is treated as a failed delivery and retried.

Expected response

Return any 2xx status to mark the delivery successful. The response body is recorded (truncated to 1KiB) on the delivery row so you can debug your receiver from Juice Machine's dashboard, but its contents don't affect success.

Any 4xx / 5xx response or transport error triggers automatic retries with exponential backoff (1, 4, 16, 64, 256 minutes). After five failed attempts the delivery is marked permanently failed; you can re-send manually from the delivery detail page.