List customers
Returns customers in your workspace. Pagination is controlled by offset and limit.
Query Parameters
- Type: integerchannel
_id Filter by channel.
- Type: integeragent
_id Filter by assigned agent.
- Type: stringenumsearch
_by Field to search on.
values- name
- email
- phone
- Type: stringsearch
Prefix to match against
search_by. - Type: booleanarchived
Filter by archive status.
- Type: booleanopt
_in Filter by WhatsApp opt-in status.
- Type: integeroffset
Integer numbers.
- Type: integerlimitmin:0max:100
Integer numbers.
Responses
- application/json
Request Example for get/customers/
curl 'https://api.landbot.io/v1/customers/?channel_id=1&agent_id=1&search_by=name&search=&archived=true&opt_in=true&offset=0&limit=20' \
--header 'Authorization: Token YOUR_AGENT_TOKEN'
{
"success": true,
"total": 2000,
"customers": [
{
"id": 42,
"name": "Ataulfo",
"channel_id": 1,
"avatar": "https://octodex.github.com/images/dojocat.jpg",
"last_message": 1493285931.828493,
"unread": false,
"archived": false,
"agent_id": 1,
"register_date": 1491480847.264482,
"custom_fields": {
"email": {
"value": "api@helloumi.com",
"type": "string",
"extra": {},
"name": "email"
},
"payment_date": {
"value": 1491480957.264482,
"type": "datetime",
"extra": {},
"name": "payment_date"
}
},
"meta_data": {}
}
]
}