ListContacts - Amazon Simple Email Service

ListContacts

Lists the contacts present in a specific contact list.

Request Syntax

POST /v2/email/contact-lists/ContactListName/contacts/list HTTP/1.1 Content-type: application/json { "Filter": { "FilteredStatus": "string", "TopicFilter": { "TopicName": "string", "UseDefaultIfPreferenceUnavailable": boolean } }, "NextToken": "string", "PageSize": number }

URI Request Parameters

The request uses the following URI parameters.

ContactListName

The name of the contact list.

Required: Yes

Request Body

The request accepts the following data in JSON format.

Filter

A filter that can be applied to a list of contacts.

Type: ListContactsFilter object

Required: No

NextToken

A string token indicating that there might be additional contacts available to be listed. Use the token provided in the Response to use in the subsequent call to ListContacts with the same parameters to retrieve the next page of contacts.

Type: String

Required: No

PageSize

The number of contacts that may be returned at once, which is dependent on if there are more or less contacts than the value of the PageSize. Use this parameter to paginate results. If additional contacts exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional contacts.

Type: Integer

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Contacts": [ { "EmailAddress": "string", "LastUpdatedTimestamp": number, "TopicDefaultPreferences": [ { "SubscriptionStatus": "string", "TopicName": "string" } ], "TopicPreferences": [ { "SubscriptionStatus": "string", "TopicName": "string" } ], "UnsubscribeAll": boolean } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Contacts

The contacts present in a specific contact list.

Type: Array of Contact objects

NextToken

A string token indicating that there might be additional contacts available to be listed. Copy this token to a subsequent call to ListContacts with the same parameters to retrieve the next page of contacts.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

BadRequestException

The input you provided is invalid.

HTTP Status Code: 400

NotFoundException

The resource you attempted to access doesn't exist.

HTTP Status Code: 404

TooManyRequestsException

Too many requests have been made to the operation.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: