List customers

Returns customers in your workspace. Pagination is controlled by offset and limit.

Query Parameters
  • channel_id
    Type: integer

    Filter by channel.

  • agent_id
    Type: integer

    Filter by assigned agent.

  • search_by
    Type: stringenum

    Field to search on.

    values
    • name
    • email
    • phone
  • search
    Type: string

    Prefix to match against search_by.

  • archived
    Type: boolean

    Filter by archive status.

  • opt_in
    Type: boolean

    Filter by WhatsApp opt-in status.

  • offset
    Type: integer

    Integer numbers.

  • limit
    Type: integer
    min:  
    0
    max:  
    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": {}
    }
  ]
}