{"componentChunkName":"component---src-templates-api-js","path":"/api/relay-webhooks/","result":{"data":{"allApiBlueprint":{"edges":[{"node":{"meta":{"title":"A/B Testing API","label":"New"},"fields":{"path":"/api/ab-testing/","file":"ab-testing.apib"}}},{"node":{"meta":{"title":"Data Privacy API","label":"New"},"fields":{"path":"/api/data-privacy/","file":"data-privacy.apib"}}},{"node":{"meta":{"title":"Events API","label":null},"fields":{"path":"/api/events/","file":"events.apib"}}},{"node":{"meta":{"title":"Ingest API","label":"Private Access"},"fields":{"path":"/api/events-ingest/","file":"events-ingest.apib"}}},{"node":{"meta":{"title":"Inbound Domains API","label":null},"fields":{"path":"/api/inbound-domains/","file":"inbound-domains.apib"}}},{"node":{"meta":{"title":"Account API","label":null},"fields":{"path":"/api/account/","file":"account.apib"}}},{"node":{"meta":{"title":"API Overview","label":null},"fields":{"path":"/api/","file":"index.apib"}}},{"node":{"meta":{"title":"Automatic Inline Seeding","label":"Deliverability"},"fields":{"path":"/api/inline-seeds/","file":"inline-seeds.apib"}}},{"node":{"meta":{"title":"Labs APIs","label":null},"fields":{"path":"/api/labs/","file":"labs.apib"}}},{"node":{"meta":{"title":"Message Events API","label":null},"fields":{"path":"/api/message-events/","file":"message-events.apib"}}},{"node":{"meta":{"title":"Recipient Validation API","label":"New"},"fields":{"path":"/api/recipient-validation/","file":"recipient-validation.apib"}}},{"node":{"meta":{"title":"IP Pools API","label":null},"fields":{"path":"/api/ip-pools/","file":"ip-pools.apib"}}},{"node":{"meta":{"title":"Seed List API","label":"Deliverability"},"fields":{"path":"/api/seed-list/","file":"seed-list.apib"}}},{"node":{"meta":{"title":"Bounce Domains API","label":null},"fields":{"path":"/api/bounce-domains/","file":"bounce-domains.apib"}}},{"node":{"meta":{"title":"Recipient Lists API","label":null},"fields":{"path":"/api/recipient-lists/","file":"recipient-lists.apib"}}},{"node":{"meta":{"title":"Sending IPs API","label":null},"fields":{"path":"/api/sending-ips/","file":"sending-ips.apib"}}},{"node":{"meta":{"title":"Relay Webhooks API","label":null},"fields":{"path":"/api/relay-webhooks/","file":"relay-webhooks.apib"}}},{"node":{"meta":{"title":"SMTP API","label":null},"fields":{"path":"/api/smtp/","file":"smtp.apib"}}},{"node":{"meta":{"title":"Snippets API","label":"New"},"fields":{"path":"/api/snippets/","file":"snippets.apib"}}},{"node":{"meta":{"title":"Subaccounts API","label":null},"fields":{"path":"/api/subaccounts/","file":"subaccounts.apib"}}},{"node":{"meta":{"title":"Sending Domains API","label":null},"fields":{"path":"/api/sending-domains/","file":"sending-domains.apib"}}},{"node":{"meta":{"title":"Suppression List API","label":null},"fields":{"path":"/api/suppression-list/","file":"suppression-list.apib"}}},{"node":{"meta":{"title":"Template Language","label":null},"fields":{"path":"/api/template-language/","file":"template-language.apib"}}},{"node":{"meta":{"title":"Tracking Domains API","label":null},"fields":{"path":"/api/tracking-domains/","file":"tracking-domains.apib"}}},{"node":{"meta":{"title":"Templates API","label":null},"fields":{"path":"/api/templates/","file":"templates.apib"}}},{"node":{"meta":{"title":"Transmissions API","label":null},"fields":{"path":"/api/transmissions/","file":"transmissions.apib"}}},{"node":{"meta":{"title":"Event Webhooks API","label":null},"fields":{"path":"/api/webhooks/","file":"webhooks.apib"}}},{"node":{"meta":{"title":"Usage API","label":null},"fields":{"path":"/api/usage/","file":"usage.apib"}}},{"node":{"meta":{"title":"Metrics API","label":null},"fields":{"path":"/api/metrics/","file":"metrics.apib"}}}]},"apiBlueprint":{"ast":{"element":"parseResult","content":[{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"api"}]},"title":{"element":"string","content":""}},"attributes":{"meta":{"element":"array","content":[{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"FORMAT"},"value":{"element":"string","content":"1A"}}},{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"title"},"value":{"element":"string","content":"Relay Webhooks API"}}},{"element":"member","meta":{"classes":{"element":"array","content":[{"element":"string","content":"user"}]}},"content":{"key":{"element":"string","content":"description"},"value":{"element":"string","content":"Manage relay webhooks, a way to instruct SparkPost to accept inbound email on your behalf and forward it to you over HTTP."}}}]}},"content":[{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"resourceGroup"}]},"title":{"element":"string","content":"Relay Webhooks"}},"content":[{"element":"copy","content":"Relay Webhooks are a way to instruct SparkPost to forward messages sent to an inbound domain to a target url for your own consumption. Before you create a relay webhook, first create and configure an [inbound domain](/api/inbound-domains/). The Relay Webhooks API provides the means to create, list, retrieve, update, and delete a relay webhook.  To consume event webhooks see [Event Webhooks](https://developers.sparkpost.com/api/webhooks/)\n\n## Relay Webhook Object\n\n<DataStructure id=\"7cd1fb7b8aea01947f34464232870903\"  title=\"Attributes\"  sample=\"%7B%0A%20%20%20%20%22id%22%3A%20%2212013026328707075%22%2C%0A%20%20%20%20%22name%22%3A%20%22Inbound%20Customer%20Replies%22%2C%0A%20%20%20%20%22target%22%3A%20%22https%3A//webhooks.customer.example/replies%22%2C%0A%20%20%20%20%22auth_token%22%3A%20%225ebe2294ecd0e0f08eab7690d2a6ee69%22%2C%0A%20%20%20%20%22match%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22protocol%22%3A%20%22SMTP%22%2C%0A%20%20%20%20%20%20%20%20%22domain%22%3A%20%22example.com%22%0A%20%20%20%20%7D%0A%7D\"></DataStructure>\n\n### Custom HTTP Headers Properties\n\nThe custom headers JSON object allows you to add up to five custom headers to your relay webhook. The `custom_headers` object may only be up to 3,000 bytes in size, and must be formatted as an object with keys as strings or numbers. Headers already used by SparkPost will not be allowed, and SparkPost may also disallow some HTTP headers for security reasons.\n\n**Adding Custom Headers**\n\nWhen creating (POST) or updating (PUT) a Relay Webhook:\n\n```json\n{\n  \"custom_headers\": {\n    \"header1\": \"value1\",\n    \"header2\": \"value2\"\n  }\n}\n```\n\n**Removing Custom Headers**\n\nWhen updating (PUT) a Relay Webhook:\n\n```json\n{\n  \"custom_headers\": {}\n}\n```\n\n## Relay Webhook Payload\n\nThe following fields will be included in each object posted to the relay webhook's target:\n\n<DataStructure id=\"db0c5a99cf0aa16241f236b9424aa05f\"  title=\"relay_message\"  sample=\"%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22msys%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%22relay_message%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22content%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22email_rfc822%22%3A%20%22Return-Path%3A%20%3Cme@here.com%3E%5Cr%5CnMIME-Version%3A%201.0%5Cr%5CnFrom%3A%20me@here.com%5Cr%5CnReceived%3A%20by%2010.114.82.10%20with%20HTTP%3B%20Mon%2C%204%20Jul%202016%2007%3A53%3A14%20-0700%20%28PDT%29%5Cr%5CnDate%3A%20Mon%2C%204%20Jul%202016%2015%3A53%3A14%20+0100%5Cr%5CnMessage-ID%3A%20%3C484810298443-112311-xqxbby@mail.there.com%3E%5Cr%5CnSubject%3A%20Relay%20webhooks%20rawk%21%5Cr%5CnTo%3A%20you@there.com%5Cr%5CnContent-Type%3A%20multipart/alternative%3B%20boundary%3Ddeaddeaffeedf00fall45dbhail980dhypnot0ad%5Cr%5Cn%5Cr%5Cn--deaddeaffeedf00fall45dbhail980dhypnot0ad%5Cr%5CnContent-Type%3A%20text/plain%3B%20charset%3DUTF-8%5Cr%5Cn%5Cr%5CnHi%20there%20SparkPostians.%5Cr%5Cn%5Cr%5Cn--deaddeaffeedf00fall45dbhail980dhypnot0ad%5Cr%5CnContent-Type%3A%20text/html%3B%20charset%3DUTF-8%5Cr%5Cn%5Cr%5Cn%3Cp%3EHi%20there%20%3Cstrong%3ESparkPostians%3C/strong%3E%3C/p%3E%5Cr%5Cn%5Cr%5Cn--deaddeaffeedf00fall45dbhail980dhypnot0ad--%5Cr%5Cn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22email_rfc822_is_base64%22%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22headers%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Return-Path%22%3A%20%22%3Cme@here.com%3E%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22MIME-Version%22%3A%20%221.0%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22From%22%3A%20%22me@here.com%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Received%22%3A%20%22by%2010.114.82.10%20with%20HTTP%3B%20Mon%2C%204%20Jul%202016%2007%3A53%3A14%20-0700%20%28PDT%29%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Date%22%3A%20%22Mon%2C%204%20Jul%202016%2015%3A53%3A14%20+0100%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Message-ID%22%3A%20%22%3C484810298443-112311-xqxbby@mail.there.com%3E%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22Subject%22%3A%20%22Relay%20webhooks%20rawk%21%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22To%22%3A%20%22you@there.com%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22html%22%3A%20%22%3Cp%3EHi%20there%20%3Cstrong%3ESparkPostians%3C/strong%3E.%3C/p%3E%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22subject%22%3A%20%22We%20come%20in%20peace%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Hi%20there%20SparkPostians.%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22to%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22your@yourdomain.com%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22customer_id%22%3A%20%221337%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22friendly_from%22%3A%20%22me@here.com%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22msg_from%22%3A%20%22me@here.com%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22rcpt_to%22%3A%20%22you@there.com%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22webhook_id%22%3A%20%224839201967643219%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%5D\"></DataStructure>"},{"element":"resource","meta":{"title":{"element":"string","content":"Create a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Create a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks"}},"content":[{"element":"copy","content":"Create a relay webhook by providing a relay webhooks object as the POST request body.\n\n<DataStructure id=\"2737575d6cd2727bdd6a8bfd8ab1253a\"  ></DataStructure>"},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Replies Webhook\",\n      \"target\": \"https://webhooks.customer.example/replies\",\n      \"auth_token\": \"5ebe2294ecd0e0f08eab7690d2a6ee69\",\n      \"auth_type\": \"oauth2\",\n      \"auth_request_details\": {\n          \"url\": \"http://client.example.com/tokens\",\n          \"body\": {\n              \"client_id\": \"CLIENT123\",\n              \"client_secret\": \"9sdfj791d2bsbf\"\n          }\n      },\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.example.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"id\": \"12013026328707075\"\n      }\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Replies Webhook\",\n      \"target\": \"https://webhooks.customer.example/replies\",\n      \"auth_token\": \"5ebe2294ecd0e0f08eab7690d2a6ee69\",\n      \"auth_type\": \"oauth2\",\n      \"auth_request_details\": {\n          \"url\": \"http://client.example.com/tokens\",\n          \"body\": {\n              \"client_id\": \"CLIENT123\",\n              \"client_secret\": \"9sdfj791d2bsbf\"\n          }\n      },\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.example.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"400"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Domain 'domain' is not a registered inbound domain\",\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Replies Webhook\",\n      \"target\": \"https://webhooks.customer.example/replies\",\n      \"auth_token\": \"5ebe2294ecd0e0f08eab7690d2a6ee69\",\n      \"auth_type\": \"oauth2\",\n      \"auth_request_details\": {\n          \"url\": \"http://client.example.com/tokens\",\n          \"body\": {\n              \"client_id\": \"CLIENT123\",\n              \"client_secret\": \"9sdfj791d2bsbf\"\n          }\n      },\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.example.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"409"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Domain 'domain' is already in use\",\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Replies Webhook\",\n      \"target\": \"https://webhooks.customer.example/replies\",\n      \"auth_token\": \"5ebe2294ecd0e0f08eab7690d2a6ee69\",\n      \"auth_type\": \"oauth2\",\n      \"auth_request_details\": {\n          \"url\": \"http://client.example.com/tokens\",\n          \"body\": {\n              \"client_id\": \"CLIENT123\",\n              \"client_secret\": \"9sdfj791d2bsbf\"\n          }\n      },\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.example.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"422"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\" : [\n          {\n              \"param\": \"custom_headers\",\n              \"message\": \"Header is reserved and cannot be used\",\n              \"value\": \"reserved-header\"\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"Replies Webhook\",\n      \"target\": \"https://webhooks.customer.example/replies\",\n      \"auth_token\": \"5ebe2294ecd0e0f08eab7690d2a6ee69\",\n      \"auth_type\": \"oauth2\",\n      \"auth_request_details\": {\n          \"url\": \"http://client.example.com/tokens\",\n          \"body\": {\n              \"client_id\": \"CLIENT123\",\n              \"client_secret\": \"9sdfj791d2bsbf\"\n          }\n      },\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.example.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"422"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"param\": \"custom_headers\",\n              \"message\": \"You may only have up to 5 custom headers\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Validate a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}/validate"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Validate a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}/validate"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string","content":"12013026328707075"}}}]}},"content":[{"element":"copy","content":"The validation request sends an example batch to the target URL, validates that the target responds with HTTP 200,\nand returns information on the response received from the target.\n\n[Example batch](#header-relay-webhook-payload)"},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"POST"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"msg\": \"Test POST to endpoint succeeded\",\n          \"response\": {\n              \"status\": 200,\n              \"headers\": {\n                  \"Content-Type\": \"text/plain\"\n              },\n              \"body\": \"OK\"\n          }\n      }\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Retrieve a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Retrieve a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string","content":"12013026328707075"}}}]}},"content":[{"element":"copy","content":"Retrieve a specific relay webhook by specifying the webhook ID in the URI path."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"name\": \"Replies Webhook\",\n          \"target\": \"https://webhooks.customer.example/replies\",\n          \"auth_token\": \"5ebe2294ecd0e0f08eab7690d2a6ee69\",\n          \"auth_type\": \"oauth2\",\n          \"auth_request_details\": {\n              \"url\": \"https://oauth.myurl.com/tokens\",\n              \"body\": {\n                  \"client_id\": \"<oauth client id>\",\n                  \"client_secret\": \"<oauth client secret>\"\n              }\n          },\n          \"custom_headers\": {\n              \"x-api-key\": \"abcd\"\n          },\n          \"match\": {\n              \"protocol\": \"SMTP\",\n              \"domain\": \"email.example.com\"\n          }\n      }\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"401"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Unauthorized\",\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"404"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Resource could not be found\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Update a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Update a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string","content":"12013026328707075"}}}]}},"content":[{"element":"copy","content":"Update a relay webhook by specifying the webhook ID in the URI path.\n\n<DataStructure id=\"10d37a9c392d95ebcf3e33558e0eb3cf\"  ></DataStructure>"},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"New Replies Webhook\",\n      \"target\": \"https://webhook.customer.example/replies\",\n      \"auth_token\": \"A different auth token\",\n      \"auth_type\": \"none\",\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.a-different-domain.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": {\n          \"id\": \"12013026328707075\"\n      }\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"New Replies Webhook\",\n      \"target\": \"https://webhook.customer.example/replies\",\n      \"auth_token\": \"A different auth token\",\n      \"auth_type\": \"none\",\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.a-different-domain.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"400"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Domain 'domain' is not a registered inbound domain\",\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"New Replies Webhook\",\n      \"target\": \"https://webhook.customer.example/replies\",\n      \"auth_token\": \"A different auth token\",\n      \"auth_type\": \"none\",\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.a-different-domain.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"400"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"no valid fields in body\"\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"New Replies Webhook\",\n      \"target\": \"https://webhook.customer.example/replies\",\n      \"auth_token\": \"A different auth token\",\n      \"auth_type\": \"none\",\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.a-different-domain.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"404"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Resource could not be found\"\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"PUT"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}},{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"name\": \"New Replies Webhook\",\n      \"target\": \"https://webhook.customer.example/replies\",\n      \"auth_token\": \"A different auth token\",\n      \"auth_type\": \"none\",\n      \"custom_headers\": {\n          \"x-api-key\": \"abcd\"\n      },\n      \"match\": {\n          \"domain\": \"email.a-different-domain.com\"\n      }\n  }\n"}]},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"409"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Domain 'domain' is already in use\",\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"Delete a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"Delete a Relay Webhook"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks/{id}"},"hrefVariables":{"element":"hrefVariables","content":[{"element":"member","meta":{"title":{"element":"string","content":"string"}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string","content":"12013026328707075"}}}]}},"content":[{"element":"copy","content":"Delete a relay webhook by specifying the webhook ID in the URI path."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"}}}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"DELETE"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"404"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Resource could not be found\"\n          }\n      ]\n  }\n"}]}]}]}]},{"element":"resource","meta":{"title":{"element":"string","content":"List all Relay Webhooks"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks"}},"content":[{"element":"transition","meta":{"title":{"element":"string","content":"List all Relay Webhooks"}},"attributes":{"href":{"element":"string","content":"/v1/relay-webhooks"}},"content":[{"element":"copy","content":"List all your relay webhooks."},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"200"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"results\": [\n          {\n              \"id\": \"12013026328707075\",\n              \"name\": \"Replies Webhook\",\n              \"target\": \"https://webhooks.customer.example/replies\",\n              \"auth_token\": \"5ebe2294ecd0e0f08eab7690d2a6ee69\",\n              \"auth_type\": \"oauth2\",\n              \"auth_request_details\": {\n                  \"url\": \"https://oauth.myurl.com/tokens\",\n                  \"body\": {\n                      \"client_id\": \"<oauth client id>\",\n                      \"client_secret\": \"<oauth client secret>\"\n                  }\n              },\n              \"custom_headers\": {\n                  \"x-webhook-source\": \"sparkpost\"\n              },\n              \"match\": {\n                  \"protocol\": \"SMTP\",\n                  \"domain\": \"email.example.com\"\n              }\n          }\n      ]\n  }\n"}]}]},{"element":"httpTransaction","content":[{"element":"httpRequest","attributes":{"method":{"element":"string","content":"GET"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Authorization"},"value":{"element":"string","content":"14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"}}},{"element":"member","content":{"key":{"element":"string","content":"Accept"},"value":{"element":"string","content":"application/json"}}}]}}},{"element":"httpResponse","attributes":{"statusCode":{"element":"string","content":"401"},"headers":{"element":"httpHeaders","content":[{"element":"member","content":{"key":{"element":"string","content":"Content-Type"},"value":{"element":"string","content":"application/json"}}}]}},"content":[{"element":"asset","meta":{"classes":{"element":"array","content":[{"element":"string","content":"messageBody"}]}},"attributes":{"contentType":{"element":"string","content":"application/json"}},"content":"  {\n      \"errors\": [\n          {\n              \"message\": \"Unauthorized\"\n          }\n      ]\n  }\n"}]}]}]}]}]},{"element":"category","meta":{"classes":{"element":"array","content":[{"element":"string","content":"dataStructures"}]}},"content":[{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"7cd1fb7b8aea01947f34464232870903"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Unique ID"}},"content":{"key":{"element":"string","content":"id"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Relay webhook name"}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"URL of the target to which to POST relay batches"}},"content":{"key":{"element":"string","content":"target"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Type of authentication to be used during POST requests to target."}},"content":{"key":{"element":"string","content":"auth_type"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"none"},{"element":"string","content":"oauth2"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Object containing details needed to request authorization token for OAuth 2.0. This is required when `auth_type` is oauth2 and only grant_type of credentials is supported."}},"content":{"key":{"element":"string","content":"auth_request_details"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"The URL for the authorization server."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"url"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The body to send in the request to the authorization server. This likely should contain the client ID, client secret, and grant type."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"body"},"value":{"element":"object"}}}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Authentication token to present in the `X-MessageSystems-Webhook-Token` header of POST requests to target. Use this token in your target application to confirm that data is coming from SparkPost."}},"content":{"key":{"element":"string","content":"auth_token"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Restrict which inbound messages will be relayed to the target."}},"content":{"key":{"element":"string","content":"match"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"Inbound messaging protocol associated with this webhook."}},"content":{"key":{"element":"string","content":"protocol"},"value":{"element":"string","content":"SMTP"}}},{"element":"member","meta":{"description":{"element":"string","content":"Inbound domain associated with this webhook."}},"content":{"key":{"element":"string","content":"domain"},"value":{"element":"string"}}}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Object of custom HTTP headers to be used during POST requests to target."}},"content":{"key":{"element":"string","content":"custom_headers"},"value":{"element":"object"}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"db0c5a99cf0aa16241f236b9424aa05f"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"The content parsed from the incoming message."}},"content":{"key":{"element":"string","content":"content"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"Contents of the last text/html part of the message."}},"content":{"key":{"element":"string","content":"html"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Contents of the last text/plain part of the message."}},"content":{"key":{"element":"string","content":"text"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"\"Subject\" header value (decoded from email)."}},"content":{"key":{"element":"string","content":"subject"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"\"To\" header value (decoded from email), RFC2822 address list."}},"content":{"key":{"element":"string","content":"to"},"value":{"element":"array","content":[{"element":"string"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"\"CC\" header value (decoded from email), RFC2822 address list."}},"content":{"key":{"element":"string","content":"cc"},"value":{"element":"array","content":[{"element":"string"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Ordered array of email top-level headers. This array preserves ordering and allows for multiple occurrences of a header (e.g. to support trace headers such as \"Received\")."}},"content":{"key":{"element":"string","content":"headers"},"value":{"element":"array","content":[{"element":"object"}]}}},{"element":"member","meta":{"description":{"element":"string","content":"  Raw MIME content for an email. If the Raw MIME content contains at least one non UTF-8 encoded character, the entire `email_rfc822` value will be base64 encoded and `email_rfc822_is_base64` will be set to true."}},"content":{"key":{"element":"string","content":"email_rfc822"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"  Whether the `email_rfc822` value is base64 encoded."}},"content":{"key":{"element":"string","content":"email_rfc822_is_base64"},"value":{"element":"boolean"}}}]}}},{"element":"member","meta":{"description":{"element":"string","content":"  Email address used to compose the \"From\" header"}},"content":{"key":{"element":"string","content":"friendly_from"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"  [SMTP envelope](http://www.rfcreader.com/#rfc5321_line817) \"MAIL FROM\", matches \"Return-Path\" header address"}},"content":{"key":{"element":"string","content":"msg_from"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"  [SMTP envelope](http://www.rfcreader.com/#rfc5321_line817) \"RCPT TO\""}},"content":{"key":{"element":"string","content":"rcpt_to"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"ID of the relay webhook which triggered this relay message."}},"content":{"key":{"element":"string","content":"webhook_id"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Protocol of the originating inbound message."}},"content":{"key":{"element":"string","content":"protocol"},"value":{"element":"string","content":"smtp"}}},{"element":"member","meta":{"description":{"element":"string","content":"Customer ID of the customer that created the relay webhook."}},"content":{"key":{"element":"string","content":"customer_id"},"value":{"element":"string"}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"2737575d6cd2727bdd6a8bfd8ab1253a"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Relay webhook name"}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"URL of the target to which to POST relay batches. Only ports 80 for http and 443 for https can be set."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"target"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Type of authentication to be used during POST requests to target."}},"content":{"key":{"element":"string","content":"auth_type"},"value":{"element":"enum","attributes":{"default":{"element":"enum","content":{"element":"string","content":"none"}},"enumerations":{"element":"array","content":[{"element":"string","content":"none"},{"element":"string","content":"oauth2"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Object containing details needed to request authorization token for OAuth 2.0. This is required when `auth_type` is oauth2 and only grant_type of credentials is supported."}},"content":{"key":{"element":"string","content":"auth_request_details"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"The URL for the authorization server."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"url"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The body to send in the request to the authorization server. This likely should contain the client ID, and client secret."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"body"},"value":{"element":"object"}}}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Authentication token to present in the `X-MessageSystems-Webhook-Token` header of POST requests to target."}},"content":{"key":{"element":"string","content":"auth_token"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Restrict which inbound messages will be relayed to the target."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"match"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"Inbound domain associated with this webhook."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"domain"},"value":{"element":"string"}}}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Object of custom HTTP headers to be used during POST requests to target."}},"content":{"key":{"element":"string","content":"custom_headers"},"value":{"element":"object"}}}]}},{"element":"dataStructure","content":{"element":"object","meta":{"id":{"element":"string","content":"10d37a9c392d95ebcf3e33558e0eb3cf"}},"content":[{"element":"member","meta":{"description":{"element":"string","content":"Relay webhook name"}},"content":{"key":{"element":"string","content":"name"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"URL of the target to which to POST relay batches. Only ports 80 for http and 443 for https can be set."}},"content":{"key":{"element":"string","content":"target"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"Authentication token to present in the `X-MessageSystems-Webhook-Token` header of POST requests to target."}},"content":{"key":{"element":"string","content":"auth_token"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"  Type of authentication to be used during POST requests to target. Read more about [webhook authentication](https://www.sparkpost.com/docs/tech-resources/webhook-authentication/#webhook-authentication-set-up)."}},"content":{"key":{"element":"string","content":"auth_type"},"value":{"element":"enum","attributes":{"enumerations":{"element":"array","content":[{"element":"string","content":"none"},{"element":"string","content":"oauth2"}]}}}}},{"element":"member","meta":{"description":{"element":"string","content":"Object containing details needed to request authorization token for OAuth 2.0. This is required when `auth_type` is oauth2 and only grant_type of credentials is supported."}},"content":{"key":{"element":"string","content":"auth_request_details"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"The URL for the authorization server."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"url"},"value":{"element":"string"}}},{"element":"member","meta":{"description":{"element":"string","content":"The body to send in the request to the authorization server. This likely should contain the client ID, client secret, and grant type."}},"attributes":{"typeAttributes":{"element":"array","content":[{"element":"string","content":"required"}]}},"content":{"key":{"element":"string","content":"body"},"value":{"element":"object"}}}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Restrict which inbound messages will be relayed to the target."}},"content":{"key":{"element":"string","content":"match"},"value":{"element":"object","content":[{"element":"member","meta":{"description":{"element":"string","content":"Inbound domain associated with this webhook."}},"content":{"key":{"element":"string","content":"domain"},"value":{"element":"string"}}}]}}},{"element":"member","meta":{"description":{"element":"string","content":"Object of custom HTTP headers to be used during POST requests to target."}},"content":{"key":{"element":"string","content":"custom_headers"},"value":{"element":"object"}}}]}}]}]},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":2},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":9453},{"element":"number","content":307}]}]}]}},"content":"response payload `422` already defined for `POST` method"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":10},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":11990},{"element":"number","content":4}]},{"element":"array","content":[{"element":"number","content":12002},{"element":"number","content":18}]},{"element":"array","content":[{"element":"number","content":12028},{"element":"number","content":12}]},{"element":"array","content":[{"element":"number","content":12048},{"element":"number","content":41}]},{"element":"array","content":[{"element":"number","content":12097},{"element":"number","content":12}]},{"element":"array","content":[{"element":"number","content":12117},{"element":"number","content":8}]},{"element":"array","content":[{"element":"number","content":12133},{"element":"number","content":4}]}]}]}},"content":"message-body asset is expected to be a pre-formatted code block, every of its line indented by exactly 12 spaces or 3 tabs"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":10},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12197},{"element":"number","content":4}]},{"element":"array","content":[{"element":"number","content":12209},{"element":"number","content":18}]},{"element":"array","content":[{"element":"number","content":12235},{"element":"number","content":12}]},{"element":"array","content":[{"element":"number","content":12255},{"element":"number","content":55}]},{"element":"array","content":[{"element":"number","content":12318},{"element":"number","content":12}]},{"element":"array","content":[{"element":"number","content":12338},{"element":"number","content":8}]},{"element":"array","content":[{"element":"number","content":12354},{"element":"number","content":4}]}]}]}},"content":"message-body asset is expected to be a pre-formatted code block, every of its line indented by exactly 12 spaces or 3 tabs"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":2},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":13678},{"element":"number","content":241}]}]}]}},"content":"response payload `400` already defined for `PUT` method"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":2},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":12359},{"element":"number","content":58}]}]}]}},"content":"the resource '/v1/relay-webhooks/{id}' is already defined"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":2},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":14416},{"element":"number","content":61}]}]}]}},"content":"the resource '/v1/relay-webhooks/{id}' is already defined"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":2},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":14999},{"element":"number","content":54}]}]}]}},"content":"the resource '/v1/relay-webhooks' is already defined"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":8},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":17548},{"element":"number","content":252}]}]}]}},"content":"'object' with value definition. You should use type definition without value eg. '- key (object)'"},{"element":"annotation","meta":{"classes":{"element":"array","content":[{"element":"string","content":"warning"}]}},"attributes":{"code":{"element":"number","content":6},"sourceMap":{"element":"array","content":[{"element":"sourceMap","content":[{"element":"array","content":[{"element":"number","content":19618},{"element":"number","content":134}]}]}]}},"content":"no value(s) specified"}]},"TableOfContents":[{"anchor":"#relay-webhooks","title":"Relay Webhooks","children":[{"anchor":"#header-relay-webhook-object","title":"Relay Webhook Object"},{"anchor":"#header-custom-http-headers-properties","title":"Custom HTTP Headers Properties"},{"anchor":"#header-relay-webhook-payload","title":"Relay Webhook Payload"},{"anchor":"#relay-webhooks-create-a-relay-webhook","title":"Create a Relay Webhook","children":[{"anchor":"#relay-webhooks-post-create-a-relay-webhook","title":"Create a Relay Webhook"}]},{"anchor":"#relay-webhooks-validate-a-relay-webhook","title":"Validate a Relay Webhook","children":[{"anchor":"#relay-webhooks-post-validate-a-relay-webhook","title":"Validate a Relay Webhook"}]},{"anchor":"#relay-webhooks-retrieve-a-relay-webhook","title":"Retrieve a Relay Webhook","children":[{"anchor":"#relay-webhooks-get-retrieve-a-relay-webhook","title":"Retrieve a Relay Webhook"}]},{"anchor":"#relay-webhooks-update-a-relay-webhook","title":"Update a Relay Webhook","children":[{"anchor":"#relay-webhooks-put-update-a-relay-webhook","title":"Update a Relay Webhook"}]},{"anchor":"#relay-webhooks-delete-a-relay-webhook","title":"Delete a Relay Webhook","children":[{"anchor":"#relay-webhooks-delete-delete-a-relay-webhook","title":"Delete a Relay Webhook"}]},{"anchor":"#relay-webhooks-list-all-relay-webhooks","title":"List all Relay Webhooks","children":[{"anchor":"#relay-webhooks-get-list-all-relay-webhooks","title":"List all Relay Webhooks"}]}]}],"meta":{"title":"Relay Webhooks API","description":"Manage relay webhooks, a way to instruct SparkPost to accept inbound email on your behalf and forward it to you over HTTP.","full":false},"fields":{"path":"/api/relay-webhooks/"}}},"pageContext":{"file":"relay-webhooks.apib"}},"staticQueryHashes":["1319884646","1428769721","3859448388"]}