List conversations
The conversations you may open — the same ones your Lalexi conversation list shows you.
Two orders:
- browsing (default): most recent activity first. A conversation that gets a new message while you page moves to the top, so pages may shift.
- sync (with
updated_since): oldest change first, from that moment on. A conversation that changes while you walk the pages moves to the end instead of being skipped — keep theupdated_atof the last item you saw and pass it asupdated_sincenext time.
Authorization
personalToken Your personal access token from Profile → Access Token in Lalexi. It acts with exactly your role: what you may see and do in the workspace, and nothing more. Everything done with it is recorded as done by you.
In: header
Query Parameters
"open" | "pending" | "snoozed" | "resolved"Only conversations of this channel.
Only conversations with this contact.
Only conversations with the contact who has this phone number, in any formatting.
Only conversations assigned to this person, or none for unassigned ones.
Only conversations of this team.
Only conversations with this label.
Only conversations changed at or after this time; switches to the sync order.
date-timePage size, 1–100 (values outside are brought into that range). Not a number → 422 validation_failed.
251 <= value <= 100The next_cursor of the previous page. Opaque; a damaged cursor → 422 invalid_cursor.
Header Parameters
The workspace to work in (an id from GET /me). Optional when you belong to a single
workspace; required otherwise (400 workspace_required).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://app.lalexi.com/v1/conversations?phone=%2B7+900+123-45-67&assignee_id=none" \ -H "X-Workspace-Id: 7"{
"data": [
{
"id": 0,
"status": "open",
"priority": "low",
"channel": {
"id": 0,
"name": "string",
"type": "whatsapp"
},
"contact": {
"id": 0,
"name": "string",
"phone": "string",
"email": "string"
},
"assignee": {
"id": 0,
"name": "string"
},
"team": {
"id": 0,
"name": "string"
},
"labels": [
"string"
],
"custom_attributes": {},
"snoozed_until": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_activity_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string"
}{
"error": {
"code": "workspace_required",
"message": "You belong to several workspaces: pass the X-Workspace-Id header."
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid."
}
}{
"error": {
"code": "forbidden",
"message": "You are not allowed to do this."
}
}{
"error": {
"code": "not_found",
"message": "Resource not found."
}
}{
"error": {
"code": "validation_failed",
"message": "The request is invalid.",
"details": {
"email": [
"is invalid"
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the number of seconds in Retry-After."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side."
}
}