List contacts
The people of the workspace, or of one audience, newest first, by address, name and status.
opensend.contacts.list(input?)opensend contacts listInput
qstringText to search for. Only items that contain it are returned. Up to 40 characters.
limitintegerHow many items to return, from 1 to 100. Without it you get 25.
offsetintegerHow many items to skip. Use it with
limitto read the next page. Default:0.afterstringThe id of the last item you have. The answer starts with the item that follows it, which reads a long list without skipping or repeating when it changes meanwhile. Up to 64 characters.
beforestringThe id of the first item you have. The answer ends with the item just before it. Give this or
after, not both. Up to 64 characters.audienceIdstringOnly the contacts in this audience. Without it, every contact of the workspace. Up to 64 characters.
statusstringOnly contacts in this state:
subscribedorunsubscribed.One of
subscribedunsubscribed
Returns
The call resolves to the answer, already parsed. A call the API refuses throws OpenSendError with the code and the message of the answer. SDK lists the errors of the client itself.
object"list"Always
list.dataobject[]The items on this page.
data[].object"contact"Always
contact.data[].idstringThe id of the contact.
data[].emailstringThe address of the contact. A workspace holds an address once.
data[].firstNamestringThe first name of the contact. Empty when it is not known.
data[].lastNamestringThe last name of the contact. Empty when it is not known.
data[].statusstringsubscribedwhile the contact gets broadcasts,unsubscribedafter they leave.One of
subscribedunsubscribeddata[].unsubscribedAtstring | nullWhen the contact unsubscribed, or
null.data[].propertiesRecord<string, string | number | boolean>Values of your own on the contact, by name. Automations can test them, and broadcasts and automations fill
{{name}}slots with them.data[].audienceIdsstring[]The ids of the audiences the contact is in.
data[].topicsRecord<string, string>What the contact chose for a topic, by the id of the topic:
opt_inoropt_out. A topic that is not here follows its own default.data[].createdAtstringWhen the contact was added.
totalintegerHow many items match in all, on every page together.
hasMorebooleanWhether more items follow this page.