Cases
List cases
Newest first. This is the inbox: filter by pipelineId, stageId, status, assigneeId, contactId, control (agent or human), channel, phoneNumberId unread or presence=online (needs the contacts:presence-read scope).
Required scope: cases:read.
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
pipelineIdstageIdstatusassigneeIdcontactIdcontrolhuman includes the cases the agent escalated.
channelphoneNumberIdunreadtrue: cases with messages of the contact not read yet. false: the rest.
presenceonline: only cases whose contact is online now. Needs the contacts:presence-read scope. Answers 409 presence_not_configured when presence is not active, and 503 when the online list cannot be read.
archivedtrue: only archived cases. false: only the ones on the board. Omit it for both.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List cases › Responses
Open a case
Opens a case for a contact: send contactId, or contact to find or create the person in the same call (by externalRef or phone, without changing a contact that exists). Say where it starts with stageId, pipelineId (its entry stage) or agentId (the pipeline where that agent attends the entry stage). With agentId the agent needs the api channel: 422 agent_channel_disabled otherwise. To talk to a copilot (audience internal) send its agentId and the pipelineId or stageId where the case lives; the copilot answers the messages written with author contact. A contact has one open case per pipeline: 409 conflict.
Required scope: cases:write.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Open a case › Request Body
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: contactId | |
| type = object · requires: contact |
contactIdThe contact of the case. Send this or contact, never both (400 on contact).
agentIdThe agent that attends the case. It needs the api channel (422 agent_channel_disabled otherwise). Alone, the case opens in the pipeline where this agent attends the entry stage; if it attends the entry of more than one pipeline that is 422 on pipelineId, so send pipelineId or stageId too. A copilot (an agent with audience internal) attends no stage: send its pipelineId or stageId, the case answers with the copilot whatever agent the stage has, and email cases are refused.
pipelineIdThe case enters by the entry stage of this pipeline.
stageIdThe stage where the case starts.
channelemail opens a case you write to by email. The contact needs an email address and the organization a verified sender domain (422 contact_without_email, 422 sender_domain_not_verified). The agent needs the email channel.
fromWith channel email, the sender address. It must belong to a verified domain. Defaults to the first verified domain.
Open a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Retrieve a case
Returns one case by id. Use it to refresh a single record you already know; to find records, use the list route. Read only. 404 not_found when the id does not exist or belongs to another organization. You can repeat it safely: it has no side effects.
Required scope: cases:read.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Delete a case
Deletes a case. To keep the history, close the case instead of deleting it. The effect is permanent through the API. Repeating the call returns 404 not_found, because the case no longer exists, so do not retry a 404 as a failure.
Required scope: cases:delete.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Delete a case › Responses
Update a case
Writes the values of fields the pipeline declares with source system. The stage, the assignee and the state change on their own routes.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Update a case › Request Body optional
Values for fields the pipeline declares, by key, whoever fills them (team, channel, system or agent). A field marked sensitive is written but never returned: read it with POST /v2/cases/{id}/fields/{key}/reveal. Nothing is saved if one key is not accepted.
tagsReplaces the tags of the case. Tags belong to the contact: the contact shows the same list, and so does every other case of the person.
Update a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Move a case to a stage
A stage of another pipeline moves the case to that pipeline, and so does pipelineId: both need the cases:reorganize scope on top of cases:write (403 scope_missing otherwise). 422 required_fields_missing, with param, when the stage requires a field the case lacks. A closed case is a 409.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Move a case to a stage › Request Body optional
stageIdThe stage to move to. A stage of another pipeline moves the case to that pipeline and needs the cases:reorganize scope. Send this or pipelineId, never both.
pipelineIdMoves the case to the entry stage of this pipeline and needs the cases:reorganize scope. Send this or stageId, never both.
Move a case to a stage › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Assign a case to a member
assigneeId null leaves the case unassigned. The assignment is recorded as made by whoever issued the key. When that person is a member they can only assign to people of their own team, as in the panel: 403 forbidden otherwise.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Assign a case to a member › Request Body
assigneeIdAn active member who can attend cases. null unassigns.
Assign a case to a member › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Close a case
The contact can then have a new case in the pipeline. Closing a closed case is a 409.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Close a case › Request Body optional
outcomeWhy it closed. Up to 50 characters.
Close a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Reopen a case
A 409 when the case is open, or when the contact already opened another case in the pipeline.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Reopen a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Take control of a case
A person takes over: the agent stops answering this case and your team can write with author team. Fires case.control_changed.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Take control of a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Hand a case back to the agent
The agent answers again, with the messages of the team in its context. Fires case.control_changed.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Hand a case back to the agent › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Mark a case as read
unread goes to 0 until the contact writes again. It does not send a read receipt to the channel.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Mark a case as read › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Move several cases to a stage
Moves up to 100 cases of one pipeline to a stage of that pipeline. It answers how many moved and, for each case that did not, the reason: not_found, not_in_pipeline, archived, closed, already_in_stage or required_fields_missing (with missingFields). The ones that can move move even when others cannot. To change pipeline use POST /v2/cases/{id}/move.
Required scope: cases:reorganize.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Move several cases to a stage › Request Body
caseIdsUp to 100 cases of one pipeline.
stageIdThe stage they move to. The cases have to be in the pipeline of this stage: to change pipeline use POST /v2/cases/{id}/move.
Move several cases to a stage › Responses
objectmovedCases that changed stage.
Archive a case
Takes the case off the board without deleting it or changing its status. Archiving an archived case leaves it as it is. Undo it with POST /v2/cases/{id}/unarchive.
Required scope: cases:delete.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Archive a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Bring an archived case back
Puts the case back on the board with the status it had. Unarchiving a case that is not archived leaves it as it is.
Required scope: cases:delete.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Bring an archived case back › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Mute the contact of a case
The agent stops answering the person and every open case of the contact closes. Muting belongs to the contact, so it holds for all their cases until POST /v2/cases/{id}/unmute. Muting a muted contact leaves it muted.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Mute the contact of a case › Request Body optional
reasonWhy. It is saved with the contact.
Mute the contact of a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Unmute the contact of a case
The contact can talk to the agent again. The cases that closed when it was muted stay closed: reopen the ones you need.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Unmute the contact of a case › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Hand a case to a person
Marks the case as needing a person, with your reason, and the agent stops answering. Fires case.control_changed with escalated true. A closed case is a 409.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Hand a case to a person › Request Body
reasonWhy the case needs a person. Your team sees it.
Hand a case to a person › Responses
objectidcontactIdpipelineIdstageIdagentIdThe agent that answers the case: the copilot of a copilot case, otherwise the agent of the current stage.
statusassigneeIdchannelWhere the contact talks: whatsapp, email, api (your own system) or in_app. null when the case has no channel to write back.
phoneNumberIdThe WhatsApp number the contact wrote to, when it is a WhatsApp case.
controlWho answers the contact. human also covers a case the agent escalated and nobody took yet: see agentState.
agentStateWhat the agent is doing, to drive a typing indicator: thinking and replying mean it is working; waiting_for_contact means it answered; escalated means it asked for a person; idle is everything else.
unreadMessages of the contact since the last POST /v2/cases/{id}/read.
lastMessageAtA preview of the last public message.
outcomeclosedAtThe values of the fields the pipeline declares, by key. Sensitive fields are not included.
tagsThe tags of the contact of the case.
archivedAtWhen the case was archived: out of the board, state untouched. null when it is on the board.
mutedtrue while the contact is muted: the agent does not answer them and their open cases are closed. Muting belongs to the person, so every case of the contact shows it.
createdAtupdatedAtThe contact with its presence. Present only on GET /v2/cases and GET /v2/cases/{id}, when the organization setting presenceEnabled is on, at least one presence signal has arrived, and the key has the contacts:presence-read scope.
Reveal a sensitive field of a case
Returns the value of a field the pipeline marks as sensitive. Reading a case never returns it. Every call writes an audit row with the key and the field, never the value, before the value is returned. The response is stored nowhere: not for idempotent replay and not in the request log. 422 field_not_sensitive when the field is not marked sensitive, or the pipeline does not declare it.
Required scope: cases:reveal.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
keyThe key of the field, as the pipeline declares it.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Reveal a sensitive field of a case › Responses
objectcaseIdkeyvalueThe value as saved. null when the field has no value yet.
Escalate a case to the technical team
Creates an issue in the Linear of the organization with the title, the contact, the pipeline, the last messages and the link to the case. A case that already has an open escalation gets that same escalation back, never a second issue. When Linear does not answer, the escalation stays pending and Lelemon keeps trying; the case is not lost. When the team completes the issue, the case moves to answerStageId (if it is still in the stage where it was escalated), the answer is left as an internal note and the owner of the case gets a notification. The same happens by itself when a case enters a stage with config.attentionRole escalation and Linear is connected; answerStageId defaults to the stage of the pipeline with attentionRole answer. 404 when Linear is not connected. A closed case is a 409. Safe to repeat.
Required scope: cases:write.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Escalate a case to the technical team › Request Body optional
answerStageIdThe stage of the same pipeline where the case goes when the team completes the issue. Without it, the stage of the pipeline with config.attentionRole answer; if the pipeline has none, the case stays where it is and only gets the answer as a note.
Escalate a case to the technical team › Responses
objectidcaseIdstatuspending: the issue is not created yet and Lelemon keeps trying. created: the team has it. completed: the team completed it and the answer reached the case. canceled: the team canceled the issue, so there is no answer and the case stays where it was. failed: Lelemon gave up; saving the Linear connection again tries again.
originstage: the case entered a stage marked to escalate. manual: someone asked for it.
answerStageIdanswerThe last comment of the team on the issue, once it is completed.
lastErrorWhy the last attempt to create the issue failed.
completedAtcreatedAtList the escalations of a case
The escalations of the case to the technical team, newest first, with the Linear issue and the answer once the team completes it. Read only and safe to repeat.
Required scope: cases:read.
path Parameters
id^cse_[0-9A-Za-z]{22}… · requiredThe id of the case (cse_…).
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List the escalations of a case › Responses
objecthasMorenextCursor