Skip to content

List the contacts

POST
/contact/list
curl --request POST \
--url 'https://api.aelyst.ai/v1/contact/list?limit=10' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "search": "", "filter": { "$and": [] }, "timezone": "Asia/Kuala_Lumpur" }'

List all available contacts. You can use filters in the request body to limit the results to only records with matching contact field values.

limit
integer
default: 10 >= 1 < 100 >= 1 characters <= 100 characters

Number of contacts to return i.e. page size.

cursorId
integer

Pointer to the contact id from where the next batch of records should start from.

Media typeapplication/json
object
search
string
timezone
string
filter
One of: discriminator: pet_type
$and
object
$and
Array<object>
object
category
string
Allowed values: contactField contactTag lifecycle
field
string
operator
string
Allowed values: isEqualTo isNotEqualTo isTimestampAfter isTimestampBefore isTimestampBetween exists doesNotExist isGreaterThan isLessThan isBetween hasAnyOf hasAllOf hasNoneOf
value
One of:
string
Examples
{
"search": "",
"filter": {
"$and": []
},
"timezone": "Asia/Kuala_Lumpur"
}
Media typeapplication/json
object
items
required
Array
object
id

Contact ID

integer
Any of:
object
firstName
required
string
lastName
string
nullable
phone
string
nullable
email
string
nullable
language

Following the ISO 639-1 standard.

string
nullable
profilePic
string
nullable
countryCode

Following the ISO 3166-1 alpha-2 standard.

string
nullable
custom_fields
Array<object>
nullable
object
name
required
string
value

Formatting rules

  • Text: “string” (use quotation marks for the string value)
  • Number: Number (without any quotation marks)
  • Email: “email” (format: user@domain.com)
  • URL: “url” (format: www.website.com, https://www.website.com, website.com, http://website.com)
  • List: “string” (the string value must match one of the list options)
  • Date: “yyyy-mm-dd” (must follow this format)
  • Time: “HH:MM” (must follow 24H format, 1PM => 13:00)
  • Checkbox: “true/false” (must be true for checked, false for unchecked)
string
nullable
status

Conversation status of the contact

string
Allowed values: open closed blocked
tags
Array<string>
<= 10 items unique items
assignee
User

User to whom the contact is assigned

object
id
required

User ID

integer
firstName
required
string
lastName
required
string
email
required
string format: email
lifecycle
string
nullable
created_at

Unix timestamp in seconds representing when the contact was created.

integer
isBlocked
boolean
pagination
object
next
required
string
previous
required
string
Examples
Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 400,
"message": "Validation error."
}
Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 401,
"message": "UN_AUTHORIZED"
}
Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 429,
"message": "Too Many Requests"
}
Retry-After
number
Example
1

Number of seconds until you can retry the request

X-RateLimit-Limit
number
Example
10

Number of request allowed for this end point

X-RateLimit-Remaining
number
Example
5

Number of request remaining for this end point

Media typeapplication/json
object
code
integer
message
string
Example
{
"code": 500,
"message": "Unexpected error occurred"
}