Change a conversation
Changes what you send and leaves the rest alone. Each change does what the same click in Lalexi does — the same activity line in the conversation ("resolved by …", "assigned to …") and the same events, with you as the one who did it. Everything is checked before anything is written: the request applies whole or not at all.
An agent who reopens a conversation (status: open) becomes its assignee, as in Lalexi.
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
Path Parameters
The conversation's number — the one in its Lalexi URL.
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).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://app.lalexi.com/v1/conversations/0" \ -H "X-Workspace-Id: 7" \ -H "Content-Type: application/json" \ -d '{ "status": "resolved", "labels": [ "paid" ] }'{
"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"
}{
"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": "invalid_assignee",
"message": "Invalid assignee",
"details": {
"assignee_id": [
"cannot work in this channel"
]
}
}
}{
"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."
}
}