Overview
This request allows email addresses to be added to the suppression list. These suppressions will be marked as user suppressions.
Endpoint
Method | URL |
---|---|
POST | https://api.everlytic.net/transactional/email/v1/suppression |
Request Body
{ "emails" : [ "string", "string" ] }
Properties
Property | Description | Data type | Parameters | Required |
---|---|---|---|---|
emails | Array containing the list of emails that need to be suppressed | Array | string | Yes |
Example Request
curl --location 'https://api.everlytic.net/transactional/email/v1/suppression' --data-raw '{ "emails" : ["[email protected]", "[email protected]", "[email protected]", "[email protected]"]}'
Response
Status codes
Status code | Explanation |
---|---|
200 Ok | Webhook was created successfully |
400 Bad Request | The request body was formatted improperly |
401 Unauthorized | The provided authorization credentials are incorrect |
412 Precondition Failed | One or more of the email addresses were invalid |
Properties
Properties for responses with status 200 OK
Property | Description | Data type | Parameters |
---|---|---|---|
suppressed_emails | Array containing the details of all email addresses that have been suppressed | Array | |
The email address that has been suppressed | string | ||
origin | The source for the suppression, whether instigated by a user, bounce, or unsubscribe | string |
|
description | Text description of the reason for suppression | string|null | |
suppressed_timestamp | Date and time that the email address was suppressed | date-time | ISO 8601 date-time string |
Properties for responses with status 4XX
Property | Description | Data type | Parameters |
---|---|---|---|
code | The HTTP response status code | integer |
|
message | The reason for the failure | string | Valid string |
error | Array containing errors field | JSON |
|
errors | Array containing the failure details | JSON |
|
domain | The classification of the type of error | string |
|
reason | Keyword used to describe the error | string |
|
message | Text describing the reason for the failure | string | Valid string |
locationType | The location where the failure occurred | string |
|
location | The type of validation that failed | string |
|
Example responses
Email addresses were successfully suppressed [200 OK]
{ "suppressed_emails": [ { "email": "[email protected]", "origin": "user", "description": null, "suppressed_timestamp": "2023-08-17T16:36:00.000Z" }, { "email": "[email protected]", "origin": "user", "description": null, "suppressed_timestamp": "2023-08-17T16:36:00.000Z" }, { "email": "[email protected]", "origin": "user", "description": null, "suppressed_timestamp": "2023-08-17T16:36:00.000Z" }, { "email": "[email protected]", "origin": "user", "description": null, "suppressed_timestamp": "2023-08-17T16:36:00.000Z" } ] }
Invalid/Missing authorization credentials [401 Unauthorized]
{ "code": 401, "message": "Login Required", "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "request", "location": "authorization" } ] } }
Request contained invalid email addresses [412 Precondition Failed]
{ "code": 412, "message": "The emails.1 format is invalid., The emails.2 format is invalid.", "error": { "errors": [ { "domain": "global", "reason": "invalidParameter", "message": "The emails.1 format is invalid., The emails.2 format is invalid.", "locationType": "request", "location": "templateValidation" } ] } }