List suppression lists
const url = 'https://api.postlever.com/v1/suppression-lists?page=1&pageSize=200&sort=name';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.postlever.com/v1/suppression-lists?page=1&pageSize=200&sort=name' \ --header 'Authorization: <Authorization>'Lists the suppression lists in your account, one page at a time, sorted by name.
Suppression lists attached to an offer are not included. Those are managed through the offer they belong to.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”1-based page number.
Number of suppression lists per page.
Sort field, prefixed with - for descending.
Responses
Section titled “Responses”One page of your suppression lists.
object
object
What the list stores, and therefore what the add-records endpoint accepts for it.
Whether the list applies to every brand in your account.
How many records the list holds.
When the list was last changed, including by records being added.
totalCount is the number of items matching the request across all
pages; totalPages is that count divided by pageSize, rounded up, and
is 0 when nothing matches.
object
Example
{ "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Affiliate opt-outs", "format": "plain text", "isGlobal": false, "recordCount": 1024 } ], "pagination": { "page": 1, "pageSize": 200, "totalCount": 3, "totalPages": 1 }}Invalid request payload. Details are provided in the error response.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.postlever.com/error-codes#invalid_request_error", "status": 400, "title": "Invalid request", "detail": "\"nickname\" is not an attribute in the contact schema", "code": "invalid_request_error", "instance": "/v1/contacts", "errors": [ { "detail": "\"nickname\" is not an attribute in the contact schema", "pointer": "/attributes/nickname" } ]}Missing or invalid API key.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.postlever.com/error-codes#authentication_error", "status": 401, "title": "Authentication failed", "detail": "Missing or invalid API key", "code": "authentication_error", "instance": "/v1/contacts"}Permission denied.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.postlever.com/error-codes#permission_error", "status": 403, "title": "Permission denied", "detail": "api key required", "code": "permission_error", "instance": "/v1/contacts"}