AI Studio Resource Centre
Api referencesContacts

List contacts

This request/endpoint is platform-agnostic (e.g., WhatsApp, website) and returns a list of contacts along with their associated profile data. It also supports various filtering options in the request

POST https://api-v7.express-chat.com/inbox/users

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>
authtypeKey

Request Body

The request body consists of a JavaScript Object Notation (JSON) object containing the fields described in the table below. Examples of the request body can be found in the #sample-requests section.

FieldTypeDescription
searchTextstringSearch text to filter contacts.
tagsarrayFilter contacts based on an array of existing tag names
statusarrayAn array of status values to filter contacts.
isOnlinebooleanIndicates whether contacts are online.
_botWebsitearrayFilter contacts based on interactions on the website.
_botWhatsapparrayFilter contacts based on interactions on WhatsApp.
_botFacebookarrayFilter contacts based on interactions on Facebook.
_agentAssignedarrayFilter contacts assigned to specific agents.
segmentsarrayAn array of segments to filter contacts.
lastSeenAtobjectDate range filter for the last seen timestamp.
createdAtobjectDate range filter for the creation timestamp.
userInteractedbooleanFilter contacts based on whether they interacted.
lastMessageByarrayFilter contacts based on the last message sender.
isLiveChatActivebooleanIndicates whether live chat is active for contacts.
hasOrderedobjectFilter contacts based on their order history.

Responses

Sample Requests

Replace <token> in the below example requests with your valid Bearer token and customize the request body filters as needed for your use case.

curl 'https://api-v7.express.com/inbox/users' 
  -X 'POST' 
  -H 'Authorization: Bearer <token>' 
  -H 'Content-Type: application/json' 
  -H 'authtype: Key' 
  -d '{
    "searchText": "",
    "tags": [],
    "status": [],
    "isOnline": false,
    "_botWebsite": [],
    "_botWhatsapp": [],
    "_botTelegram": [],
    "_botFacebook": [],
    "_agentAssigned": [],
    "segments": [],
    "applicableFilters": ["userInteracted"],
    "lastSeenAt": {
      "startAt": "",
      "endsAt": ""
    },
    "createdAt": {
      "startAt": "",
      "endsAt": ""
    },
    "userInteracted": true,
    "lastMessageBy": [],
    "isLiveChatActive": false,
    "hasOrdered": {
      "status": false,
      "lastAt": ""
    },
    "page": 1,
    "isExport": "none",
    "isContact": true
  }' 
  --compressed

❓ Got any questions?

If you have any questions, you can look into our repository of FAQs, most likely, you will find your answer here, If not, write us at production@S10U.co.za.

On this page