Skip to content

List a suppression list's imports

GET
/v1/suppression-lists/{suppressionListId}/imports
curl --request GET \
--url 'https://api.postlever.com/v1/suppression-lists/497f6eca-6276-4993-bfeb-53cbbbba6f08/imports?page=1&pageSize=200&sort=-createdAt' \
--header 'Authorization: <Authorization>'

Lists the imports run against a suppression list, one page at a time, newest first. Both records added through this API (method: api) and files uploaded in the portal (method: manual) appear here.

suppressionListId
required
string format: uuid

The id of the suppression list.

page
integer
default: 1 >= 1

1-based page number.

pageSize
integer
default: 200 >= 10 <= 200

Number of imports per page.

sort
string
default: -createdAt
Allowed values: -createdAt createdAt

Sort by creation time, newest first (-createdAt) or oldest first (createdAt).

One page of the suppression list’s imports.

Media typeapplication/json
object
data
required
Array<object>
object
id
required
string format: uuid
suppressionListId
required
string format: uuid
status
required
string
Allowed values: importing completed failed
method
required

How the records arrived.

string
Allowed values: api manual
totalCount
required

How many records the import supplied.

integer
addedCount
required

How many became new records on the list.

integer
duplicateCount
required

How many were already on the list, or repeated within the import.

integer
malformedCount
required

How many could not be read as a record of the list’s format.

integer
createdAt
required
string format: date-time
completedAt

When the import finished. Absent while it is still running.

string format: date-time
pagination
required

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
page
required
integer
pageSize
required
integer
totalCount
required
integer
totalPages
required
integer

Example

{
"data": [
{
"id": "8f14e45f-ea8f-4b1a-9c2d-2b0a5a1f3c7e",
"suppressionListId": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"status": "importing",
"method": "api",
"totalCount": 2,
"addedCount": 1,
"duplicateCount": 1,
"malformedCount": 0
}
],
"pagination": {
"page": 1,
"pageSize": 200,
"totalCount": 3,
"totalPages": 1
}
}

Invalid request payload. Details are provided in the error response.

Media typeapplication/json

Error envelope returned by every v1 endpoint for failures, following RFC 9457 Problem Details with code and errors extensions.

object
type
required

URI identifying the problem type; dereferences to its documentation.

string format: uri
status
required

HTTP status code applicable to this problem.

integer
title
required

Short, human-readable summary of the problem type.

string
detail
required

Detailed explanation specific to this occurrence.

string
code
required

Error code identifying the specific error condition.

string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error api_error contact_exists operation_in_progress
instance

URI reference identifying this specific occurrence (the request URI).

string format: uri-reference
errors

Provides additional information when the error relates to specific request fields.

Array<object>
object
detail
required

Detailed explanation for this specific field error.

string
pointer

JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).

string
parameter

The URI query parameter that caused the error (e.g. pageSize, name[invalid]).

string

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.

Media typeapplication/json

Error envelope returned by every v1 endpoint for failures, following RFC 9457 Problem Details with code and errors extensions.

object
type
required

URI identifying the problem type; dereferences to its documentation.

string format: uri
status
required

HTTP status code applicable to this problem.

integer
title
required

Short, human-readable summary of the problem type.

string
detail
required

Detailed explanation specific to this occurrence.

string
code
required

Error code identifying the specific error condition.

string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error api_error contact_exists operation_in_progress
instance

URI reference identifying this specific occurrence (the request URI).

string format: uri-reference
errors

Provides additional information when the error relates to specific request fields.

Array<object>
object
detail
required

Detailed explanation for this specific field error.

string
pointer

JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).

string
parameter

The URI query parameter that caused the error (e.g. pageSize, name[invalid]).

string

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.

Media typeapplication/json

Error envelope returned by every v1 endpoint for failures, following RFC 9457 Problem Details with code and errors extensions.

object
type
required

URI identifying the problem type; dereferences to its documentation.

string format: uri
status
required

HTTP status code applicable to this problem.

integer
title
required

Short, human-readable summary of the problem type.

string
detail
required

Detailed explanation specific to this occurrence.

string
code
required

Error code identifying the specific error condition.

string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error api_error contact_exists operation_in_progress
instance

URI reference identifying this specific occurrence (the request URI).

string format: uri-reference
errors

Provides additional information when the error relates to specific request fields.

Array<object>
object
detail
required

Detailed explanation for this specific field error.

string
pointer

JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).

string
parameter

The URI query parameter that caused the error (e.g. pageSize, name[invalid]).

string

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"
}

No suppression list with this id exists in your account.

Media typeapplication/json

Error envelope returned by every v1 endpoint for failures, following RFC 9457 Problem Details with code and errors extensions.

object
type
required

URI identifying the problem type; dereferences to its documentation.

string format: uri
status
required

HTTP status code applicable to this problem.

integer
title
required

Short, human-readable summary of the problem type.

string
detail
required

Detailed explanation specific to this occurrence.

string
code
required

Error code identifying the specific error condition.

string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error api_error contact_exists operation_in_progress
instance

URI reference identifying this specific occurrence (the request URI).

string format: uri-reference
errors

Provides additional information when the error relates to specific request fields.

Array<object>
object
detail
required

Detailed explanation for this specific field error.

string
pointer

JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).

string
parameter

The URI query parameter that caused the error (e.g. pageSize, name[invalid]).

string

Example

{
"type": "https://docs.postlever.com/error-codes#not_found_error",
"status": 404,
"title": "Not found",
"detail": "Suppression list not found",
"code": "not_found_error",
"instance": "/v1/suppression-lists/497f6eca-6276-4993-bfeb-53cbbbba6f08/records"
}