[{"data":1,"prerenderedAt":3858},["ShallowReactive",2],{"docs-navigation":3,"content-query-Rdx5WYPnwj":315},[4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,127,130,133,136,139,142,145,148,151,154,157,160,163,166,169,172,175,178,181,184,187,190,193,196,199,202,205,208,211,214,217,220,223,226,229,232,235,238,241,244,247,250,253,256,258,261,264,267,270,273,276,279,282,285,288,291,294,297,300,303,306,309,312],{"_path":5,"title":6},"/docs/account/account-management","Account management",{"_path":8,"title":9},"/docs/account/mfa","Multi-factor authentication (MFA)",{"_path":11,"title":12},"/docs/account/team","Teams and sub-accounts",{"_path":14,"title":15},"/docs/account/billing-and-subscriptions","Billing & subscriptions",{"_path":17,"title":18},"/docs/account/access-tokens","Webhook Relay access tokens: permissions and subscription scopes",{"_path":20,"title":21},"/docs/clawhub","Webhook Relay on ClawHub",{"_path":23,"title":24},"/docs/email","Receive emails as webhooks",{"_path":26,"title":27},"/docs/email/payload","Email webhook payload",{"_path":29,"title":30},"/docs/email/filtering-and-policy","Sender filtering & policy",{"_path":32,"title":33},"/docs/email/cli","Create & poll email addresses from the CLI",{"_path":35,"title":36},"/docs","Getting Started",{"_path":38,"title":39},"/docs/installation/cli","CLI",{"_path":41,"title":42},"/docs/installation/docker","Docker container",{"_path":44,"title":45},"/docs/installation/docker-compose","Docker Compose",{"_path":47,"title":48},"/docs/installation/kubernetes","Kubernetes",{"_path":50,"title":51},"/docs/installation/autostart-windows","Autostart (Windows)",{"_path":53,"title":54},"/docs/installation/autostart-linux","Autostart (Linux)",{"_path":56,"title":57},"/docs/installation/autostart-macos","Autostart (MacOS)",{"_path":59,"title":60},"/docs/installation/behind-proxy","HTTP proxy configuration",{"_path":62,"title":63},"/docs/mcp","MCP Server",{"_path":65,"title":66},"/docs/outbound","Outbound Gateway: send webhooks to your customers",{"_path":68,"title":69},"/docs/outbound/setup","Set up the Outbound Gateway",{"_path":71,"title":72},"/docs/outbound/receiving","Receive and verify outbound webhooks",{"_path":74,"title":75},"/docs/outbound/operating","Monitor, retry and recover deliveries",{"_path":77,"title":78},"/docs/security","Security & Tech",{"_path":80,"title":81},"/docs/service-connections","Service Connections",{"_path":83,"title":84},"/docs/service-connections/ai-providers","AI provider connections",{"_path":86,"title":87},"/docs/service-connections/aws_s3","AWS S3",{"_path":89,"title":90},"/docs/service-connections/aws_sns","AWS SNS",{"_path":92,"title":93},"/docs/service-connections/aws_sqs","AWS SQS",{"_path":95,"title":96},"/docs/service-connections/azure","Azure",{"_path":98,"title":99},"/docs/service-connections/gcp_gcs","GCP Cloud Storage",{"_path":101,"title":102},"/docs/service-connections/gcp_pubsub","GCP Pub/Sub",{"_path":104,"title":105},"/docs/service-connections/secrets","Secrets",{"_path":107,"title":108},"/docs/skills","Agent Skills",{"_path":110,"title":111},"/docs/skills-cli","skills.sh — the Agent Skills CLI",{"_path":113,"title":114},"/docs/tunnels/demoing-your-website","Demoing your website",{"_path":116,"title":117},"/docs/tunnels/regions","Regions",{"_path":119,"title":120},"/docs/tutorials/cicd/jenkins-bitbucket","Jenkins and Bitbucket",{"_path":122,"title":123},"/docs/tutorials/cicd/jenkins-github","Jenkins and GitHub",{"_path":125,"title":126},"/docs/tutorials/cicd/jenkins-plugin","Jenkins Plugin",{"_path":128,"title":129},"/docs/tutorials/cicd/jenkins-plugin-multibranch","Jenkins Multibranch Pipelines",{"_path":131,"title":132},"/docs/tutorials/cicd/kubernetes-operator","Kubernetes Operator",{"_path":134,"title":135},"/docs/tutorials/cicd/terraform-atlantis","Terraform Atlantis",{"_path":137,"title":138},"/docs/tutorials/cicd/webhook-exec","Execute scripts on webhook",{"_path":140,"title":141},"/docs/tutorials/edge/home-assistant","Home Assistant",{"_path":143,"title":144},"/docs/tutorials/edge/javascript-app","JavaScript app",{"_path":146,"title":147},"/docs/tutorials/edge/node-red","Node-RED",{"_path":149,"title":150},"/docs/tutorials/email/airtable","Email to Airtable",{"_path":152,"title":153},"/docs/tutorials/email/api","Email to API",{"_path":155,"title":156},"/docs/tutorials/email/database","Email to Database",{"_path":158,"title":159},"/docs/tutorials/email/discord","Email to Discord",{"_path":161,"title":162},"/docs/tutorials/email/google-sheets","Email to Google Sheets",{"_path":164,"title":165},"/docs/tutorials/email/microsoft-teams","Email to Microsoft Teams",{"_path":167,"title":168},"/docs/tutorials/email/notion","Email to Notion",{"_path":170,"title":171},"/docs/tutorials/email/slack","Email to Slack",{"_path":173,"title":174},"/docs/tutorials","Tutorials",{"_path":176,"title":177},"/docs/tutorials/n8n/email-trigger","n8n Email Trigger (Inbound Email)",{"_path":179,"title":180},"/docs/tutorials/n8n/webhook-trigger","n8n Webhook Trigger (No Public IP)",{"_path":182,"title":183},"/docs/tutorials/n8n/whatsapp-cloud-api-webhook","n8n WhatsApp Cloud API Webhook Setup",{"_path":185,"title":186},"/docs/tutorials/transform/docker-to-slack","DockerHub webhook to Slack notification",{"_path":188,"title":189},"/docs/tutorials/transform/enrich-webhooks","Enrich webhooks from APIs",{"_path":191,"title":192},"/docs/tutorials/transform/stripe-to-plain","Sync Stripe subscriptions to Plain.com tenants",{"_path":194,"title":195},"/docs/tutorials/warehouse/bigquery","GCP BigQuery",{"_path":197,"title":198},"/docs/webhooks/alerts","Alerts",{"_path":200,"title":201},"/docs/webhooks/auth/username-password","Username and password",{"_path":203,"title":204},"/docs/webhooks/auth/hmac","HMAC",{"_path":206,"title":207},"/docs/webhooks/auth/jwt","JWT authentication",{"_path":209,"title":210},"/docs/webhooks/auth/http-method","Auth using request method",{"_path":212,"title":213},"/docs/webhooks/cors","CORS for webhooks",{"_path":215,"title":216},"/docs/webhooks/cron/using-cron-webhooks","Schedule recurring webhooks",{"_path":218,"title":219},"/docs/webhooks/custom-domains","Custom webhook domains",{"_path":221,"title":222},"/docs/webhooks/custom-subdomains","Custom webhook subdomains",{"_path":224,"title":225},"/docs/webhooks/custom-webhook-response","Custom response to webhooks",{"_path":227,"title":228},"/docs/webhooks/durable-webhooks","Durable webhooks: reliable delivery with automatic retries",{"_path":230,"title":231},"/docs/webhooks/functions/manipulating-json","JSON encoding",{"_path":233,"title":234},"/docs/webhooks/functions/make-http-request","Make HTTP request",{"_path":236,"title":237},"/docs/webhooks/functions/modify-request","Modify webhook headers, body, method and path",{"_path":239,"title":240},"/docs/webhooks/functions/multipart-form-data","Multipart form to JSON",{"_path":242,"title":243},"/docs/webhooks/functions/url-encoded-data","URL Encoded Form",{"_path":245,"title":246},"/docs/webhooks/functions/working-with-time","Working with time",{"_path":248,"title":249},"/docs/webhooks/functions/send-emails","Sending emails",{"_path":251,"title":252},"/docs/webhooks/functions/crypto-functions","Base64, encryption",{"_path":254,"title":255},"/docs/webhooks/functions/integrate-into-cicd","Integrating into CI/CD",{"_path":257,"title":195},"/docs/webhooks/functions/big-query",{"_path":259,"title":260},"/docs/webhooks/functions/accessing-metadata","Accessing metadata",{"_path":262,"title":263},"/docs/webhooks/functions/response-functions","Response (post-delivery) functions",{"_path":265,"title":266},"/docs/webhooks/functions/alerting","Alerting from functions",{"_path":268,"title":269},"/docs/webhooks/functions/helper-libraries","Helper libraries",{"_path":271,"title":272},"/docs/webhooks/functions/transform-webhook-payload","Transform a webhook payload",{"_path":274,"title":275},"/docs/webhooks/functions/filter-webhooks","Filter or drop webhooks before forwarding",{"_path":277,"title":278},"/docs/webhooks/functions/provider-helpers","Provider-aware function helpers",{"_path":280,"title":281},"/docs/webhooks/functions","Webhook transformations (functions): modify body, headers, method and path",{"_path":283,"title":284},"/docs/webhooks/internal/localhost","Receive webhooks on localhost with the relay CLI",{"_path":286,"title":287},"/docs/webhooks/large-webhooks","Large Webhooks",{"_path":289,"title":290},"/docs/webhooks/outbound-throttling","Outbound throttling: control webhook delivery speed",{"_path":292,"title":293},"/docs/webhooks/polling-webhooks","Polling webhooks with /v1/events",{"_path":295,"title":296},"/docs/webhooks/public/public-destination","Forward to public URL",{"_path":298,"title":299},"/docs/webhooks/public/multiple-destination-urls","Forward webhooks to multiple destinations",{"_path":301,"title":302},"/docs/webhooks/replay-on-agent-connect","Webhook replay on agent connect: recover missed webhooks",{"_path":304,"title":305},"/docs/webhooks/static-ip-address","Static IP Address",{"_path":307,"title":308},"/docs/webhooks/tls-ssl-errors","Fix TLS/SSL handshake errors: unsupported protocol, wrong version number, handshake failure",{"_path":310,"title":311},"/docs/webhooks/websocket-server","Connecting to websocket server",{"_path":313,"title":314},"/docs/webhooks/zero-retention-buckets","Zero Retention Buckets",{"_path":68,"_dir":316,"_draft":317,"_partial":317,"_locale":318,"title":69,"description":319,"intro":320,"layout":321,"tags":322,"faq":328,"body":341,"_type":3851,"_id":3852,"_source":3853,"_file":3854,"_stem":3855,"_extension":3856,"sitemap":3857},"outbound",false,"","Step-by-step setup for sending webhooks to your customers with Webhook Relay: access token, event types, consumers, endpoints and publishing with an idempotency key. Examples in curl, JavaScript and Go.","Register your event types and each customer's endpoint once, then publish a message whenever an event happens. Every step works through the dashboard, the REST API, the TypeScript and Go SDKs, and MCP.","doc",[323,324,325,326,327],"Outbound webhooks","Outbound Gateway","Send webhooks","Idempotency key","Webhook API",[329,332,335,338],{"q":330,"a":331},"Which credential should my backend use to publish outbound webhooks?","Use a standalone access token restricted to outbound operations. Choose 'Outbound: publish only' for a service that only publishes messages, and 'Outbound: manage' for code that also creates consumers and endpoints. A restricted token can only call /v1/outbound routes and the outbound MCP tools. It needs the Member role or higher to make changes; a Viewer token can only read.",{"q":333,"a":334},"What happens if I publish the same message twice?","If both calls send the same Idempotency-Key header with the same consumer, event type, event ID and payload, the second call returns the original receipt and nothing is published again. Reusing a key with different content is rejected with 409 Conflict. Without a key, every call publishes a new message.",{"q":336,"a":337},"Do I have to create event types before publishing?","No. An event type that is not in your catalog is added the first time you publish it. However, an endpoint can only subscribe to event types that already exist (or to all of them with *), so creating event types first is usually simpler. Deprecated event types cannot be published.",{"q":339,"a":340},"Does an endpoint receive messages published before it was created?","No. When a message is accepted, Webhook Relay records which of the consumer's endpoints subscribe to its event type. Endpoints added or subscribed later receive only messages published after the change.",{"type":342,"children":343,"toc":3837},"root",[344,408,415,435,464,537,558,564,585,681,714,719,774,779,785,798,934,953,959,996,1089,1094,1100,1134,1256,1261,1433,1438,1652,1664,1670,1699,1846,1859,1997,2018,2142,2148,2159,2212,2218,2225,2261,2746,2752,2763,3767,3796,3802,3831],{"type":345,"tag":346,"props":347,"children":348},"element","p",{},[349,356,358,365,367,376,378,384,386,393,394,400,402,406],{"type":345,"tag":350,"props":351,"children":352},"strong",{},[353],{"type":354,"value":355},"text","To send your first outbound webhook, create an outbound access token, add an event type and a consumer, register the consumer's HTTPS endpoint, then publish a message with an idempotency key.",{"type":354,"value":357}," Every step below shows the REST call with ",{"type":345,"tag":359,"props":360,"children":362},"code",{"className":361},[],[363],{"type":354,"value":364},"curl",{"type":354,"value":366},", followed by the same flow using the ",{"type":345,"tag":368,"props":369,"children":373},"a",{"href":370,"rel":371},"https://github.com/webhookrelay/webhookrelay-js",[372],"nofollow",[374],{"type":354,"value":375},"TypeScript SDK",{"type":354,"value":377}," (",{"type":345,"tag":359,"props":379,"children":381},{"className":380},[],[382],{"type":354,"value":383},"@webhookrelay/sdk",{"type":354,"value":385},") and the ",{"type":345,"tag":368,"props":387,"children":390},{"href":388,"rel":389},"https://github.com/webhookrelay/webhookrelay-go",[372],[391],{"type":354,"value":392},"Go SDK",{"type":354,"value":377},{"type":345,"tag":359,"props":395,"children":397},{"className":396},[],[398],{"type":354,"value":399},"webhookrelay-go",{"type":354,"value":401},"). You can also do all of this from the ",{"type":345,"tag":350,"props":403,"children":404},{},[405],{"type":354,"value":323},{"type":354,"value":407}," page in the dashboard, or ask the dashboard agent.",{"type":345,"tag":409,"props":410,"children":412},"h2",{"id":411},"_1-request-access",[413],{"type":354,"value":414},"1. Request access",{"type":345,"tag":346,"props":416,"children":417},{},[418,420,426,428,433],{"type":354,"value":419},"The Outbound Gateway is in early access. Open ",{"type":345,"tag":368,"props":421,"children":424},{"href":422,"rel":423},"https://my.webhookrelay.com/outbound",[372],[425],{"type":354,"value":323},{"type":354,"value":427}," in the dashboard and click ",{"type":345,"tag":350,"props":429,"children":430},{},[431],{"type":354,"value":432},"Request to enable",{"type":354,"value":434},". This opens a support ticket, and we reply there when the feature is on.",{"type":345,"tag":346,"props":436,"children":437},{},[438,440,446,448,454,456,462],{"type":354,"value":439},"You can check the status from code. ",{"type":345,"tag":359,"props":441,"children":443},{"className":442},[],[444],{"type":354,"value":445},"enabled",{"type":354,"value":447}," is ",{"type":345,"tag":359,"props":449,"children":451},{"className":450},[],[452],{"type":354,"value":453},"true",{"type":354,"value":455}," once the feature is turned on, and ",{"type":345,"tag":359,"props":457,"children":459},{"className":458},[],[460],{"type":354,"value":461},"POST /v1/outbound/access/request",{"type":354,"value":463}," makes the same request as the button:",{"type":345,"tag":465,"props":466,"children":467},"code-block",{},[468],{"type":345,"tag":469,"props":470,"children":474},"pre",{"className":471,"code":472,"language":473,"meta":318,"style":318},"language-bash shiki shiki-themes github-dark","curl --user \"$RELAY_KEY:$RELAY_SECRET\" https://my.webhookrelay.com/v1/outbound/access\n# {\"enabled\":true}\n","bash",[475],{"type":345,"tag":359,"props":476,"children":477},{"__ignoreMap":318},[478,527],{"type":345,"tag":479,"props":480,"children":483},"span",{"class":481,"line":482},"line",1,[484,489,495,501,507,512,517,522],{"type":345,"tag":479,"props":485,"children":487},{"style":486},"--shiki-default:#B392F0",[488],{"type":354,"value":364},{"type":345,"tag":479,"props":490,"children":492},{"style":491},"--shiki-default:#79B8FF",[493],{"type":354,"value":494}," --user",{"type":345,"tag":479,"props":496,"children":498},{"style":497},"--shiki-default:#9ECBFF",[499],{"type":354,"value":500}," \"",{"type":345,"tag":479,"props":502,"children":504},{"style":503},"--shiki-default:#E1E4E8",[505],{"type":354,"value":506},"$RELAY_KEY",{"type":345,"tag":479,"props":508,"children":509},{"style":497},[510],{"type":354,"value":511},":",{"type":345,"tag":479,"props":513,"children":514},{"style":503},[515],{"type":354,"value":516},"$RELAY_SECRET",{"type":345,"tag":479,"props":518,"children":519},{"style":497},[520],{"type":354,"value":521},"\"",{"type":345,"tag":479,"props":523,"children":524},{"style":497},[525],{"type":354,"value":526}," https://my.webhookrelay.com/v1/outbound/access\n",{"type":345,"tag":479,"props":528,"children":530},{"class":481,"line":529},2,[531],{"type":345,"tag":479,"props":532,"children":534},{"style":533},"--shiki-default:#6A737D",[535],{"type":354,"value":536},"# {\"enabled\":true}\n",{"type":345,"tag":346,"props":538,"children":539},{},[540,542,548,550,556],{"type":354,"value":541},"Until access is enabled, every other ",{"type":345,"tag":359,"props":543,"children":545},{"className":544},[],[546],{"type":354,"value":547},"/v1/outbound",{"type":354,"value":549}," route returns ",{"type":345,"tag":359,"props":551,"children":553},{"className":552},[],[554],{"type":354,"value":555},"403",{"type":354,"value":557},".",{"type":345,"tag":409,"props":559,"children":561},{"id":560},"_2-create-an-access-token",[562],{"type":354,"value":563},"2. Create an access token",{"type":345,"tag":346,"props":565,"children":566},{},[567,569,576,578,583],{"type":354,"value":568},"Create a standalone token on the ",{"type":345,"tag":368,"props":570,"children":573},{"href":571,"rel":572},"https://my.webhookrelay.com/tokens",[372],[574],{"type":354,"value":575},"Access Tokens",{"type":354,"value":577}," page. Once the Outbound Gateway is enabled, the token form has an ",{"type":345,"tag":350,"props":579,"children":580},{},[581],{"type":354,"value":582},"Outbound",{"type":354,"value":584}," option that restricts the token to the outbound API:",{"type":345,"tag":586,"props":587,"children":588},"table",{},[589,613],{"type":345,"tag":590,"props":591,"children":592},"thead",{},[593],{"type":345,"tag":594,"props":595,"children":596},"tr",{},[597,603,608],{"type":345,"tag":598,"props":599,"children":600},"th",{},[601],{"type":354,"value":602},"Restriction",{"type":345,"tag":598,"props":604,"children":605},{},[606],{"type":354,"value":607},"Allows",{"type":345,"tag":598,"props":609,"children":610},{},[611],{"type":354,"value":612},"Use it for",{"type":345,"tag":614,"props":615,"children":616},"tbody",{},[617,639,660],{"type":345,"tag":594,"props":618,"children":619},{},[620,629,634],{"type":345,"tag":621,"props":622,"children":623},"td",{},[624],{"type":345,"tag":350,"props":625,"children":626},{},[627],{"type":354,"value":628},"Outbound: publish only",{"type":345,"tag":621,"props":630,"children":631},{},[632],{"type":354,"value":633},"Publishing messages",{"type":345,"tag":621,"props":635,"children":636},{},[637],{"type":354,"value":638},"The service that emits events",{"type":345,"tag":594,"props":640,"children":641},{},[642,650,655],{"type":345,"tag":621,"props":643,"children":644},{},[645],{"type":345,"tag":350,"props":646,"children":647},{},[648],{"type":354,"value":649},"Outbound: read",{"type":345,"tag":621,"props":651,"children":652},{},[653],{"type":354,"value":654},"Reading configuration, messages and deliveries",{"type":345,"tag":621,"props":656,"children":657},{},[658],{"type":354,"value":659},"Dashboards and support tooling",{"type":345,"tag":594,"props":661,"children":662},{},[663,671,676],{"type":345,"tag":621,"props":664,"children":665},{},[666],{"type":345,"tag":350,"props":667,"children":668},{},[669],{"type":354,"value":670},"Outbound: manage",{"type":345,"tag":621,"props":672,"children":673},{},[674],{"type":354,"value":675},"Every outbound operation",{"type":345,"tag":621,"props":677,"children":678},{},[679],{"type":354,"value":680},"Onboarding code that creates consumers and endpoints",{"type":345,"tag":346,"props":682,"children":683},{},[684,686,691,693,698,700,705,707,713],{"type":354,"value":685},"An outbound-restricted token can't call any other Webhook Relay API or subscribe to buckets or tunnels. Its permission role is still an upper limit: making changes or publishing requires ",{"type":345,"tag":350,"props":687,"children":688},{},[689],{"type":354,"value":690},"Member",{"type":354,"value":692}," or higher, while ",{"type":345,"tag":350,"props":694,"children":695},{},[696],{"type":354,"value":697},"Viewer",{"type":354,"value":699}," can only read. See ",{"type":345,"tag":368,"props":701,"children":702},{"href":17},[703],{"type":354,"value":704},"access tokens",{"type":354,"value":706}," for roles and the token REST API, where the same restriction is set as ",{"type":345,"tag":359,"props":708,"children":710},{"className":709},[],[711],{"type":354,"value":712},"\"permissions\": { \"role\": \"member\", \"outbound\": \"publish\" }",{"type":354,"value":557},{"type":345,"tag":346,"props":715,"children":716},{},[717],{"type":354,"value":718},"Tokens are a key and a secret, sent with HTTP Basic authentication. The examples below read them from the environment:",{"type":345,"tag":465,"props":720,"children":721},{},[722],{"type":345,"tag":469,"props":723,"children":725},{"className":471,"code":724,"language":473,"meta":318,"style":318},"export RELAY_KEY=YOUR_TOKEN_KEY\nexport RELAY_SECRET=YOUR_TOKEN_SECRET\n",[726],{"type":345,"tag":359,"props":727,"children":728},{"__ignoreMap":318},[729,753],{"type":345,"tag":479,"props":730,"children":731},{"class":481,"line":482},[732,738,743,748],{"type":345,"tag":479,"props":733,"children":735},{"style":734},"--shiki-default:#F97583",[736],{"type":354,"value":737},"export",{"type":345,"tag":479,"props":739,"children":740},{"style":503},[741],{"type":354,"value":742}," RELAY_KEY",{"type":345,"tag":479,"props":744,"children":745},{"style":734},[746],{"type":354,"value":747},"=",{"type":345,"tag":479,"props":749,"children":750},{"style":503},[751],{"type":354,"value":752},"YOUR_TOKEN_KEY\n",{"type":345,"tag":479,"props":754,"children":755},{"class":481,"line":529},[756,760,765,769],{"type":345,"tag":479,"props":757,"children":758},{"style":734},[759],{"type":354,"value":737},{"type":345,"tag":479,"props":761,"children":762},{"style":503},[763],{"type":354,"value":764}," RELAY_SECRET",{"type":345,"tag":479,"props":766,"children":767},{"style":734},[768],{"type":354,"value":747},{"type":345,"tag":479,"props":770,"children":771},{"style":503},[772],{"type":354,"value":773},"YOUR_TOKEN_SECRET\n",{"type":345,"tag":346,"props":775,"children":776},{},[777],{"type":354,"value":778},"Keep these credentials server-side; never publish from a browser or mobile app.",{"type":345,"tag":409,"props":780,"children":782},{"id":781},"_3-create-event-types",[783],{"type":354,"value":784},"3. Create event types",{"type":345,"tag":346,"props":786,"children":787},{},[788,790,796],{"type":354,"value":789},"Event types make up your catalog. Endpoints subscribe to them by name. Names can use up to 128 letters, numbers, dots, colons, underscores and hyphens. An optional ",{"type":345,"tag":359,"props":791,"children":793},{"className":792},[],[794],{"type":354,"value":795},"example",{"type":354,"value":797}," payload (up to 64 KiB) documents the event.",{"type":345,"tag":465,"props":799,"children":800},{},[801],{"type":345,"tag":469,"props":802,"children":804},{"className":471,"code":803,"language":473,"meta":318,"style":318},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -X POST https://my.webhookrelay.com/v1/outbound/event-types \\\n  -d '{\n    \"name\": \"invoice.paid\",\n    \"description\": \"An invoice was paid\",\n    \"example\": { \"invoice_id\": \"inv_123\", \"amount\": 4900 }\n  }'\n",[805],{"type":345,"tag":359,"props":806,"children":807},{"__ignoreMap":318},[808,844,861,884,898,907,916,925],{"type":345,"tag":479,"props":809,"children":810},{"class":481,"line":482},[811,815,819,823,827,831,835,839],{"type":345,"tag":479,"props":812,"children":813},{"style":486},[814],{"type":354,"value":364},{"type":345,"tag":479,"props":816,"children":817},{"style":491},[818],{"type":354,"value":494},{"type":345,"tag":479,"props":820,"children":821},{"style":497},[822],{"type":354,"value":500},{"type":345,"tag":479,"props":824,"children":825},{"style":503},[826],{"type":354,"value":506},{"type":345,"tag":479,"props":828,"children":829},{"style":497},[830],{"type":354,"value":511},{"type":345,"tag":479,"props":832,"children":833},{"style":503},[834],{"type":354,"value":516},{"type":345,"tag":479,"props":836,"children":837},{"style":497},[838],{"type":354,"value":521},{"type":345,"tag":479,"props":840,"children":841},{"style":491},[842],{"type":354,"value":843}," \\\n",{"type":345,"tag":479,"props":845,"children":846},{"class":481,"line":529},[847,852,857],{"type":345,"tag":479,"props":848,"children":849},{"style":491},[850],{"type":354,"value":851},"  -H",{"type":345,"tag":479,"props":853,"children":854},{"style":497},[855],{"type":354,"value":856}," 'Content-Type: application/json'",{"type":345,"tag":479,"props":858,"children":859},{"style":491},[860],{"type":354,"value":843},{"type":345,"tag":479,"props":862,"children":864},{"class":481,"line":863},3,[865,870,875,880],{"type":345,"tag":479,"props":866,"children":867},{"style":491},[868],{"type":354,"value":869},"  -X",{"type":345,"tag":479,"props":871,"children":872},{"style":497},[873],{"type":354,"value":874}," POST",{"type":345,"tag":479,"props":876,"children":877},{"style":497},[878],{"type":354,"value":879}," https://my.webhookrelay.com/v1/outbound/event-types",{"type":345,"tag":479,"props":881,"children":882},{"style":491},[883],{"type":354,"value":843},{"type":345,"tag":479,"props":885,"children":887},{"class":481,"line":886},4,[888,893],{"type":345,"tag":479,"props":889,"children":890},{"style":491},[891],{"type":354,"value":892},"  -d",{"type":345,"tag":479,"props":894,"children":895},{"style":497},[896],{"type":354,"value":897}," '{\n",{"type":345,"tag":479,"props":899,"children":901},{"class":481,"line":900},5,[902],{"type":345,"tag":479,"props":903,"children":904},{"style":497},[905],{"type":354,"value":906},"    \"name\": \"invoice.paid\",\n",{"type":345,"tag":479,"props":908,"children":910},{"class":481,"line":909},6,[911],{"type":345,"tag":479,"props":912,"children":913},{"style":497},[914],{"type":354,"value":915},"    \"description\": \"An invoice was paid\",\n",{"type":345,"tag":479,"props":917,"children":919},{"class":481,"line":918},7,[920],{"type":345,"tag":479,"props":921,"children":922},{"style":497},[923],{"type":354,"value":924},"    \"example\": { \"invoice_id\": \"inv_123\", \"amount\": 4900 }\n",{"type":345,"tag":479,"props":926,"children":928},{"class":481,"line":927},8,[929],{"type":345,"tag":479,"props":930,"children":931},{"style":497},[932],{"type":354,"value":933},"  }'\n",{"type":345,"tag":346,"props":935,"children":936},{},[937,943,945,951],{"type":345,"tag":359,"props":938,"children":940},{"className":939},[],[941],{"type":354,"value":942},"PUT /v1/outbound/event-types/{name}",{"type":354,"value":944}," creates or updates an event type. Set ",{"type":345,"tag":359,"props":946,"children":948},{"className":947},[],[949],{"type":354,"value":950},"\"deprecated\": true",{"type":354,"value":952}," to stop new messages of that type from being published.",{"type":345,"tag":409,"props":954,"children":956},{"id":955},"_4-create-a-consumer",[957],{"type":354,"value":958},"4. Create a consumer",{"type":345,"tag":346,"props":960,"children":961},{},[962,964,970,972,978,980,986,988,994],{"type":354,"value":963},"A consumer is one of your customers. Use your own customer ID as the consumer ID. ",{"type":345,"tag":359,"props":965,"children":967},{"className":966},[],[968],{"type":354,"value":969},"PUT",{"type":354,"value":971}," creates the consumer or updates its ",{"type":345,"tag":359,"props":973,"children":975},{"className":974},[],[976],{"type":354,"value":977},"name",{"type":354,"value":979}," and default ",{"type":345,"tag":359,"props":981,"children":983},{"className":982},[],[984],{"type":354,"value":985},"rate",{"type":354,"value":987}," (deliveries per second for its endpoints; ",{"type":345,"tag":359,"props":989,"children":991},{"className":990},[],[992],{"type":354,"value":993},"0",{"type":354,"value":995}," means 50).",{"type":345,"tag":465,"props":997,"children":998},{},[999],{"type":345,"tag":469,"props":1000,"children":1002},{"className":471,"code":1001,"language":473,"meta":318,"style":318},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -X PUT https://my.webhookrelay.com/v1/outbound/consumers/customer_42 \\\n  -d '{ \"name\": \"Acme\" }'\n",[1003],{"type":345,"tag":359,"props":1004,"children":1005},{"__ignoreMap":318},[1006,1041,1056,1077],{"type":345,"tag":479,"props":1007,"children":1008},{"class":481,"line":482},[1009,1013,1017,1021,1025,1029,1033,1037],{"type":345,"tag":479,"props":1010,"children":1011},{"style":486},[1012],{"type":354,"value":364},{"type":345,"tag":479,"props":1014,"children":1015},{"style":491},[1016],{"type":354,"value":494},{"type":345,"tag":479,"props":1018,"children":1019},{"style":497},[1020],{"type":354,"value":500},{"type":345,"tag":479,"props":1022,"children":1023},{"style":503},[1024],{"type":354,"value":506},{"type":345,"tag":479,"props":1026,"children":1027},{"style":497},[1028],{"type":354,"value":511},{"type":345,"tag":479,"props":1030,"children":1031},{"style":503},[1032],{"type":354,"value":516},{"type":345,"tag":479,"props":1034,"children":1035},{"style":497},[1036],{"type":354,"value":521},{"type":345,"tag":479,"props":1038,"children":1039},{"style":491},[1040],{"type":354,"value":843},{"type":345,"tag":479,"props":1042,"children":1043},{"class":481,"line":529},[1044,1048,1052],{"type":345,"tag":479,"props":1045,"children":1046},{"style":491},[1047],{"type":354,"value":851},{"type":345,"tag":479,"props":1049,"children":1050},{"style":497},[1051],{"type":354,"value":856},{"type":345,"tag":479,"props":1053,"children":1054},{"style":491},[1055],{"type":354,"value":843},{"type":345,"tag":479,"props":1057,"children":1058},{"class":481,"line":863},[1059,1063,1068,1073],{"type":345,"tag":479,"props":1060,"children":1061},{"style":491},[1062],{"type":354,"value":869},{"type":345,"tag":479,"props":1064,"children":1065},{"style":497},[1066],{"type":354,"value":1067}," PUT",{"type":345,"tag":479,"props":1069,"children":1070},{"style":497},[1071],{"type":354,"value":1072}," https://my.webhookrelay.com/v1/outbound/consumers/customer_42",{"type":345,"tag":479,"props":1074,"children":1075},{"style":491},[1076],{"type":354,"value":843},{"type":345,"tag":479,"props":1078,"children":1079},{"class":481,"line":886},[1080,1084],{"type":345,"tag":479,"props":1081,"children":1082},{"style":491},[1083],{"type":354,"value":892},{"type":345,"tag":479,"props":1085,"children":1086},{"style":497},[1087],{"type":354,"value":1088}," '{ \"name\": \"Acme\" }'\n",{"type":345,"tag":346,"props":1090,"children":1091},{},[1092],{"type":354,"value":1093},"A deleted consumer's ID can't be reused, so its delivery history always stays unambiguous.",{"type":345,"tag":409,"props":1095,"children":1097},{"id":1096},"_5-add-the-consumers-endpoint",[1098],{"type":354,"value":1099},"5. Add the consumer's endpoint",{"type":345,"tag":346,"props":1101,"children":1102},{},[1103,1105,1111,1113,1126,1128,1133],{"type":354,"value":1104},"Register the HTTPS URL your customer gives you and the event types it should receive (",{"type":345,"tag":359,"props":1106,"children":1108},{"className":1107},[],[1109],{"type":354,"value":1110},"[\"*\"]",{"type":354,"value":1112}," subscribes to all event types). ",{"type":345,"tag":350,"props":1114,"children":1115},{},[1116,1118,1124],{"type":354,"value":1117},"The response includes the endpoint's signing secret (",{"type":345,"tag":359,"props":1119,"children":1121},{"className":1120},[],[1122],{"type":354,"value":1123},"whsec_…",{"type":354,"value":1125},").",{"type":354,"value":1127}," Give it to your customer so they can ",{"type":345,"tag":368,"props":1129,"children":1130},{"href":71},[1131],{"type":354,"value":1132},"verify deliveries",{"type":354,"value":557},{"type":345,"tag":465,"props":1135,"children":1136},{},[1137],{"type":345,"tag":469,"props":1138,"children":1140},{"className":471,"code":1139,"language":473,"meta":318,"style":318},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -X POST https://my.webhookrelay.com/v1/outbound/consumers/customer_42/endpoints \\\n  -d '{\n    \"url\": \"https://acme.example/webhooks\",\n    \"event_types\": [\"invoice.paid\"],\n    \"auto_disable\": true\n  }'\n",[1141],{"type":345,"tag":359,"props":1142,"children":1143},{"__ignoreMap":318},[1144,1179,1194,1214,1225,1233,1241,1249],{"type":345,"tag":479,"props":1145,"children":1146},{"class":481,"line":482},[1147,1151,1155,1159,1163,1167,1171,1175],{"type":345,"tag":479,"props":1148,"children":1149},{"style":486},[1150],{"type":354,"value":364},{"type":345,"tag":479,"props":1152,"children":1153},{"style":491},[1154],{"type":354,"value":494},{"type":345,"tag":479,"props":1156,"children":1157},{"style":497},[1158],{"type":354,"value":500},{"type":345,"tag":479,"props":1160,"children":1161},{"style":503},[1162],{"type":354,"value":506},{"type":345,"tag":479,"props":1164,"children":1165},{"style":497},[1166],{"type":354,"value":511},{"type":345,"tag":479,"props":1168,"children":1169},{"style":503},[1170],{"type":354,"value":516},{"type":345,"tag":479,"props":1172,"children":1173},{"style":497},[1174],{"type":354,"value":521},{"type":345,"tag":479,"props":1176,"children":1177},{"style":491},[1178],{"type":354,"value":843},{"type":345,"tag":479,"props":1180,"children":1181},{"class":481,"line":529},[1182,1186,1190],{"type":345,"tag":479,"props":1183,"children":1184},{"style":491},[1185],{"type":354,"value":851},{"type":345,"tag":479,"props":1187,"children":1188},{"style":497},[1189],{"type":354,"value":856},{"type":345,"tag":479,"props":1191,"children":1192},{"style":491},[1193],{"type":354,"value":843},{"type":345,"tag":479,"props":1195,"children":1196},{"class":481,"line":863},[1197,1201,1205,1210],{"type":345,"tag":479,"props":1198,"children":1199},{"style":491},[1200],{"type":354,"value":869},{"type":345,"tag":479,"props":1202,"children":1203},{"style":497},[1204],{"type":354,"value":874},{"type":345,"tag":479,"props":1206,"children":1207},{"style":497},[1208],{"type":354,"value":1209}," https://my.webhookrelay.com/v1/outbound/consumers/customer_42/endpoints",{"type":345,"tag":479,"props":1211,"children":1212},{"style":491},[1213],{"type":354,"value":843},{"type":345,"tag":479,"props":1215,"children":1216},{"class":481,"line":886},[1217,1221],{"type":345,"tag":479,"props":1218,"children":1219},{"style":491},[1220],{"type":354,"value":892},{"type":345,"tag":479,"props":1222,"children":1223},{"style":497},[1224],{"type":354,"value":897},{"type":345,"tag":479,"props":1226,"children":1227},{"class":481,"line":900},[1228],{"type":345,"tag":479,"props":1229,"children":1230},{"style":497},[1231],{"type":354,"value":1232},"    \"url\": \"https://acme.example/webhooks\",\n",{"type":345,"tag":479,"props":1234,"children":1235},{"class":481,"line":909},[1236],{"type":345,"tag":479,"props":1237,"children":1238},{"style":497},[1239],{"type":354,"value":1240},"    \"event_types\": [\"invoice.paid\"],\n",{"type":345,"tag":479,"props":1242,"children":1243},{"class":481,"line":918},[1244],{"type":345,"tag":479,"props":1245,"children":1246},{"style":497},[1247],{"type":354,"value":1248},"    \"auto_disable\": true\n",{"type":345,"tag":479,"props":1250,"children":1251},{"class":481,"line":927},[1252],{"type":345,"tag":479,"props":1253,"children":1254},{"style":497},[1255],{"type":354,"value":933},{"type":345,"tag":346,"props":1257,"children":1258},{},[1259],{"type":354,"value":1260},"The response (abridged) carries the secret:",{"type":345,"tag":469,"props":1262,"children":1266},{"className":1263,"code":1264,"language":1265,"meta":318,"style":318},"language-json shiki shiki-themes github-dark","{\n  \"id\": \"6f0c2c0e-5a3b-4f43-9d0a-4c4f7d7a2b11\",\n  \"consumer\": \"customer_42\",\n  \"url\": \"https://acme.example/webhooks\",\n  \"event_types\": [\"invoice.paid\"],\n  \"state\": \"active\",\n  \"auto_disable\": true,\n  \"secret\": \"whsec_…\"\n}\n","json",[1267],{"type":345,"tag":359,"props":1268,"children":1269},{"__ignoreMap":318},[1270,1278,1301,1322,1343,1366,1387,1407,1424],{"type":345,"tag":479,"props":1271,"children":1272},{"class":481,"line":482},[1273],{"type":345,"tag":479,"props":1274,"children":1275},{"style":503},[1276],{"type":354,"value":1277},"{\n",{"type":345,"tag":479,"props":1279,"children":1280},{"class":481,"line":529},[1281,1286,1291,1296],{"type":345,"tag":479,"props":1282,"children":1283},{"style":491},[1284],{"type":354,"value":1285},"  \"id\"",{"type":345,"tag":479,"props":1287,"children":1288},{"style":503},[1289],{"type":354,"value":1290},": ",{"type":345,"tag":479,"props":1292,"children":1293},{"style":497},[1294],{"type":354,"value":1295},"\"6f0c2c0e-5a3b-4f43-9d0a-4c4f7d7a2b11\"",{"type":345,"tag":479,"props":1297,"children":1298},{"style":503},[1299],{"type":354,"value":1300},",\n",{"type":345,"tag":479,"props":1302,"children":1303},{"class":481,"line":863},[1304,1309,1313,1318],{"type":345,"tag":479,"props":1305,"children":1306},{"style":491},[1307],{"type":354,"value":1308},"  \"consumer\"",{"type":345,"tag":479,"props":1310,"children":1311},{"style":503},[1312],{"type":354,"value":1290},{"type":345,"tag":479,"props":1314,"children":1315},{"style":497},[1316],{"type":354,"value":1317},"\"customer_42\"",{"type":345,"tag":479,"props":1319,"children":1320},{"style":503},[1321],{"type":354,"value":1300},{"type":345,"tag":479,"props":1323,"children":1324},{"class":481,"line":886},[1325,1330,1334,1339],{"type":345,"tag":479,"props":1326,"children":1327},{"style":491},[1328],{"type":354,"value":1329},"  \"url\"",{"type":345,"tag":479,"props":1331,"children":1332},{"style":503},[1333],{"type":354,"value":1290},{"type":345,"tag":479,"props":1335,"children":1336},{"style":497},[1337],{"type":354,"value":1338},"\"https://acme.example/webhooks\"",{"type":345,"tag":479,"props":1340,"children":1341},{"style":503},[1342],{"type":354,"value":1300},{"type":345,"tag":479,"props":1344,"children":1345},{"class":481,"line":900},[1346,1351,1356,1361],{"type":345,"tag":479,"props":1347,"children":1348},{"style":491},[1349],{"type":354,"value":1350},"  \"event_types\"",{"type":345,"tag":479,"props":1352,"children":1353},{"style":503},[1354],{"type":354,"value":1355},": [",{"type":345,"tag":479,"props":1357,"children":1358},{"style":497},[1359],{"type":354,"value":1360},"\"invoice.paid\"",{"type":345,"tag":479,"props":1362,"children":1363},{"style":503},[1364],{"type":354,"value":1365},"],\n",{"type":345,"tag":479,"props":1367,"children":1368},{"class":481,"line":909},[1369,1374,1378,1383],{"type":345,"tag":479,"props":1370,"children":1371},{"style":491},[1372],{"type":354,"value":1373},"  \"state\"",{"type":345,"tag":479,"props":1375,"children":1376},{"style":503},[1377],{"type":354,"value":1290},{"type":345,"tag":479,"props":1379,"children":1380},{"style":497},[1381],{"type":354,"value":1382},"\"active\"",{"type":345,"tag":479,"props":1384,"children":1385},{"style":503},[1386],{"type":354,"value":1300},{"type":345,"tag":479,"props":1388,"children":1389},{"class":481,"line":918},[1390,1395,1399,1403],{"type":345,"tag":479,"props":1391,"children":1392},{"style":491},[1393],{"type":354,"value":1394},"  \"auto_disable\"",{"type":345,"tag":479,"props":1396,"children":1397},{"style":503},[1398],{"type":354,"value":1290},{"type":345,"tag":479,"props":1400,"children":1401},{"style":491},[1402],{"type":354,"value":453},{"type":345,"tag":479,"props":1404,"children":1405},{"style":503},[1406],{"type":354,"value":1300},{"type":345,"tag":479,"props":1408,"children":1409},{"class":481,"line":927},[1410,1415,1419],{"type":345,"tag":479,"props":1411,"children":1412},{"style":491},[1413],{"type":354,"value":1414},"  \"secret\"",{"type":345,"tag":479,"props":1416,"children":1417},{"style":503},[1418],{"type":354,"value":1290},{"type":345,"tag":479,"props":1420,"children":1421},{"style":497},[1422],{"type":354,"value":1423},"\"whsec_…\"\n",{"type":345,"tag":479,"props":1425,"children":1427},{"class":481,"line":1426},9,[1428],{"type":345,"tag":479,"props":1429,"children":1430},{"style":503},[1431],{"type":354,"value":1432},"}\n",{"type":345,"tag":346,"props":1434,"children":1435},{},[1436],{"type":354,"value":1437},"Optional endpoint fields:",{"type":345,"tag":586,"props":1439,"children":1440},{},[1441,1462],{"type":345,"tag":590,"props":1442,"children":1443},{},[1444],{"type":345,"tag":594,"props":1445,"children":1446},{},[1447,1452,1457],{"type":345,"tag":598,"props":1448,"children":1449},{},[1450],{"type":354,"value":1451},"Field",{"type":345,"tag":598,"props":1453,"children":1454},{},[1455],{"type":354,"value":1456},"Default",{"type":345,"tag":598,"props":1458,"children":1459},{},[1460],{"type":354,"value":1461},"Notes",{"type":345,"tag":614,"props":1463,"children":1464},{},[1465,1487,1547,1575,1597,1623],{"type":345,"tag":594,"props":1466,"children":1467},{},[1468,1477,1482],{"type":345,"tag":621,"props":1469,"children":1470},{},[1471],{"type":345,"tag":359,"props":1472,"children":1474},{"className":1473},[],[1475],{"type":354,"value":1476},"description",{"type":345,"tag":621,"props":1478,"children":1479},{},[1480],{"type":354,"value":1481},"empty",{"type":345,"tag":621,"props":1483,"children":1484},{},[1485],{"type":354,"value":1486},"Up to 2,000 characters.",{"type":345,"tag":594,"props":1488,"children":1489},{},[1490,1499,1504],{"type":345,"tag":621,"props":1491,"children":1492},{},[1493],{"type":345,"tag":359,"props":1494,"children":1496},{"className":1495},[],[1497],{"type":354,"value":1498},"headers",{"type":345,"tag":621,"props":1500,"children":1501},{},[1502],{"type":354,"value":1503},"none",{"type":345,"tag":621,"props":1505,"children":1506},{},[1507,1509,1515,1517,1523,1524,1530,1531,1537,1539,1545],{"type":354,"value":1508},"Up to 32 extra request headers. ",{"type":345,"tag":359,"props":1510,"children":1512},{"className":1511},[],[1513],{"type":354,"value":1514},"webhook-*",{"type":354,"value":1516},", ",{"type":345,"tag":359,"props":1518,"children":1520},{"className":1519},[],[1521],{"type":354,"value":1522},"Host",{"type":354,"value":1516},{"type":345,"tag":359,"props":1525,"children":1527},{"className":1526},[],[1528],{"type":354,"value":1529},"Content-Length",{"type":354,"value":1516},{"type":345,"tag":359,"props":1532,"children":1534},{"className":1533},[],[1535],{"type":354,"value":1536},"Transfer-Encoding",{"type":354,"value":1538}," and ",{"type":345,"tag":359,"props":1540,"children":1542},{"className":1541},[],[1543],{"type":354,"value":1544},"Connection",{"type":354,"value":1546}," are reserved. Custom headers are left out of the recorded attempt history.",{"type":345,"tag":594,"props":1548,"children":1549},{},[1550,1558,1563],{"type":345,"tag":621,"props":1551,"children":1552},{},[1553],{"type":345,"tag":359,"props":1554,"children":1556},{"className":1555},[],[1557],{"type":354,"value":985},{"type":345,"tag":621,"props":1559,"children":1560},{},[1561],{"type":354,"value":1562},"consumer's rate, else 50",{"type":345,"tag":621,"props":1564,"children":1565},{},[1566,1568,1573],{"type":354,"value":1567},"Deliveries per second, up to 1,000. ",{"type":345,"tag":359,"props":1569,"children":1571},{"className":1570},[],[1572],{"type":354,"value":993},{"type":354,"value":1574}," inherits the default.",{"type":345,"tag":594,"props":1576,"children":1577},{},[1578,1587,1592],{"type":345,"tag":621,"props":1579,"children":1580},{},[1581],{"type":345,"tag":359,"props":1582,"children":1584},{"className":1583},[],[1585],{"type":354,"value":1586},"timeout",{"type":345,"tag":621,"props":1588,"children":1589},{},[1590],{"type":354,"value":1591},"15",{"type":345,"tag":621,"props":1593,"children":1594},{},[1595],{"type":354,"value":1596},"Seconds per attempt, up to 60.",{"type":345,"tag":594,"props":1598,"children":1599},{},[1600,1609,1618],{"type":345,"tag":621,"props":1601,"children":1602},{},[1603],{"type":345,"tag":359,"props":1604,"children":1606},{"className":1605},[],[1607],{"type":354,"value":1608},"auto_disable",{"type":345,"tag":621,"props":1610,"children":1611},{},[1612],{"type":345,"tag":359,"props":1613,"children":1615},{"className":1614},[],[1616],{"type":354,"value":1617},"false",{"type":345,"tag":621,"props":1619,"children":1620},{},[1621],{"type":354,"value":1622},"Disable the endpoint after 100 failed attempts in a row spanning at least 12 hours.",{"type":345,"tag":594,"props":1624,"children":1625},{},[1626,1635,1639],{"type":345,"tag":621,"props":1627,"children":1628},{},[1629],{"type":345,"tag":359,"props":1630,"children":1632},{"className":1631},[],[1633],{"type":354,"value":1634},"function_id",{"type":345,"tag":621,"props":1636,"children":1637},{},[1638],{"type":354,"value":1503},{"type":345,"tag":621,"props":1640,"children":1641},{},[1642,1644,1650],{"type":354,"value":1643},"A ",{"type":345,"tag":368,"props":1645,"children":1647},{"href":1646},"/docs/outbound/operating#transform-or-drop-payloads-with-functions",[1648],{"type":354,"value":1649},"Function",{"type":354,"value":1651}," that rewrites the JSON body or drops the message.",{"type":345,"tag":346,"props":1653,"children":1654},{},[1655,1657,1663],{"type":354,"value":1656},"The URL must be public HTTPS, with no credentials or fragment. Hosts that resolve to private, loopback or link-local addresses are rejected. Each URL can be registered only once per consumer. Your code can retrieve the secret again later with ",{"type":345,"tag":359,"props":1658,"children":1660},{"className":1659},[],[1661],{"type":354,"value":1662},"POST /v1/outbound/endpoints/{id}/secret/reveal",{"type":354,"value":557},{"type":345,"tag":409,"props":1665,"children":1667},{"id":1666},"_6-publish-a-message",[1668],{"type":354,"value":1669},"6. Publish a message",{"type":345,"tag":346,"props":1671,"children":1672},{},[1673,1675,1681,1683,1689,1691,1697],{"type":354,"value":1674},"Publish whenever the event happens in your system. Send an ",{"type":345,"tag":359,"props":1676,"children":1678},{"className":1677},[],[1679],{"type":354,"value":1680},"Idempotency-Key",{"type":354,"value":1682}," header derived from the event, so a retry after a timeout or crash can never publish twice. ",{"type":345,"tag":359,"props":1684,"children":1686},{"className":1685},[],[1687],{"type":354,"value":1688},"payload",{"type":354,"value":1690}," is any JSON value up to 256 KiB. ",{"type":345,"tag":359,"props":1692,"children":1694},{"className":1693},[],[1695],{"type":354,"value":1696},"event_id",{"type":354,"value":1698}," is an optional reference of your own (up to 128 characters) that is stored on the message receipt.",{"type":345,"tag":465,"props":1700,"children":1701},{},[1702],{"type":345,"tag":469,"props":1703,"children":1705},{"className":471,"code":1704,"language":473,"meta":318,"style":318},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  -H 'Content-Type: application/json' \\\n  -H 'Idempotency-Key: invoice-paid:inv_123' \\\n  -X POST https://my.webhookrelay.com/v1/outbound/messages \\\n  -d '{\n    \"consumer\": \"customer_42\",\n    \"event_type\": \"invoice.paid\",\n    \"event_id\": \"evt_9001\",\n    \"payload\": { \"invoice_id\": \"inv_123\", \"amount\": 4900 }\n  }'\n",[1706],{"type":345,"tag":359,"props":1707,"children":1708},{"__ignoreMap":318},[1709,1744,1759,1775,1795,1806,1814,1822,1830,1838],{"type":345,"tag":479,"props":1710,"children":1711},{"class":481,"line":482},[1712,1716,1720,1724,1728,1732,1736,1740],{"type":345,"tag":479,"props":1713,"children":1714},{"style":486},[1715],{"type":354,"value":364},{"type":345,"tag":479,"props":1717,"children":1718},{"style":491},[1719],{"type":354,"value":494},{"type":345,"tag":479,"props":1721,"children":1722},{"style":497},[1723],{"type":354,"value":500},{"type":345,"tag":479,"props":1725,"children":1726},{"style":503},[1727],{"type":354,"value":506},{"type":345,"tag":479,"props":1729,"children":1730},{"style":497},[1731],{"type":354,"value":511},{"type":345,"tag":479,"props":1733,"children":1734},{"style":503},[1735],{"type":354,"value":516},{"type":345,"tag":479,"props":1737,"children":1738},{"style":497},[1739],{"type":354,"value":521},{"type":345,"tag":479,"props":1741,"children":1742},{"style":491},[1743],{"type":354,"value":843},{"type":345,"tag":479,"props":1745,"children":1746},{"class":481,"line":529},[1747,1751,1755],{"type":345,"tag":479,"props":1748,"children":1749},{"style":491},[1750],{"type":354,"value":851},{"type":345,"tag":479,"props":1752,"children":1753},{"style":497},[1754],{"type":354,"value":856},{"type":345,"tag":479,"props":1756,"children":1757},{"style":491},[1758],{"type":354,"value":843},{"type":345,"tag":479,"props":1760,"children":1761},{"class":481,"line":863},[1762,1766,1771],{"type":345,"tag":479,"props":1763,"children":1764},{"style":491},[1765],{"type":354,"value":851},{"type":345,"tag":479,"props":1767,"children":1768},{"style":497},[1769],{"type":354,"value":1770}," 'Idempotency-Key: invoice-paid:inv_123'",{"type":345,"tag":479,"props":1772,"children":1773},{"style":491},[1774],{"type":354,"value":843},{"type":345,"tag":479,"props":1776,"children":1777},{"class":481,"line":886},[1778,1782,1786,1791],{"type":345,"tag":479,"props":1779,"children":1780},{"style":491},[1781],{"type":354,"value":869},{"type":345,"tag":479,"props":1783,"children":1784},{"style":497},[1785],{"type":354,"value":874},{"type":345,"tag":479,"props":1787,"children":1788},{"style":497},[1789],{"type":354,"value":1790}," https://my.webhookrelay.com/v1/outbound/messages",{"type":345,"tag":479,"props":1792,"children":1793},{"style":491},[1794],{"type":354,"value":843},{"type":345,"tag":479,"props":1796,"children":1797},{"class":481,"line":900},[1798,1802],{"type":345,"tag":479,"props":1799,"children":1800},{"style":491},[1801],{"type":354,"value":892},{"type":345,"tag":479,"props":1803,"children":1804},{"style":497},[1805],{"type":354,"value":897},{"type":345,"tag":479,"props":1807,"children":1808},{"class":481,"line":909},[1809],{"type":345,"tag":479,"props":1810,"children":1811},{"style":497},[1812],{"type":354,"value":1813},"    \"consumer\": \"customer_42\",\n",{"type":345,"tag":479,"props":1815,"children":1816},{"class":481,"line":918},[1817],{"type":345,"tag":479,"props":1818,"children":1819},{"style":497},[1820],{"type":354,"value":1821},"    \"event_type\": \"invoice.paid\",\n",{"type":345,"tag":479,"props":1823,"children":1824},{"class":481,"line":927},[1825],{"type":345,"tag":479,"props":1826,"children":1827},{"style":497},[1828],{"type":354,"value":1829},"    \"event_id\": \"evt_9001\",\n",{"type":345,"tag":479,"props":1831,"children":1832},{"class":481,"line":1426},[1833],{"type":345,"tag":479,"props":1834,"children":1835},{"style":497},[1836],{"type":354,"value":1837},"    \"payload\": { \"invoice_id\": \"inv_123\", \"amount\": 4900 }\n",{"type":345,"tag":479,"props":1839,"children":1841},{"class":481,"line":1840},10,[1842],{"type":345,"tag":479,"props":1843,"children":1844},{"style":497},[1845],{"type":354,"value":933},{"type":345,"tag":346,"props":1847,"children":1848},{},[1849,1851,1857],{"type":354,"value":1850},"The API answers ",{"type":345,"tag":359,"props":1852,"children":1854},{"className":1853},[],[1855],{"type":354,"value":1856},"202 Accepted",{"type":354,"value":1858}," with the durable receipt (without the payload). Delivery happens asynchronously:",{"type":345,"tag":469,"props":1860,"children":1862},{"className":1263,"code":1861,"language":1265,"meta":318,"style":318},"{\n  \"id\": \"0199cf5e-7a3c-7d2e-9b1a-3f4e5d6c7b8a\",\n  \"consumer\": \"customer_42\",\n  \"event_type\": \"invoice.paid\",\n  \"event_id\": \"evt_9001\",\n  \"endpoint_ids\": [\"6f0c2c0e-5a3b-4f43-9d0a-4c4f7d7a2b11\"],\n  \"created_at\": \"2026-10-10T09:12:44Z\"\n}\n",[1863],{"type":345,"tag":359,"props":1864,"children":1865},{"__ignoreMap":318},[1866,1873,1893,1912,1932,1953,1973,1990],{"type":345,"tag":479,"props":1867,"children":1868},{"class":481,"line":482},[1869],{"type":345,"tag":479,"props":1870,"children":1871},{"style":503},[1872],{"type":354,"value":1277},{"type":345,"tag":479,"props":1874,"children":1875},{"class":481,"line":529},[1876,1880,1884,1889],{"type":345,"tag":479,"props":1877,"children":1878},{"style":491},[1879],{"type":354,"value":1285},{"type":345,"tag":479,"props":1881,"children":1882},{"style":503},[1883],{"type":354,"value":1290},{"type":345,"tag":479,"props":1885,"children":1886},{"style":497},[1887],{"type":354,"value":1888},"\"0199cf5e-7a3c-7d2e-9b1a-3f4e5d6c7b8a\"",{"type":345,"tag":479,"props":1890,"children":1891},{"style":503},[1892],{"type":354,"value":1300},{"type":345,"tag":479,"props":1894,"children":1895},{"class":481,"line":863},[1896,1900,1904,1908],{"type":345,"tag":479,"props":1897,"children":1898},{"style":491},[1899],{"type":354,"value":1308},{"type":345,"tag":479,"props":1901,"children":1902},{"style":503},[1903],{"type":354,"value":1290},{"type":345,"tag":479,"props":1905,"children":1906},{"style":497},[1907],{"type":354,"value":1317},{"type":345,"tag":479,"props":1909,"children":1910},{"style":503},[1911],{"type":354,"value":1300},{"type":345,"tag":479,"props":1913,"children":1914},{"class":481,"line":886},[1915,1920,1924,1928],{"type":345,"tag":479,"props":1916,"children":1917},{"style":491},[1918],{"type":354,"value":1919},"  \"event_type\"",{"type":345,"tag":479,"props":1921,"children":1922},{"style":503},[1923],{"type":354,"value":1290},{"type":345,"tag":479,"props":1925,"children":1926},{"style":497},[1927],{"type":354,"value":1360},{"type":345,"tag":479,"props":1929,"children":1930},{"style":503},[1931],{"type":354,"value":1300},{"type":345,"tag":479,"props":1933,"children":1934},{"class":481,"line":900},[1935,1940,1944,1949],{"type":345,"tag":479,"props":1936,"children":1937},{"style":491},[1938],{"type":354,"value":1939},"  \"event_id\"",{"type":345,"tag":479,"props":1941,"children":1942},{"style":503},[1943],{"type":354,"value":1290},{"type":345,"tag":479,"props":1945,"children":1946},{"style":497},[1947],{"type":354,"value":1948},"\"evt_9001\"",{"type":345,"tag":479,"props":1950,"children":1951},{"style":503},[1952],{"type":354,"value":1300},{"type":345,"tag":479,"props":1954,"children":1955},{"class":481,"line":909},[1956,1961,1965,1969],{"type":345,"tag":479,"props":1957,"children":1958},{"style":491},[1959],{"type":354,"value":1960},"  \"endpoint_ids\"",{"type":345,"tag":479,"props":1962,"children":1963},{"style":503},[1964],{"type":354,"value":1355},{"type":345,"tag":479,"props":1966,"children":1967},{"style":497},[1968],{"type":354,"value":1295},{"type":345,"tag":479,"props":1970,"children":1971},{"style":503},[1972],{"type":354,"value":1365},{"type":345,"tag":479,"props":1974,"children":1975},{"class":481,"line":918},[1976,1981,1985],{"type":345,"tag":479,"props":1977,"children":1978},{"style":491},[1979],{"type":354,"value":1980},"  \"created_at\"",{"type":345,"tag":479,"props":1982,"children":1983},{"style":503},[1984],{"type":354,"value":1290},{"type":345,"tag":479,"props":1986,"children":1987},{"style":497},[1988],{"type":354,"value":1989},"\"2026-10-10T09:12:44Z\"\n",{"type":345,"tag":479,"props":1991,"children":1992},{"class":481,"line":927},[1993],{"type":345,"tag":479,"props":1994,"children":1995},{"style":503},[1996],{"type":354,"value":1432},{"type":345,"tag":346,"props":1998,"children":1999},{},[2000,2002,2008,2010,2016],{"type":354,"value":2001},"The message ",{"type":345,"tag":359,"props":2003,"children":2005},{"className":2004},[],[2006],{"type":354,"value":2007},"id",{"type":354,"value":2009}," is sent to every endpoint as the ",{"type":345,"tag":359,"props":2011,"children":2013},{"className":2012},[],[2014],{"type":354,"value":2015},"webhook-id",{"type":354,"value":2017}," header. It stays the same across retries and replays.",{"type":345,"tag":586,"props":2019,"children":2020},{},[2021,2037],{"type":345,"tag":590,"props":2022,"children":2023},{},[2024],{"type":345,"tag":594,"props":2025,"children":2026},{},[2027,2032],{"type":345,"tag":598,"props":2028,"children":2029},{},[2030],{"type":354,"value":2031},"Response",{"type":345,"tag":598,"props":2033,"children":2034},{},[2035],{"type":354,"value":2036},"Meaning",{"type":345,"tag":614,"props":2038,"children":2039},{},[2040,2057,2074,2091,2108,2125],{"type":345,"tag":594,"props":2041,"children":2042},{},[2043,2052],{"type":345,"tag":621,"props":2044,"children":2045},{},[2046],{"type":345,"tag":359,"props":2047,"children":2049},{"className":2048},[],[2050],{"type":354,"value":2051},"202",{"type":345,"tag":621,"props":2053,"children":2054},{},[2055],{"type":354,"value":2056},"Accepted, or an idempotent repeat that returns the original receipt.",{"type":345,"tag":594,"props":2058,"children":2059},{},[2060,2069],{"type":345,"tag":621,"props":2061,"children":2062},{},[2063],{"type":345,"tag":359,"props":2064,"children":2066},{"className":2065},[],[2067],{"type":354,"value":2068},"400",{"type":345,"tag":621,"props":2070,"children":2071},{},[2072],{"type":354,"value":2073},"Invalid consumer or event type name, invalid JSON, or a deprecated event type.",{"type":345,"tag":594,"props":2075,"children":2076},{},[2077,2086],{"type":345,"tag":621,"props":2078,"children":2079},{},[2080],{"type":345,"tag":359,"props":2081,"children":2083},{"className":2082},[],[2084],{"type":354,"value":2085},"404",{"type":345,"tag":621,"props":2087,"children":2088},{},[2089],{"type":354,"value":2090},"The consumer doesn't exist.",{"type":345,"tag":594,"props":2092,"children":2093},{},[2094,2103],{"type":345,"tag":621,"props":2095,"children":2096},{},[2097],{"type":345,"tag":359,"props":2098,"children":2100},{"className":2099},[],[2101],{"type":354,"value":2102},"409",{"type":345,"tag":621,"props":2104,"children":2105},{},[2106],{"type":354,"value":2107},"The idempotency key was already used for a different message.",{"type":345,"tag":594,"props":2109,"children":2110},{},[2111,2120],{"type":345,"tag":621,"props":2112,"children":2113},{},[2114],{"type":345,"tag":359,"props":2115,"children":2117},{"className":2116},[],[2118],{"type":354,"value":2119},"413",{"type":345,"tag":621,"props":2121,"children":2122},{},[2123],{"type":354,"value":2124},"The payload is larger than 256 KiB.",{"type":345,"tag":594,"props":2126,"children":2127},{},[2128,2137],{"type":345,"tag":621,"props":2129,"children":2130},{},[2131],{"type":345,"tag":359,"props":2132,"children":2134},{"className":2133},[],[2135],{"type":354,"value":2136},"429",{"type":345,"tag":621,"props":2138,"children":2139},{},[2140],{"type":354,"value":2141},"10,000 messages are already waiting to be prepared for delivery. Retry later with the same key.",{"type":345,"tag":409,"props":2143,"children":2145},{"id":2144},"_7-check-the-delivery",[2146],{"type":354,"value":2147},"7. Check the delivery",{"type":345,"tag":346,"props":2149,"children":2150},{},[2151,2157],{"type":345,"tag":359,"props":2152,"children":2154},{"className":2153},[],[2155],{"type":354,"value":2156},"GET /v1/outbound/messages/{id}",{"type":354,"value":2158}," returns the payload and one delivery per endpoint, including each attempt's status code, response headers and body. A message that was just accepted may still be in preparation, in which case it has no deliveries yet.",{"type":345,"tag":465,"props":2160,"children":2161},{},[2162],{"type":345,"tag":469,"props":2163,"children":2165},{"className":471,"code":2164,"language":473,"meta":318,"style":318},"curl --user \"$RELAY_KEY:$RELAY_SECRET\" \\\n  https://my.webhookrelay.com/v1/outbound/messages/0199cf5e-7a3c-7d2e-9b1a-3f4e5d6c7b8a\n",[2166],{"type":345,"tag":359,"props":2167,"children":2168},{"__ignoreMap":318},[2169,2204],{"type":345,"tag":479,"props":2170,"children":2171},{"class":481,"line":482},[2172,2176,2180,2184,2188,2192,2196,2200],{"type":345,"tag":479,"props":2173,"children":2174},{"style":486},[2175],{"type":354,"value":364},{"type":345,"tag":479,"props":2177,"children":2178},{"style":491},[2179],{"type":354,"value":494},{"type":345,"tag":479,"props":2181,"children":2182},{"style":497},[2183],{"type":354,"value":500},{"type":345,"tag":479,"props":2185,"children":2186},{"style":503},[2187],{"type":354,"value":506},{"type":345,"tag":479,"props":2189,"children":2190},{"style":497},[2191],{"type":354,"value":511},{"type":345,"tag":479,"props":2193,"children":2194},{"style":503},[2195],{"type":354,"value":516},{"type":345,"tag":479,"props":2197,"children":2198},{"style":497},[2199],{"type":354,"value":521},{"type":345,"tag":479,"props":2201,"children":2202},{"style":491},[2203],{"type":354,"value":843},{"type":345,"tag":479,"props":2205,"children":2206},{"class":481,"line":529},[2207],{"type":345,"tag":479,"props":2208,"children":2209},{"style":497},[2210],{"type":354,"value":2211},"  https://my.webhookrelay.com/v1/outbound/messages/0199cf5e-7a3c-7d2e-9b1a-3f4e5d6c7b8a\n",{"type":345,"tag":409,"props":2213,"children":2215},{"id":2214},"the-same-flow-with-the-sdks",[2216],{"type":354,"value":2217},"The same flow with the SDKs",{"type":345,"tag":2219,"props":2220,"children":2222},"h3",{"id":2221},"javascript-typescript",[2223],{"type":354,"value":2224},"JavaScript / TypeScript",{"type":345,"tag":346,"props":2226,"children":2227},{},[2228,2230,2236,2238,2244,2245,2251,2253,2259],{"type":354,"value":2229},"Install with ",{"type":345,"tag":359,"props":2231,"children":2233},{"className":2232},[],[2234],{"type":354,"value":2235},"npm install @webhookrelay/sdk",{"type":354,"value":2237},". With no arguments, the client reads ",{"type":345,"tag":359,"props":2239,"children":2241},{"className":2240},[],[2242],{"type":354,"value":2243},"RELAY_KEY",{"type":354,"value":1538},{"type":345,"tag":359,"props":2246,"children":2248},{"className":2247},[],[2249],{"type":354,"value":2250},"RELAY_SECRET",{"type":354,"value":2252}," (or a ",{"type":345,"tag":359,"props":2254,"children":2256},{"className":2255},[],[2257],{"type":354,"value":2258},"RELAY_API_KEY",{"type":354,"value":2260}," account API key) from the environment:",{"type":345,"tag":465,"props":2262,"children":2263},{},[2264],{"type":345,"tag":469,"props":2265,"children":2269},{"className":2266,"code":2267,"language":2268,"meta":318,"style":318},"language-ts shiki shiki-themes github-dark","import { WebhookRelay } from \"@webhookrelay/sdk\";\n\nconst relay = new WebhookRelay({ key: process.env.RELAY_KEY, secret: process.env.RELAY_SECRET });\n\n// Once per customer: register the HTTPS endpoint they give you.\nawait relay.outbound.eventTypes.upsert(\"invoice.paid\", { description: \"An invoice was paid\" });\nawait relay.outbound.consumers.upsert(\"customer_42\", { name: \"Acme\" });\nconst endpoint = await relay.outbound.endpoints.create(\"customer_42\", {\n  url: \"https://acme.example/webhooks\",\n  eventTypes: [\"invoice.paid\"],\n  autoDisable: true,\n});\n// endpoint.secret is the signing secret your customer verifies deliveries with.\n\n// Every time the event happens. Retrying with the same key never publishes twice.\nconst message = await relay.outbound.messages.publish(\n  { consumer: \"customer_42\", eventType: \"invoice.paid\", payload: { invoice_id: \"inv_123\", amount: 4900 } },\n  { idempotencyKey: \"invoice-paid:inv_123\" },\n);\n\n// Later: the payload and each endpoint's delivery with its attempts.\nconst detail = await relay.outbound.messages.get(message.id);\n","ts",[2270],{"type":345,"tag":359,"props":2271,"children":2272},{"__ignoreMap":318},[2273,2301,2310,2361,2368,2376,2417,2455,2499,2515,2531,2548,2557,2566,2574,2583,2619,2666,2685,2694,2702,2711],{"type":345,"tag":479,"props":2274,"children":2275},{"class":481,"line":482},[2276,2281,2286,2291,2296],{"type":345,"tag":479,"props":2277,"children":2278},{"style":734},[2279],{"type":354,"value":2280},"import",{"type":345,"tag":479,"props":2282,"children":2283},{"style":503},[2284],{"type":354,"value":2285}," { WebhookRelay } ",{"type":345,"tag":479,"props":2287,"children":2288},{"style":734},[2289],{"type":354,"value":2290},"from",{"type":345,"tag":479,"props":2292,"children":2293},{"style":497},[2294],{"type":354,"value":2295}," \"@webhookrelay/sdk\"",{"type":345,"tag":479,"props":2297,"children":2298},{"style":503},[2299],{"type":354,"value":2300},";\n",{"type":345,"tag":479,"props":2302,"children":2303},{"class":481,"line":529},[2304],{"type":345,"tag":479,"props":2305,"children":2307},{"emptyLinePlaceholder":2306},true,[2308],{"type":354,"value":2309},"\n",{"type":345,"tag":479,"props":2311,"children":2312},{"class":481,"line":863},[2313,2318,2323,2328,2333,2338,2343,2347,2352,2356],{"type":345,"tag":479,"props":2314,"children":2315},{"style":734},[2316],{"type":354,"value":2317},"const",{"type":345,"tag":479,"props":2319,"children":2320},{"style":491},[2321],{"type":354,"value":2322}," relay",{"type":345,"tag":479,"props":2324,"children":2325},{"style":734},[2326],{"type":354,"value":2327}," =",{"type":345,"tag":479,"props":2329,"children":2330},{"style":734},[2331],{"type":354,"value":2332}," new",{"type":345,"tag":479,"props":2334,"children":2335},{"style":486},[2336],{"type":354,"value":2337}," WebhookRelay",{"type":345,"tag":479,"props":2339,"children":2340},{"style":503},[2341],{"type":354,"value":2342},"({ key: process.env.",{"type":345,"tag":479,"props":2344,"children":2345},{"style":491},[2346],{"type":354,"value":2243},{"type":345,"tag":479,"props":2348,"children":2349},{"style":503},[2350],{"type":354,"value":2351},", secret: process.env.",{"type":345,"tag":479,"props":2353,"children":2354},{"style":491},[2355],{"type":354,"value":2250},{"type":345,"tag":479,"props":2357,"children":2358},{"style":503},[2359],{"type":354,"value":2360}," });\n",{"type":345,"tag":479,"props":2362,"children":2363},{"class":481,"line":886},[2364],{"type":345,"tag":479,"props":2365,"children":2366},{"emptyLinePlaceholder":2306},[2367],{"type":354,"value":2309},{"type":345,"tag":479,"props":2369,"children":2370},{"class":481,"line":900},[2371],{"type":345,"tag":479,"props":2372,"children":2373},{"style":533},[2374],{"type":354,"value":2375},"// Once per customer: register the HTTPS endpoint they give you.\n",{"type":345,"tag":479,"props":2377,"children":2378},{"class":481,"line":909},[2379,2384,2389,2394,2399,2403,2408,2413],{"type":345,"tag":479,"props":2380,"children":2381},{"style":734},[2382],{"type":354,"value":2383},"await",{"type":345,"tag":479,"props":2385,"children":2386},{"style":503},[2387],{"type":354,"value":2388}," relay.outbound.eventTypes.",{"type":345,"tag":479,"props":2390,"children":2391},{"style":486},[2392],{"type":354,"value":2393},"upsert",{"type":345,"tag":479,"props":2395,"children":2396},{"style":503},[2397],{"type":354,"value":2398},"(",{"type":345,"tag":479,"props":2400,"children":2401},{"style":497},[2402],{"type":354,"value":1360},{"type":345,"tag":479,"props":2404,"children":2405},{"style":503},[2406],{"type":354,"value":2407},", { description: ",{"type":345,"tag":479,"props":2409,"children":2410},{"style":497},[2411],{"type":354,"value":2412},"\"An invoice was paid\"",{"type":345,"tag":479,"props":2414,"children":2415},{"style":503},[2416],{"type":354,"value":2360},{"type":345,"tag":479,"props":2418,"children":2419},{"class":481,"line":918},[2420,2424,2429,2433,2437,2441,2446,2451],{"type":345,"tag":479,"props":2421,"children":2422},{"style":734},[2423],{"type":354,"value":2383},{"type":345,"tag":479,"props":2425,"children":2426},{"style":503},[2427],{"type":354,"value":2428}," relay.outbound.consumers.",{"type":345,"tag":479,"props":2430,"children":2431},{"style":486},[2432],{"type":354,"value":2393},{"type":345,"tag":479,"props":2434,"children":2435},{"style":503},[2436],{"type":354,"value":2398},{"type":345,"tag":479,"props":2438,"children":2439},{"style":497},[2440],{"type":354,"value":1317},{"type":345,"tag":479,"props":2442,"children":2443},{"style":503},[2444],{"type":354,"value":2445},", { name: ",{"type":345,"tag":479,"props":2447,"children":2448},{"style":497},[2449],{"type":354,"value":2450},"\"Acme\"",{"type":345,"tag":479,"props":2452,"children":2453},{"style":503},[2454],{"type":354,"value":2360},{"type":345,"tag":479,"props":2456,"children":2457},{"class":481,"line":927},[2458,2462,2467,2471,2476,2481,2486,2490,2494],{"type":345,"tag":479,"props":2459,"children":2460},{"style":734},[2461],{"type":354,"value":2317},{"type":345,"tag":479,"props":2463,"children":2464},{"style":491},[2465],{"type":354,"value":2466}," endpoint",{"type":345,"tag":479,"props":2468,"children":2469},{"style":734},[2470],{"type":354,"value":2327},{"type":345,"tag":479,"props":2472,"children":2473},{"style":734},[2474],{"type":354,"value":2475}," await",{"type":345,"tag":479,"props":2477,"children":2478},{"style":503},[2479],{"type":354,"value":2480}," relay.outbound.endpoints.",{"type":345,"tag":479,"props":2482,"children":2483},{"style":486},[2484],{"type":354,"value":2485},"create",{"type":345,"tag":479,"props":2487,"children":2488},{"style":503},[2489],{"type":354,"value":2398},{"type":345,"tag":479,"props":2491,"children":2492},{"style":497},[2493],{"type":354,"value":1317},{"type":345,"tag":479,"props":2495,"children":2496},{"style":503},[2497],{"type":354,"value":2498},", {\n",{"type":345,"tag":479,"props":2500,"children":2501},{"class":481,"line":1426},[2502,2507,2511],{"type":345,"tag":479,"props":2503,"children":2504},{"style":503},[2505],{"type":354,"value":2506},"  url: ",{"type":345,"tag":479,"props":2508,"children":2509},{"style":497},[2510],{"type":354,"value":1338},{"type":345,"tag":479,"props":2512,"children":2513},{"style":503},[2514],{"type":354,"value":1300},{"type":345,"tag":479,"props":2516,"children":2517},{"class":481,"line":1840},[2518,2523,2527],{"type":345,"tag":479,"props":2519,"children":2520},{"style":503},[2521],{"type":354,"value":2522},"  eventTypes: [",{"type":345,"tag":479,"props":2524,"children":2525},{"style":497},[2526],{"type":354,"value":1360},{"type":345,"tag":479,"props":2528,"children":2529},{"style":503},[2530],{"type":354,"value":1365},{"type":345,"tag":479,"props":2532,"children":2534},{"class":481,"line":2533},11,[2535,2540,2544],{"type":345,"tag":479,"props":2536,"children":2537},{"style":503},[2538],{"type":354,"value":2539},"  autoDisable: ",{"type":345,"tag":479,"props":2541,"children":2542},{"style":491},[2543],{"type":354,"value":453},{"type":345,"tag":479,"props":2545,"children":2546},{"style":503},[2547],{"type":354,"value":1300},{"type":345,"tag":479,"props":2549,"children":2551},{"class":481,"line":2550},12,[2552],{"type":345,"tag":479,"props":2553,"children":2554},{"style":503},[2555],{"type":354,"value":2556},"});\n",{"type":345,"tag":479,"props":2558,"children":2560},{"class":481,"line":2559},13,[2561],{"type":345,"tag":479,"props":2562,"children":2563},{"style":533},[2564],{"type":354,"value":2565},"// endpoint.secret is the signing secret your customer verifies deliveries with.\n",{"type":345,"tag":479,"props":2567,"children":2569},{"class":481,"line":2568},14,[2570],{"type":345,"tag":479,"props":2571,"children":2572},{"emptyLinePlaceholder":2306},[2573],{"type":354,"value":2309},{"type":345,"tag":479,"props":2575,"children":2577},{"class":481,"line":2576},15,[2578],{"type":345,"tag":479,"props":2579,"children":2580},{"style":533},[2581],{"type":354,"value":2582},"// Every time the event happens. Retrying with the same key never publishes twice.\n",{"type":345,"tag":479,"props":2584,"children":2586},{"class":481,"line":2585},16,[2587,2591,2596,2600,2604,2609,2614],{"type":345,"tag":479,"props":2588,"children":2589},{"style":734},[2590],{"type":354,"value":2317},{"type":345,"tag":479,"props":2592,"children":2593},{"style":491},[2594],{"type":354,"value":2595}," message",{"type":345,"tag":479,"props":2597,"children":2598},{"style":734},[2599],{"type":354,"value":2327},{"type":345,"tag":479,"props":2601,"children":2602},{"style":734},[2603],{"type":354,"value":2475},{"type":345,"tag":479,"props":2605,"children":2606},{"style":503},[2607],{"type":354,"value":2608}," relay.outbound.messages.",{"type":345,"tag":479,"props":2610,"children":2611},{"style":486},[2612],{"type":354,"value":2613},"publish",{"type":345,"tag":479,"props":2615,"children":2616},{"style":503},[2617],{"type":354,"value":2618},"(\n",{"type":345,"tag":479,"props":2620,"children":2622},{"class":481,"line":2621},17,[2623,2628,2632,2637,2641,2646,2651,2656,2661],{"type":345,"tag":479,"props":2624,"children":2625},{"style":503},[2626],{"type":354,"value":2627},"  { consumer: ",{"type":345,"tag":479,"props":2629,"children":2630},{"style":497},[2631],{"type":354,"value":1317},{"type":345,"tag":479,"props":2633,"children":2634},{"style":503},[2635],{"type":354,"value":2636},", eventType: ",{"type":345,"tag":479,"props":2638,"children":2639},{"style":497},[2640],{"type":354,"value":1360},{"type":345,"tag":479,"props":2642,"children":2643},{"style":503},[2644],{"type":354,"value":2645},", payload: { invoice_id: ",{"type":345,"tag":479,"props":2647,"children":2648},{"style":497},[2649],{"type":354,"value":2650},"\"inv_123\"",{"type":345,"tag":479,"props":2652,"children":2653},{"style":503},[2654],{"type":354,"value":2655},", amount: ",{"type":345,"tag":479,"props":2657,"children":2658},{"style":491},[2659],{"type":354,"value":2660},"4900",{"type":345,"tag":479,"props":2662,"children":2663},{"style":503},[2664],{"type":354,"value":2665}," } },\n",{"type":345,"tag":479,"props":2667,"children":2669},{"class":481,"line":2668},18,[2670,2675,2680],{"type":345,"tag":479,"props":2671,"children":2672},{"style":503},[2673],{"type":354,"value":2674},"  { idempotencyKey: ",{"type":345,"tag":479,"props":2676,"children":2677},{"style":497},[2678],{"type":354,"value":2679},"\"invoice-paid:inv_123\"",{"type":345,"tag":479,"props":2681,"children":2682},{"style":503},[2683],{"type":354,"value":2684}," },\n",{"type":345,"tag":479,"props":2686,"children":2688},{"class":481,"line":2687},19,[2689],{"type":345,"tag":479,"props":2690,"children":2691},{"style":503},[2692],{"type":354,"value":2693},");\n",{"type":345,"tag":479,"props":2695,"children":2697},{"class":481,"line":2696},20,[2698],{"type":345,"tag":479,"props":2699,"children":2700},{"emptyLinePlaceholder":2306},[2701],{"type":354,"value":2309},{"type":345,"tag":479,"props":2703,"children":2705},{"class":481,"line":2704},21,[2706],{"type":345,"tag":479,"props":2707,"children":2708},{"style":533},[2709],{"type":354,"value":2710},"// Later: the payload and each endpoint's delivery with its attempts.\n",{"type":345,"tag":479,"props":2712,"children":2714},{"class":481,"line":2713},22,[2715,2719,2724,2728,2732,2736,2741],{"type":345,"tag":479,"props":2716,"children":2717},{"style":734},[2718],{"type":354,"value":2317},{"type":345,"tag":479,"props":2720,"children":2721},{"style":491},[2722],{"type":354,"value":2723}," detail",{"type":345,"tag":479,"props":2725,"children":2726},{"style":734},[2727],{"type":354,"value":2327},{"type":345,"tag":479,"props":2729,"children":2730},{"style":734},[2731],{"type":354,"value":2475},{"type":345,"tag":479,"props":2733,"children":2734},{"style":503},[2735],{"type":354,"value":2608},{"type":345,"tag":479,"props":2737,"children":2738},{"style":486},[2739],{"type":354,"value":2740},"get",{"type":345,"tag":479,"props":2742,"children":2743},{"style":503},[2744],{"type":354,"value":2745},"(message.id);\n",{"type":345,"tag":2219,"props":2747,"children":2749},{"id":2748},"go",[2750],{"type":354,"value":2751},"Go",{"type":345,"tag":346,"props":2753,"children":2754},{},[2755,2756,2762],{"type":354,"value":2229},{"type":345,"tag":359,"props":2757,"children":2759},{"className":2758},[],[2760],{"type":354,"value":2761},"go get github.com/webhookrelay/webhookrelay-go",{"type":354,"value":511},{"type":345,"tag":465,"props":2764,"children":2765},{},[2766],{"type":345,"tag":469,"props":2767,"children":2770},{"className":2768,"code":2769,"language":2748,"meta":318,"style":318},"language-go shiki shiki-themes github-dark","package main\n\nimport (\n    \"log\"\n    \"os\"\n\n    \"github.com/webhookrelay/webhookrelay-go\"\n)\n\nfunc main() {\n    api, err := webhookrelay.New(os.Getenv(\"RELAY_KEY\"), os.Getenv(\"RELAY_SECRET\"))\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // Once per customer: register the HTTPS endpoint they give you.\n    if _, err := api.UpsertOutboundEventType(&webhookrelay.OutboundEventTypeOptions{\n        Name:        \"invoice.paid\",\n        Description: \"An invoice was paid\",\n    }); err != nil {\n        log.Fatal(err)\n    }\n    if _, err := api.UpsertOutboundConsumer(&webhookrelay.OutboundConsumerOptions{ID: \"customer_42\", Name: \"Acme\"}); err != nil {\n        log.Fatal(err)\n    }\n    endpoint, err := api.CreateOutboundEndpoint(&webhookrelay.OutboundEndpointOptions{\n        Consumer:    \"customer_42\",\n        URL:         \"https://acme.example/webhooks\",\n        EventTypes:  []string{\"invoice.paid\"},\n        AutoDisable: true,\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    log.Printf(\"give this secret to the customer: %s\", endpoint.Secret)\n\n    // Every time the event happens. Retrying with the same key never publishes twice.\n    message, err := api.PublishOutboundMessage(&webhookrelay.OutboundMessagePublishOptions{\n        Consumer:       \"customer_42\",\n        EventType:      \"invoice.paid\",\n        Payload:        map[string]interface{}{\"invoice_id\": \"inv_123\", \"amount\": 4900},\n        IdempotencyKey: \"invoice-paid:inv_123\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    log.Printf(\"accepted message %s\", message.ID)\n}\n",[2771],{"type":345,"tag":359,"props":2772,"children":2773},{"__ignoreMap":318},[2774,2787,2794,2806,2824,2840,2847,2863,2871,2878,2896,2961,2989,3007,3015,3022,3030,3083,3099,3115,3135,3150,3157,3238,3254,3262,3309,3326,3343,3371,3388,3397,3421,3437,3445,3482,3490,3499,3546,3563,3580,3652,3669,3677,3701,3717,3725,3759],{"type":345,"tag":479,"props":2775,"children":2776},{"class":481,"line":482},[2777,2782],{"type":345,"tag":479,"props":2778,"children":2779},{"style":734},[2780],{"type":354,"value":2781},"package",{"type":345,"tag":479,"props":2783,"children":2784},{"style":486},[2785],{"type":354,"value":2786}," main\n",{"type":345,"tag":479,"props":2788,"children":2789},{"class":481,"line":529},[2790],{"type":345,"tag":479,"props":2791,"children":2792},{"emptyLinePlaceholder":2306},[2793],{"type":354,"value":2309},{"type":345,"tag":479,"props":2795,"children":2796},{"class":481,"line":863},[2797,2801],{"type":345,"tag":479,"props":2798,"children":2799},{"style":734},[2800],{"type":354,"value":2280},{"type":345,"tag":479,"props":2802,"children":2803},{"style":503},[2804],{"type":354,"value":2805}," (\n",{"type":345,"tag":479,"props":2807,"children":2808},{"class":481,"line":886},[2809,2814,2819],{"type":345,"tag":479,"props":2810,"children":2811},{"style":497},[2812],{"type":354,"value":2813},"    \"",{"type":345,"tag":479,"props":2815,"children":2816},{"style":486},[2817],{"type":354,"value":2818},"log",{"type":345,"tag":479,"props":2820,"children":2821},{"style":497},[2822],{"type":354,"value":2823},"\"\n",{"type":345,"tag":479,"props":2825,"children":2826},{"class":481,"line":900},[2827,2831,2836],{"type":345,"tag":479,"props":2828,"children":2829},{"style":497},[2830],{"type":354,"value":2813},{"type":345,"tag":479,"props":2832,"children":2833},{"style":486},[2834],{"type":354,"value":2835},"os",{"type":345,"tag":479,"props":2837,"children":2838},{"style":497},[2839],{"type":354,"value":2823},{"type":345,"tag":479,"props":2841,"children":2842},{"class":481,"line":909},[2843],{"type":345,"tag":479,"props":2844,"children":2845},{"emptyLinePlaceholder":2306},[2846],{"type":354,"value":2309},{"type":345,"tag":479,"props":2848,"children":2849},{"class":481,"line":918},[2850,2854,2859],{"type":345,"tag":479,"props":2851,"children":2852},{"style":497},[2853],{"type":354,"value":2813},{"type":345,"tag":479,"props":2855,"children":2856},{"style":486},[2857],{"type":354,"value":2858},"github.com/webhookrelay/webhookrelay-go",{"type":345,"tag":479,"props":2860,"children":2861},{"style":497},[2862],{"type":354,"value":2823},{"type":345,"tag":479,"props":2864,"children":2865},{"class":481,"line":927},[2866],{"type":345,"tag":479,"props":2867,"children":2868},{"style":503},[2869],{"type":354,"value":2870},")\n",{"type":345,"tag":479,"props":2872,"children":2873},{"class":481,"line":1426},[2874],{"type":345,"tag":479,"props":2875,"children":2876},{"emptyLinePlaceholder":2306},[2877],{"type":354,"value":2309},{"type":345,"tag":479,"props":2879,"children":2880},{"class":481,"line":1840},[2881,2886,2891],{"type":345,"tag":479,"props":2882,"children":2883},{"style":734},[2884],{"type":354,"value":2885},"func",{"type":345,"tag":479,"props":2887,"children":2888},{"style":486},[2889],{"type":354,"value":2890}," main",{"type":345,"tag":479,"props":2892,"children":2893},{"style":503},[2894],{"type":354,"value":2895},"() {\n",{"type":345,"tag":479,"props":2897,"children":2898},{"class":481,"line":2533},[2899,2904,2909,2914,2919,2924,2929,2933,2938,2943,2947,2951,2956],{"type":345,"tag":479,"props":2900,"children":2901},{"style":503},[2902],{"type":354,"value":2903},"    api, err ",{"type":345,"tag":479,"props":2905,"children":2906},{"style":734},[2907],{"type":354,"value":2908},":=",{"type":345,"tag":479,"props":2910,"children":2911},{"style":503},[2912],{"type":354,"value":2913}," webhookrelay.",{"type":345,"tag":479,"props":2915,"children":2916},{"style":486},[2917],{"type":354,"value":2918},"New",{"type":345,"tag":479,"props":2920,"children":2921},{"style":503},[2922],{"type":354,"value":2923},"(os.",{"type":345,"tag":479,"props":2925,"children":2926},{"style":486},[2927],{"type":354,"value":2928},"Getenv",{"type":345,"tag":479,"props":2930,"children":2931},{"style":503},[2932],{"type":354,"value":2398},{"type":345,"tag":479,"props":2934,"children":2935},{"style":497},[2936],{"type":354,"value":2937},"\"RELAY_KEY\"",{"type":345,"tag":479,"props":2939,"children":2940},{"style":503},[2941],{"type":354,"value":2942},"), os.",{"type":345,"tag":479,"props":2944,"children":2945},{"style":486},[2946],{"type":354,"value":2928},{"type":345,"tag":479,"props":2948,"children":2949},{"style":503},[2950],{"type":354,"value":2398},{"type":345,"tag":479,"props":2952,"children":2953},{"style":497},[2954],{"type":354,"value":2955},"\"RELAY_SECRET\"",{"type":345,"tag":479,"props":2957,"children":2958},{"style":503},[2959],{"type":354,"value":2960},"))\n",{"type":345,"tag":479,"props":2962,"children":2963},{"class":481,"line":2550},[2964,2969,2974,2979,2984],{"type":345,"tag":479,"props":2965,"children":2966},{"style":734},[2967],{"type":354,"value":2968},"    if",{"type":345,"tag":479,"props":2970,"children":2971},{"style":503},[2972],{"type":354,"value":2973}," err ",{"type":345,"tag":479,"props":2975,"children":2976},{"style":734},[2977],{"type":354,"value":2978},"!=",{"type":345,"tag":479,"props":2980,"children":2981},{"style":491},[2982],{"type":354,"value":2983}," nil",{"type":345,"tag":479,"props":2985,"children":2986},{"style":503},[2987],{"type":354,"value":2988}," {\n",{"type":345,"tag":479,"props":2990,"children":2991},{"class":481,"line":2559},[2992,2997,3002],{"type":345,"tag":479,"props":2993,"children":2994},{"style":503},[2995],{"type":354,"value":2996},"        log.",{"type":345,"tag":479,"props":2998,"children":2999},{"style":486},[3000],{"type":354,"value":3001},"Fatal",{"type":345,"tag":479,"props":3003,"children":3004},{"style":503},[3005],{"type":354,"value":3006},"(err)\n",{"type":345,"tag":479,"props":3008,"children":3009},{"class":481,"line":2568},[3010],{"type":345,"tag":479,"props":3011,"children":3012},{"style":503},[3013],{"type":354,"value":3014},"    }\n",{"type":345,"tag":479,"props":3016,"children":3017},{"class":481,"line":2576},[3018],{"type":345,"tag":479,"props":3019,"children":3020},{"emptyLinePlaceholder":2306},[3021],{"type":354,"value":2309},{"type":345,"tag":479,"props":3023,"children":3024},{"class":481,"line":2585},[3025],{"type":345,"tag":479,"props":3026,"children":3027},{"style":533},[3028],{"type":354,"value":3029},"    // Once per customer: register the HTTPS endpoint they give you.\n",{"type":345,"tag":479,"props":3031,"children":3032},{"class":481,"line":2621},[3033,3037,3042,3046,3051,3056,3060,3065,3070,3074,3079],{"type":345,"tag":479,"props":3034,"children":3035},{"style":734},[3036],{"type":354,"value":2968},{"type":345,"tag":479,"props":3038,"children":3039},{"style":503},[3040],{"type":354,"value":3041}," _, err ",{"type":345,"tag":479,"props":3043,"children":3044},{"style":734},[3045],{"type":354,"value":2908},{"type":345,"tag":479,"props":3047,"children":3048},{"style":503},[3049],{"type":354,"value":3050}," api.",{"type":345,"tag":479,"props":3052,"children":3053},{"style":486},[3054],{"type":354,"value":3055},"UpsertOutboundEventType",{"type":345,"tag":479,"props":3057,"children":3058},{"style":503},[3059],{"type":354,"value":2398},{"type":345,"tag":479,"props":3061,"children":3062},{"style":734},[3063],{"type":354,"value":3064},"&",{"type":345,"tag":479,"props":3066,"children":3067},{"style":486},[3068],{"type":354,"value":3069},"webhookrelay",{"type":345,"tag":479,"props":3071,"children":3072},{"style":503},[3073],{"type":354,"value":557},{"type":345,"tag":479,"props":3075,"children":3076},{"style":486},[3077],{"type":354,"value":3078},"OutboundEventTypeOptions",{"type":345,"tag":479,"props":3080,"children":3081},{"style":503},[3082],{"type":354,"value":1277},{"type":345,"tag":479,"props":3084,"children":3085},{"class":481,"line":2668},[3086,3091,3095],{"type":345,"tag":479,"props":3087,"children":3088},{"style":503},[3089],{"type":354,"value":3090},"        Name:        ",{"type":345,"tag":479,"props":3092,"children":3093},{"style":497},[3094],{"type":354,"value":1360},{"type":345,"tag":479,"props":3096,"children":3097},{"style":503},[3098],{"type":354,"value":1300},{"type":345,"tag":479,"props":3100,"children":3101},{"class":481,"line":2687},[3102,3107,3111],{"type":345,"tag":479,"props":3103,"children":3104},{"style":503},[3105],{"type":354,"value":3106},"        Description: ",{"type":345,"tag":479,"props":3108,"children":3109},{"style":497},[3110],{"type":354,"value":2412},{"type":345,"tag":479,"props":3112,"children":3113},{"style":503},[3114],{"type":354,"value":1300},{"type":345,"tag":479,"props":3116,"children":3117},{"class":481,"line":2696},[3118,3123,3127,3131],{"type":345,"tag":479,"props":3119,"children":3120},{"style":503},[3121],{"type":354,"value":3122},"    }); err ",{"type":345,"tag":479,"props":3124,"children":3125},{"style":734},[3126],{"type":354,"value":2978},{"type":345,"tag":479,"props":3128,"children":3129},{"style":491},[3130],{"type":354,"value":2983},{"type":345,"tag":479,"props":3132,"children":3133},{"style":503},[3134],{"type":354,"value":2988},{"type":345,"tag":479,"props":3136,"children":3137},{"class":481,"line":2704},[3138,3142,3146],{"type":345,"tag":479,"props":3139,"children":3140},{"style":503},[3141],{"type":354,"value":2996},{"type":345,"tag":479,"props":3143,"children":3144},{"style":486},[3145],{"type":354,"value":3001},{"type":345,"tag":479,"props":3147,"children":3148},{"style":503},[3149],{"type":354,"value":3006},{"type":345,"tag":479,"props":3151,"children":3152},{"class":481,"line":2713},[3153],{"type":345,"tag":479,"props":3154,"children":3155},{"style":503},[3156],{"type":354,"value":3014},{"type":345,"tag":479,"props":3158,"children":3160},{"class":481,"line":3159},23,[3161,3165,3169,3173,3177,3182,3186,3190,3194,3198,3203,3208,3212,3217,3221,3226,3230,3234],{"type":345,"tag":479,"props":3162,"children":3163},{"style":734},[3164],{"type":354,"value":2968},{"type":345,"tag":479,"props":3166,"children":3167},{"style":503},[3168],{"type":354,"value":3041},{"type":345,"tag":479,"props":3170,"children":3171},{"style":734},[3172],{"type":354,"value":2908},{"type":345,"tag":479,"props":3174,"children":3175},{"style":503},[3176],{"type":354,"value":3050},{"type":345,"tag":479,"props":3178,"children":3179},{"style":486},[3180],{"type":354,"value":3181},"UpsertOutboundConsumer",{"type":345,"tag":479,"props":3183,"children":3184},{"style":503},[3185],{"type":354,"value":2398},{"type":345,"tag":479,"props":3187,"children":3188},{"style":734},[3189],{"type":354,"value":3064},{"type":345,"tag":479,"props":3191,"children":3192},{"style":486},[3193],{"type":354,"value":3069},{"type":345,"tag":479,"props":3195,"children":3196},{"style":503},[3197],{"type":354,"value":557},{"type":345,"tag":479,"props":3199,"children":3200},{"style":486},[3201],{"type":354,"value":3202},"OutboundConsumerOptions",{"type":345,"tag":479,"props":3204,"children":3205},{"style":503},[3206],{"type":354,"value":3207},"{ID: ",{"type":345,"tag":479,"props":3209,"children":3210},{"style":497},[3211],{"type":354,"value":1317},{"type":345,"tag":479,"props":3213,"children":3214},{"style":503},[3215],{"type":354,"value":3216},", Name: ",{"type":345,"tag":479,"props":3218,"children":3219},{"style":497},[3220],{"type":354,"value":2450},{"type":345,"tag":479,"props":3222,"children":3223},{"style":503},[3224],{"type":354,"value":3225},"}); err ",{"type":345,"tag":479,"props":3227,"children":3228},{"style":734},[3229],{"type":354,"value":2978},{"type":345,"tag":479,"props":3231,"children":3232},{"style":491},[3233],{"type":354,"value":2983},{"type":345,"tag":479,"props":3235,"children":3236},{"style":503},[3237],{"type":354,"value":2988},{"type":345,"tag":479,"props":3239,"children":3241},{"class":481,"line":3240},24,[3242,3246,3250],{"type":345,"tag":479,"props":3243,"children":3244},{"style":503},[3245],{"type":354,"value":2996},{"type":345,"tag":479,"props":3247,"children":3248},{"style":486},[3249],{"type":354,"value":3001},{"type":345,"tag":479,"props":3251,"children":3252},{"style":503},[3253],{"type":354,"value":3006},{"type":345,"tag":479,"props":3255,"children":3257},{"class":481,"line":3256},25,[3258],{"type":345,"tag":479,"props":3259,"children":3260},{"style":503},[3261],{"type":354,"value":3014},{"type":345,"tag":479,"props":3263,"children":3265},{"class":481,"line":3264},26,[3266,3271,3275,3279,3284,3288,3292,3296,3300,3305],{"type":345,"tag":479,"props":3267,"children":3268},{"style":503},[3269],{"type":354,"value":3270},"    endpoint, err ",{"type":345,"tag":479,"props":3272,"children":3273},{"style":734},[3274],{"type":354,"value":2908},{"type":345,"tag":479,"props":3276,"children":3277},{"style":503},[3278],{"type":354,"value":3050},{"type":345,"tag":479,"props":3280,"children":3281},{"style":486},[3282],{"type":354,"value":3283},"CreateOutboundEndpoint",{"type":345,"tag":479,"props":3285,"children":3286},{"style":503},[3287],{"type":354,"value":2398},{"type":345,"tag":479,"props":3289,"children":3290},{"style":734},[3291],{"type":354,"value":3064},{"type":345,"tag":479,"props":3293,"children":3294},{"style":486},[3295],{"type":354,"value":3069},{"type":345,"tag":479,"props":3297,"children":3298},{"style":503},[3299],{"type":354,"value":557},{"type":345,"tag":479,"props":3301,"children":3302},{"style":486},[3303],{"type":354,"value":3304},"OutboundEndpointOptions",{"type":345,"tag":479,"props":3306,"children":3307},{"style":503},[3308],{"type":354,"value":1277},{"type":345,"tag":479,"props":3310,"children":3312},{"class":481,"line":3311},27,[3313,3318,3322],{"type":345,"tag":479,"props":3314,"children":3315},{"style":503},[3316],{"type":354,"value":3317},"        Consumer:    ",{"type":345,"tag":479,"props":3319,"children":3320},{"style":497},[3321],{"type":354,"value":1317},{"type":345,"tag":479,"props":3323,"children":3324},{"style":503},[3325],{"type":354,"value":1300},{"type":345,"tag":479,"props":3327,"children":3329},{"class":481,"line":3328},28,[3330,3335,3339],{"type":345,"tag":479,"props":3331,"children":3332},{"style":503},[3333],{"type":354,"value":3334},"        URL:         ",{"type":345,"tag":479,"props":3336,"children":3337},{"style":497},[3338],{"type":354,"value":1338},{"type":345,"tag":479,"props":3340,"children":3341},{"style":503},[3342],{"type":354,"value":1300},{"type":345,"tag":479,"props":3344,"children":3346},{"class":481,"line":3345},29,[3347,3352,3357,3362,3366],{"type":345,"tag":479,"props":3348,"children":3349},{"style":503},[3350],{"type":354,"value":3351},"        EventTypes:  []",{"type":345,"tag":479,"props":3353,"children":3354},{"style":734},[3355],{"type":354,"value":3356},"string",{"type":345,"tag":479,"props":3358,"children":3359},{"style":503},[3360],{"type":354,"value":3361},"{",{"type":345,"tag":479,"props":3363,"children":3364},{"style":497},[3365],{"type":354,"value":1360},{"type":345,"tag":479,"props":3367,"children":3368},{"style":503},[3369],{"type":354,"value":3370},"},\n",{"type":345,"tag":479,"props":3372,"children":3374},{"class":481,"line":3373},30,[3375,3380,3384],{"type":345,"tag":479,"props":3376,"children":3377},{"style":503},[3378],{"type":354,"value":3379},"        AutoDisable: ",{"type":345,"tag":479,"props":3381,"children":3382},{"style":491},[3383],{"type":354,"value":453},{"type":345,"tag":479,"props":3385,"children":3386},{"style":503},[3387],{"type":354,"value":1300},{"type":345,"tag":479,"props":3389,"children":3391},{"class":481,"line":3390},31,[3392],{"type":345,"tag":479,"props":3393,"children":3394},{"style":503},[3395],{"type":354,"value":3396},"    })\n",{"type":345,"tag":479,"props":3398,"children":3400},{"class":481,"line":3399},32,[3401,3405,3409,3413,3417],{"type":345,"tag":479,"props":3402,"children":3403},{"style":734},[3404],{"type":354,"value":2968},{"type":345,"tag":479,"props":3406,"children":3407},{"style":503},[3408],{"type":354,"value":2973},{"type":345,"tag":479,"props":3410,"children":3411},{"style":734},[3412],{"type":354,"value":2978},{"type":345,"tag":479,"props":3414,"children":3415},{"style":491},[3416],{"type":354,"value":2983},{"type":345,"tag":479,"props":3418,"children":3419},{"style":503},[3420],{"type":354,"value":2988},{"type":345,"tag":479,"props":3422,"children":3424},{"class":481,"line":3423},33,[3425,3429,3433],{"type":345,"tag":479,"props":3426,"children":3427},{"style":503},[3428],{"type":354,"value":2996},{"type":345,"tag":479,"props":3430,"children":3431},{"style":486},[3432],{"type":354,"value":3001},{"type":345,"tag":479,"props":3434,"children":3435},{"style":503},[3436],{"type":354,"value":3006},{"type":345,"tag":479,"props":3438,"children":3440},{"class":481,"line":3439},34,[3441],{"type":345,"tag":479,"props":3442,"children":3443},{"style":503},[3444],{"type":354,"value":3014},{"type":345,"tag":479,"props":3446,"children":3448},{"class":481,"line":3447},35,[3449,3454,3459,3463,3468,3473,3477],{"type":345,"tag":479,"props":3450,"children":3451},{"style":503},[3452],{"type":354,"value":3453},"    log.",{"type":345,"tag":479,"props":3455,"children":3456},{"style":486},[3457],{"type":354,"value":3458},"Printf",{"type":345,"tag":479,"props":3460,"children":3461},{"style":503},[3462],{"type":354,"value":2398},{"type":345,"tag":479,"props":3464,"children":3465},{"style":497},[3466],{"type":354,"value":3467},"\"give this secret to the customer: ",{"type":345,"tag":479,"props":3469,"children":3470},{"style":491},[3471],{"type":354,"value":3472},"%s",{"type":345,"tag":479,"props":3474,"children":3475},{"style":497},[3476],{"type":354,"value":521},{"type":345,"tag":479,"props":3478,"children":3479},{"style":503},[3480],{"type":354,"value":3481},", endpoint.Secret)\n",{"type":345,"tag":479,"props":3483,"children":3485},{"class":481,"line":3484},36,[3486],{"type":345,"tag":479,"props":3487,"children":3488},{"emptyLinePlaceholder":2306},[3489],{"type":354,"value":2309},{"type":345,"tag":479,"props":3491,"children":3493},{"class":481,"line":3492},37,[3494],{"type":345,"tag":479,"props":3495,"children":3496},{"style":533},[3497],{"type":354,"value":3498},"    // Every time the event happens. Retrying with the same key never publishes twice.\n",{"type":345,"tag":479,"props":3500,"children":3502},{"class":481,"line":3501},38,[3503,3508,3512,3516,3521,3525,3529,3533,3537,3542],{"type":345,"tag":479,"props":3504,"children":3505},{"style":503},[3506],{"type":354,"value":3507},"    message, err ",{"type":345,"tag":479,"props":3509,"children":3510},{"style":734},[3511],{"type":354,"value":2908},{"type":345,"tag":479,"props":3513,"children":3514},{"style":503},[3515],{"type":354,"value":3050},{"type":345,"tag":479,"props":3517,"children":3518},{"style":486},[3519],{"type":354,"value":3520},"PublishOutboundMessage",{"type":345,"tag":479,"props":3522,"children":3523},{"style":503},[3524],{"type":354,"value":2398},{"type":345,"tag":479,"props":3526,"children":3527},{"style":734},[3528],{"type":354,"value":3064},{"type":345,"tag":479,"props":3530,"children":3531},{"style":486},[3532],{"type":354,"value":3069},{"type":345,"tag":479,"props":3534,"children":3535},{"style":503},[3536],{"type":354,"value":557},{"type":345,"tag":479,"props":3538,"children":3539},{"style":486},[3540],{"type":354,"value":3541},"OutboundMessagePublishOptions",{"type":345,"tag":479,"props":3543,"children":3544},{"style":503},[3545],{"type":354,"value":1277},{"type":345,"tag":479,"props":3547,"children":3549},{"class":481,"line":3548},39,[3550,3555,3559],{"type":345,"tag":479,"props":3551,"children":3552},{"style":503},[3553],{"type":354,"value":3554},"        Consumer:       ",{"type":345,"tag":479,"props":3556,"children":3557},{"style":497},[3558],{"type":354,"value":1317},{"type":345,"tag":479,"props":3560,"children":3561},{"style":503},[3562],{"type":354,"value":1300},{"type":345,"tag":479,"props":3564,"children":3566},{"class":481,"line":3565},40,[3567,3572,3576],{"type":345,"tag":479,"props":3568,"children":3569},{"style":503},[3570],{"type":354,"value":3571},"        EventType:      ",{"type":345,"tag":479,"props":3573,"children":3574},{"style":497},[3575],{"type":354,"value":1360},{"type":345,"tag":479,"props":3577,"children":3578},{"style":503},[3579],{"type":354,"value":1300},{"type":345,"tag":479,"props":3581,"children":3583},{"class":481,"line":3582},41,[3584,3589,3594,3599,3603,3608,3613,3618,3623,3627,3631,3635,3640,3644,3648],{"type":345,"tag":479,"props":3585,"children":3586},{"style":503},[3587],{"type":354,"value":3588},"        Payload:        ",{"type":345,"tag":479,"props":3590,"children":3591},{"style":734},[3592],{"type":354,"value":3593},"map",{"type":345,"tag":479,"props":3595,"children":3596},{"style":503},[3597],{"type":354,"value":3598},"[",{"type":345,"tag":479,"props":3600,"children":3601},{"style":734},[3602],{"type":354,"value":3356},{"type":345,"tag":479,"props":3604,"children":3605},{"style":503},[3606],{"type":354,"value":3607},"]",{"type":345,"tag":479,"props":3609,"children":3610},{"style":734},[3611],{"type":354,"value":3612},"interface",{"type":345,"tag":479,"props":3614,"children":3615},{"style":503},[3616],{"type":354,"value":3617},"{}{",{"type":345,"tag":479,"props":3619,"children":3620},{"style":497},[3621],{"type":354,"value":3622},"\"invoice_id\"",{"type":345,"tag":479,"props":3624,"children":3625},{"style":503},[3626],{"type":354,"value":1290},{"type":345,"tag":479,"props":3628,"children":3629},{"style":497},[3630],{"type":354,"value":2650},{"type":345,"tag":479,"props":3632,"children":3633},{"style":503},[3634],{"type":354,"value":1516},{"type":345,"tag":479,"props":3636,"children":3637},{"style":497},[3638],{"type":354,"value":3639},"\"amount\"",{"type":345,"tag":479,"props":3641,"children":3642},{"style":503},[3643],{"type":354,"value":1290},{"type":345,"tag":479,"props":3645,"children":3646},{"style":491},[3647],{"type":354,"value":2660},{"type":345,"tag":479,"props":3649,"children":3650},{"style":503},[3651],{"type":354,"value":3370},{"type":345,"tag":479,"props":3653,"children":3655},{"class":481,"line":3654},42,[3656,3661,3665],{"type":345,"tag":479,"props":3657,"children":3658},{"style":503},[3659],{"type":354,"value":3660},"        IdempotencyKey: ",{"type":345,"tag":479,"props":3662,"children":3663},{"style":497},[3664],{"type":354,"value":2679},{"type":345,"tag":479,"props":3666,"children":3667},{"style":503},[3668],{"type":354,"value":1300},{"type":345,"tag":479,"props":3670,"children":3672},{"class":481,"line":3671},43,[3673],{"type":345,"tag":479,"props":3674,"children":3675},{"style":503},[3676],{"type":354,"value":3396},{"type":345,"tag":479,"props":3678,"children":3680},{"class":481,"line":3679},44,[3681,3685,3689,3693,3697],{"type":345,"tag":479,"props":3682,"children":3683},{"style":734},[3684],{"type":354,"value":2968},{"type":345,"tag":479,"props":3686,"children":3687},{"style":503},[3688],{"type":354,"value":2973},{"type":345,"tag":479,"props":3690,"children":3691},{"style":734},[3692],{"type":354,"value":2978},{"type":345,"tag":479,"props":3694,"children":3695},{"style":491},[3696],{"type":354,"value":2983},{"type":345,"tag":479,"props":3698,"children":3699},{"style":503},[3700],{"type":354,"value":2988},{"type":345,"tag":479,"props":3702,"children":3704},{"class":481,"line":3703},45,[3705,3709,3713],{"type":345,"tag":479,"props":3706,"children":3707},{"style":503},[3708],{"type":354,"value":2996},{"type":345,"tag":479,"props":3710,"children":3711},{"style":486},[3712],{"type":354,"value":3001},{"type":345,"tag":479,"props":3714,"children":3715},{"style":503},[3716],{"type":354,"value":3006},{"type":345,"tag":479,"props":3718,"children":3720},{"class":481,"line":3719},46,[3721],{"type":345,"tag":479,"props":3722,"children":3723},{"style":503},[3724],{"type":354,"value":3014},{"type":345,"tag":479,"props":3726,"children":3728},{"class":481,"line":3727},47,[3729,3733,3737,3741,3746,3750,3754],{"type":345,"tag":479,"props":3730,"children":3731},{"style":503},[3732],{"type":354,"value":3453},{"type":345,"tag":479,"props":3734,"children":3735},{"style":486},[3736],{"type":354,"value":3458},{"type":345,"tag":479,"props":3738,"children":3739},{"style":503},[3740],{"type":354,"value":2398},{"type":345,"tag":479,"props":3742,"children":3743},{"style":497},[3744],{"type":354,"value":3745},"\"accepted message ",{"type":345,"tag":479,"props":3747,"children":3748},{"style":491},[3749],{"type":354,"value":3472},{"type":345,"tag":479,"props":3751,"children":3752},{"style":497},[3753],{"type":354,"value":521},{"type":345,"tag":479,"props":3755,"children":3756},{"style":503},[3757],{"type":354,"value":3758},", message.ID)\n",{"type":345,"tag":479,"props":3760,"children":3762},{"class":481,"line":3761},48,[3763],{"type":345,"tag":479,"props":3764,"children":3765},{"style":503},[3766],{"type":354,"value":1432},{"type":345,"tag":346,"props":3768,"children":3769},{},[3770,3772,3778,3780,3786,3788,3794],{"type":354,"value":3771},"If you leave ",{"type":345,"tag":359,"props":3773,"children":3775},{"className":3774},[],[3776],{"type":354,"value":3777},"IdempotencyKey",{"type":354,"value":3779}," empty, the Go SDK generates one for each call so that its own automatic retries can't publish twice. The TypeScript SDK sends a key only when you pass ",{"type":345,"tag":359,"props":3781,"children":3783},{"className":3782},[],[3784],{"type":354,"value":3785},"idempotencyKey",{"type":354,"value":3787},". In both SDKs, you should pass a key derived from your event so that retries performed by ",{"type":345,"tag":3789,"props":3790,"children":3791},"em",{},[3792],{"type":354,"value":3793},"your",{"type":354,"value":3795}," code are deduplicated too.",{"type":345,"tag":409,"props":3797,"children":3799},{"id":3798},"next-steps",[3800],{"type":354,"value":3801},"Next steps",{"type":345,"tag":3803,"props":3804,"children":3805},"ul",{},[3806,3819],{"type":345,"tag":3807,"props":3808,"children":3809},"li",{},[3810,3812,3817],{"type":354,"value":3811},"Send your customers the ",{"type":345,"tag":368,"props":3813,"children":3814},{"href":71},[3815],{"type":354,"value":3816},"receiving guide",{"type":354,"value":3818}," along with their signing secret.",{"type":345,"tag":3807,"props":3820,"children":3821},{},[3822,3824,3829],{"type":354,"value":3823},"See ",{"type":345,"tag":368,"props":3825,"children":3826},{"href":74},[3827],{"type":354,"value":3828},"monitor, retry and recover deliveries",{"type":354,"value":3830}," for delivery history, endpoint health and recovery.",{"type":345,"tag":3832,"props":3833,"children":3834},"style",{},[3835],{"type":354,"value":3836},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":318,"searchDepth":863,"depth":863,"links":3838},[3839,3840,3841,3842,3843,3844,3845,3846,3850],{"id":411,"depth":529,"text":414},{"id":560,"depth":529,"text":563},{"id":781,"depth":529,"text":784},{"id":955,"depth":529,"text":958},{"id":1096,"depth":529,"text":1099},{"id":1666,"depth":529,"text":1669},{"id":2144,"depth":529,"text":2147},{"id":2214,"depth":529,"text":2217,"children":3847},[3848,3849],{"id":2221,"depth":863,"text":2224},{"id":2748,"depth":863,"text":2751},{"id":3798,"depth":529,"text":3801},"markdown","content:docs:outbound:2.setup.md","content","docs/outbound/2.setup.md","docs/outbound/2.setup","md",{"loc":68},1791655669347]