Skip to content

Commit bcb3df0

Browse files
authored
Merge pull request #531 from SparkPost/SAA-715
SAA-715 update docs for subaccount update and exception_subaccounts
2 parents 2fe3ead + af4c7f3 commit bcb3df0

File tree

3 files changed

+1094
-2
lines changed

3 files changed

+1094
-2
lines changed

content/api/webhooks.apib

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ You can receive any of the following types of events in webhook payloads.
3030
+ events (array) - Array of event types this webhook will send. Use the [Events Documentation](#webhooks-documentation) endpoint to list the available event types.
3131
+ active (boolean) - The status of the webhook. When false, the target will no longer receive batches.
3232
+ custom_headers (object) - Object of custom headers to be used during POST requests to target.
33+
+ exception_subaccounts (array) - Array of subaccount numbers to prevent receiving events in your webhook (only available for webhooks with Primary and All Subaccounts event source).
3334
+ auth_type (enum) - 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).
3435
+ none
3536
+ basic
@@ -50,6 +51,7 @@ You can receive any of the following types of events in webhook payloads.
5051
"target": "http://client.example.com/example-webhook",
5152
"events": ["delivery", "injection", "open", "click"],
5253
"active": true,
54+
"exception_subaccounts": [123],
5355
"custom_headers": {
5456
"x-api-key": "abcd"
5557
},
@@ -80,6 +82,7 @@ Webhooks only support standard ports, port 80 for HTTP traffic and port 443 for
8082
+ active (boolean) - The status of the webhook. When false, the target will no longer receive batches.
8183
+ Default: true
8284
+ custom_headers (object) - Object of custom headers to be used during POST requests to target.
85+
+ exception_subaccounts (array) - Array of subaccount numbers to prevent receiving events in your webhook (only available for webhooks with Primary and All Subaccounts event source). Must not have duplicate values nor be empty. Integer values only. Max size: 10.
8386
+ auth_type: none, basic, oauth2 (enum)
8487
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).
8588
+ Default: none
@@ -114,6 +117,7 @@ Webhooks only support standard ports, port 80 for HTTP traffic and port 443 for
114117
"grant_type": "client_credentials"
115118
}
116119
},
120+
"exception_subaccounts": [123],
117121
"events": [
118122
"delivery",
119123
"injection",
@@ -232,6 +236,7 @@ and returns information on the response received from the target.
232236
"open",
233237
"click"
234238
],
239+
"exception_subaccounts": ["123"],
235240
"auth_type": "oauth2",
236241
"auth_request_details": {
237242
"url": "https://oauth.myurl.com/tokens",
@@ -322,6 +327,8 @@ When SparkPost does not get a 200 response from your webhook consumer endpoint t
322327
+ events (array) - Array of event types this webhook will send. Use the [Events Documentation](#webhooks-documentation) endpoint to list the available event types.
323328
+ active (boolean) - The status of the webhook. When false, the target will no longer receive batches.
324329
+ custom_headers (object) - Object of custom headers to be used during POST requests to target.
330+
+ exception_subaccounts (array) - Array of subaccount numbers to prevent receiving events in your webhook (only available for webhooks with Primary and All Subaccounts event source). Must not have duplicate values. Integers or empty array. New array values will completely replace the current values. Max size: 10.
331+
+ subaccount_id (number) - The new Subaccount to be set as the Event Source. Can be any integer number (use -1 for Primary and All Subaccounts or 0 for Primary Account only).
325332
+ auth_type: none, basic, oauth2 (enum)
326333
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).
327334
+ auth_request_details (object) - Object containing details needed to request authorization token for OAuth 2.0. This is required when `auth_type` is oauth2.
@@ -352,6 +359,7 @@ Any batches already queued for delivery to this webhook will not be affected. Fo
352359
"generation_rejection",
353360
"delay"
354361
],
362+
"subaccount_id": 123,
355363
"auth_type": "none",
356364
"custom_headers": {
357365
"x-api-key": "abcd"

0 commit comments

Comments
 (0)