Lelemon
  • Get started
  • Use cases
  • Guides
  • API basics
  • Webhooks
  • SDK, CLI and MCP
  • API reference
  • Changelog
  • v1 (legacy)
Receive eventsVerify signaturesEvent catalog
powered by Zudoku
Webhooks

Event catalog

Current API version: 2026-10-29. Subscribe an endpoint to these types, or to * for all of them. GET /v2/event-types returns the same catalog.

TypeWhen it fires
case.escalatedAn agent handed a case over to a person. Carries the contact, the reason and the last 20 messages.
case.closedA case was closed: by the inactivity sweep, by entering a closing stage, by the agent ending the conversation or by POST /v2/cases/{id}/close. It fires once per case that really changed, after the closing is saved. reason is the closing reason saved in the case (for example inactividad, inactividad_despedida, seguimiento_agotado or the reason of the stage) and is null when none was set. closedBy tells who closed it: system (sweeps and automatic flows), stage, agent, api or user (a person in the dashboard). Read or complete the case with GET and PATCH /v2/cases/{id}.
case.stage_enteredA case entered a stage of its pipeline.
message.createdAny new message of a case: the contact, the agent, your team or an internal note. It includes the replies of the agent, so you do not need to poll. Files are not included: read them with GET /v2/cases/{id}/messages.
case.control_changedA person took over a case, or the agent got it back, or the agent escalated it (escalated true).
message.receivedA person wrote to the organization. Carries no text, only where to read it. A cart sent from the WhatsApp catalog arrives with type order and its products; a tap on a button or list row arrives with type reply and the id and title tapped. A shared location arrives with type location, the answer of a WhatsApp Flow with type flow_response and a phone shared in answer to a contact_request with type contact: those three carry no data, because they are the personal data of the person. Read the note of the cart, the location, the Flow fields or the phone with GET /v2/cases/{id}/messages.
message.human_sentA person of the team, or an integration, wrote to the contact.
message.agent_sentAn agent wrote first to the contact because a trigger fired.
case.agent_failedThe agent could not answer a message you sent with author contact. The message stays in the case. code budget_exceeded means the monthly budget ran out: stop writing until it resets or you raise the limit. Otherwise write again or take control of the case. requestId is the Request-Id of your POST.
case.turn_completedThe agent finished a turn in a case. One turn can write several messages, so use this to know it is done instead of polling. Read what happened with GET /v2/cases/{id}/turns. It fires for completed, incomplete and failed turns.
budget.threshold_reachedThe conversations used in a monthly budget reached its alert percent. It fires once per month and budget, and again after you raise the limit and reach the new threshold.
budget.exceededA monthly budget with enforcement stop ran out and the agent stopped. It fires once per month and budget. Raise the limit with PATCH /v2/budgets/{id} to resume at once.
mcp_server.failedAn MCP server rejected the credential of a tool call (expired or revoked token) and was marked as failed. Reconnect it before your customers notice.
message.status_changedA WhatsApp template message moved to another status: sent, delivered, read, skipped or canceled. Failures arrive as message.failed.
message.failedA WhatsApp template message could not be delivered. message.failure.code says why.
contact.opted_outA contact stopped receiving messages on a channel, by their own request or by yours. Nothing more is sent to them there.
contact.suppressedThe erasure of a contact finished: its cases, messages, files and logs lost their content in our systems. Carries ids only. Erase the same person from every system where you copied them.
message.redactedA message was redacted: its text, file and copies were erased. Carries ids only. Redact the same message in every system where you copied it.
approval.requestedAn agent asked to run an action that its tool policy puts behind a person. Nothing ran. Decide it with POST /v2/approvals/{id}/approve or /reject before approval.expiresAt.
approval.decidedAn approval was approved or rejected. approval.decision says by whom (a member or an API key) and why. When it was approved the action runs right after: follow approval.status.
approval.expiredNobody decided in time, so the action never ran and the agent told the person. Ask the agent again if it still applies.
approval.escalatedA pending approval passed the time its policy gives before escalating (escalateAfterMinutes). Nothing changed in the approval: remind or reassign in your system before it expires. Fires once per approval.
approval.canceledA pending approval was canceled because the person it is about asked to be erased. Nothing ran and it cannot be decided any more. Drop it from your queue. The approval no longer carries the arguments or the summary.
approval.review_requestedThe person affected by an automated decision that went through an approval asked for a human review (Ley 21.719, art. 8 bis). Carries the reason they gave, also stored in approval.reviewReason. Review the decision and respond to the person in your system.
automated_decision.review_requestedThe person affected by an automated decision that no one approved asked for a human review (Ley 21.719, art. 8 bis). Carries the reason they gave, also stored in automatedDecision.reviewReason. Review the decision and respond to the person in your system.
team_question.createdAn agent left a question for the team and keeps attending. Answer it with POST /v2/team-questions/{id}/answer; the agent resumes and tells the person.
team_question.answeredA team question received its answer. The agent is about to tell the person. status moves to delivered once it did.
meeting.scheduledA meeting was booked in an agenda, by this API, the dashboard or an agent. The attendee already got the invitation. Read it with GET /v2/scheduling/meetings/{id}.
meeting.rescheduledA meeting moved to another slot. meeting.start and meeting.end are the new ones; the attendee was told by the calendar.
meeting.canceledA meeting was canceled and its slot is free again. meeting.cancelReason says why when there is one.
template.status_changedWhatsApp reviewed a template, or paused it. rejectionReason says why when it was rejected.
campaign.status_changedA campaign started, paused, resumed, completed or was canceled. pauseReason says why it paused by itself, if it did.
trigger.attemptedAn attempt of a trigger cadence ran, or the cadence ended. result is sent when a template message was queued, skipped when the attempt could not go out (reason says why and the cadence ends), or stopped when the contact replied, opted out, or the case changed stage or closed (reason says which). Fires once per attempt, and once more when a cadence is stopped.
copilot.turnProgress of a copilot turn: its status, or one of its steps. kind tells which.
run.startedA worker picked up a run and the agent started working on it. It carries the run. It is sent at least once, so a run that a worker lost halfway can announce it again.
run.waiting_for_answerThe agent paused the run to ask a person. run.question has the question; answer it with POST /v2/runs/{id}/answer and the run resumes. A run nobody answers within 30 days ends failed with stopReason abandoned.
run.completedThe agent declared the job done. run.status is completed_unverified: nobody has checked it yet, so read run.result.summary and run.result.checks before you trust it.
run.stoppedThe run was cut before the agent declared the job done. run.stopReason says why (rounds, time or cost: a limit ran out; no_conclusion: the agent never called its finish action; loop: the agent repeated itself) and run.result.partial keeps the last thing the agent wrote.
run.failedThe run ended with an error, or nobody answered its question in 30 days (stopReason abandoned). run.result.error says what happened.
run.canceledThe run was canceled: nothing else will run.
schedule.firedA scheduled task reached its date and started a run. It carries the schedule and the run. A date the service missed is not replayed: the task fires once and moves to its next date.
schedule.skippedA scheduled task reached its date and did not start a run. reason says why: opted_out (the contact opted out of email), recipient_not_allowed (the contact is not in the recipient allowlist), agent_unavailable (the agent is paused, deleted or has no email channel) or contact_unavailable (the contact no longer exists or has no email). The task keeps its schedule and fires on its next date.
schedule.pausedA scheduled task was paused by the platform after three runs in a row that failed or were cut. reason is consecutive_failures. Fix the cause and turn it on again with PATCH /v2/schedules/{id} and enabled true.
knowledge_document.readyA document finished processing and the agents that have its collection can search it.
knowledge_document.failedA document could not be processed. document.error.code says why. The collection keeps working; upload the document again to retry.
phone_number.connectedA subaccount linked its WhatsApp number and its agent started answering on it.
phone_number.connection_failedThe number linked is not the one requested, or it belongs to another account. Nothing was attached; connection.failure.code says why.
phone_number.disconnectedA WhatsApp number was disconnected, by you or by the provider. Its agent no longer answers on it.
webhook_endpoint.testSent by POST /v2/webhook-endpoints/{id}/test to check that an endpoint receives and verifies events.

case.escalated

An agent handed a case over to a person. Carries the contact, the reason and the last 20 messages.

JSON Schema of data:

case.closed

A case was closed: by the inactivity sweep, by entering a closing stage, by the agent ending the conversation or by POST /v2/cases/{id}/close. It fires once per case that really changed, after the closing is saved. reason is the closing reason saved in the case (for example inactividad, inactividad_despedida, seguimiento_agotado or the reason of the stage) and is null when none was set. closedBy tells who closed it: system (sweeps and automatic flows), stage, agent, api or user (a person in the dashboard). Read or complete the case with GET and PATCH /v2/cases/{id}.

JSON Schema of data:

case.stage_entered

A case entered a stage of its pipeline.

JSON Schema of data:

message.created

Any new message of a case: the contact, the agent, your team or an internal note. It includes the replies of the agent, so you do not need to poll. Files are not included: read them with GET /v2/cases/{id}/messages.

JSON Schema of data:

case.control_changed

A person took over a case, or the agent got it back, or the agent escalated it (escalated true).

JSON Schema of data:

message.received

A person wrote to the organization. Carries no text, only where to read it. A cart sent from the WhatsApp catalog arrives with type order and its products; a tap on a button or list row arrives with type reply and the id and title tapped. A shared location arrives with type location, the answer of a WhatsApp Flow with type flow_response and a phone shared in answer to a contact_request with type contact: those three carry no data, because they are the personal data of the person. Read the note of the cart, the location, the Flow fields or the phone with GET /v2/cases/{id}/messages.

JSON Schema of data:

message.human_sent

A person of the team, or an integration, wrote to the contact.

JSON Schema of data:

message.agent_sent

An agent wrote first to the contact because a trigger fired.

JSON Schema of data:

case.agent_failed

The agent could not answer a message you sent with author contact. The message stays in the case. code budget_exceeded means the monthly budget ran out: stop writing until it resets or you raise the limit. Otherwise write again or take control of the case. requestId is the Request-Id of your POST.

JSON Schema of data:

case.turn_completed

The agent finished a turn in a case. One turn can write several messages, so use this to know it is done instead of polling. Read what happened with GET /v2/cases/{id}/turns. It fires for completed, incomplete and failed turns.

JSON Schema of data:

budget.threshold_reached

The conversations used in a monthly budget reached its alert percent. It fires once per month and budget, and again after you raise the limit and reach the new threshold.

JSON Schema of data:

budget.exceeded

A monthly budget with enforcement stop ran out and the agent stopped. It fires once per month and budget. Raise the limit with PATCH /v2/budgets/{id} to resume at once.

JSON Schema of data:

mcp_server.failed

An MCP server rejected the credential of a tool call (expired or revoked token) and was marked as failed. Reconnect it before your customers notice.

JSON Schema of data:

message.status_changed

A WhatsApp template message moved to another status: sent, delivered, read, skipped or canceled. Failures arrive as message.failed.

JSON Schema of data:

message.failed

A WhatsApp template message could not be delivered. message.failure.code says why.

JSON Schema of data:

contact.opted_out

A contact stopped receiving messages on a channel, by their own request or by yours. Nothing more is sent to them there.

JSON Schema of data:

contact.suppressed

The erasure of a contact finished: its cases, messages, files and logs lost their content in our systems. Carries ids only. Erase the same person from every system where you copied them.

JSON Schema of data:

message.redacted

A message was redacted: its text, file and copies were erased. Carries ids only. Redact the same message in every system where you copied it.

JSON Schema of data:

approval.requested

An agent asked to run an action that its tool policy puts behind a person. Nothing ran. Decide it with POST /v2/approvals/{id}/approve or /reject before approval.expiresAt.

JSON Schema of data:

approval.decided

An approval was approved or rejected. approval.decision says by whom (a member or an API key) and why. When it was approved the action runs right after: follow approval.status.

JSON Schema of data:

approval.expired

Nobody decided in time, so the action never ran and the agent told the person. Ask the agent again if it still applies.

JSON Schema of data:

approval.escalated

A pending approval passed the time its policy gives before escalating (escalateAfterMinutes). Nothing changed in the approval: remind or reassign in your system before it expires. Fires once per approval.

JSON Schema of data:

approval.canceled

A pending approval was canceled because the person it is about asked to be erased. Nothing ran and it cannot be decided any more. Drop it from your queue. The approval no longer carries the arguments or the summary.

JSON Schema of data:

approval.review_requested

The person affected by an automated decision that went through an approval asked for a human review (Ley 21.719, art. 8 bis). Carries the reason they gave, also stored in approval.reviewReason. Review the decision and respond to the person in your system.

JSON Schema of data:

automated_decision.review_requested

The person affected by an automated decision that no one approved asked for a human review (Ley 21.719, art. 8 bis). Carries the reason they gave, also stored in automatedDecision.reviewReason. Review the decision and respond to the person in your system.

JSON Schema of data:

team_question.created

An agent left a question for the team and keeps attending. Answer it with POST /v2/team-questions/{id}/answer; the agent resumes and tells the person.

JSON Schema of data:

team_question.answered

A team question received its answer. The agent is about to tell the person. status moves to delivered once it did.

JSON Schema of data:

meeting.scheduled

A meeting was booked in an agenda, by this API, the dashboard or an agent. The attendee already got the invitation. Read it with GET /v2/scheduling/meetings/{id}.

JSON Schema of data:

meeting.rescheduled

A meeting moved to another slot. meeting.start and meeting.end are the new ones; the attendee was told by the calendar.

JSON Schema of data:

meeting.canceled

A meeting was canceled and its slot is free again. meeting.cancelReason says why when there is one.

JSON Schema of data:

template.status_changed

WhatsApp reviewed a template, or paused it. rejectionReason says why when it was rejected.

JSON Schema of data:

campaign.status_changed

A campaign started, paused, resumed, completed or was canceled. pauseReason says why it paused by itself, if it did.

JSON Schema of data:

trigger.attempted

An attempt of a trigger cadence ran, or the cadence ended. result is sent when a template message was queued, skipped when the attempt could not go out (reason says why and the cadence ends), or stopped when the contact replied, opted out, or the case changed stage or closed (reason says which). Fires once per attempt, and once more when a cadence is stopped.

JSON Schema of data:

copilot.turn

Progress of a copilot turn: its status, or one of its steps. kind tells which.

JSON Schema of data:

run.started

A worker picked up a run and the agent started working on it. It carries the run. It is sent at least once, so a run that a worker lost halfway can announce it again.

JSON Schema of data:

run.waiting_for_answer

The agent paused the run to ask a person. run.question has the question; answer it with POST /v2/runs/{id}/answer and the run resumes. A run nobody answers within 30 days ends failed with stopReason abandoned.

JSON Schema of data:

run.completed

The agent declared the job done. run.status is completed_unverified: nobody has checked it yet, so read run.result.summary and run.result.checks before you trust it.

JSON Schema of data:

run.stopped

The run was cut before the agent declared the job done. run.stopReason says why (rounds, time or cost: a limit ran out; no_conclusion: the agent never called its finish action; loop: the agent repeated itself) and run.result.partial keeps the last thing the agent wrote.

JSON Schema of data:

run.failed

The run ended with an error, or nobody answered its question in 30 days (stopReason abandoned). run.result.error says what happened.

JSON Schema of data:

run.canceled

The run was canceled: nothing else will run.

JSON Schema of data:

schedule.fired

A scheduled task reached its date and started a run. It carries the schedule and the run. A date the service missed is not replayed: the task fires once and moves to its next date.

JSON Schema of data:

schedule.skipped

A scheduled task reached its date and did not start a run. reason says why: opted_out (the contact opted out of email), recipient_not_allowed (the contact is not in the recipient allowlist), agent_unavailable (the agent is paused, deleted or has no email channel) or contact_unavailable (the contact no longer exists or has no email). The task keeps its schedule and fires on its next date.

JSON Schema of data:

schedule.paused

A scheduled task was paused by the platform after three runs in a row that failed or were cut. reason is consecutive_failures. Fix the cause and turn it on again with PATCH /v2/schedules/{id} and enabled true.

JSON Schema of data:

knowledge_document.ready

A document finished processing and the agents that have its collection can search it.

JSON Schema of data:

knowledge_document.failed

A document could not be processed. document.error.code says why. The collection keeps working; upload the document again to retry.

JSON Schema of data:

phone_number.connected

A subaccount linked its WhatsApp number and its agent started answering on it.

JSON Schema of data:

phone_number.connection_failed

The number linked is not the one requested, or it belongs to another account. Nothing was attached; connection.failure.code says why.

JSON Schema of data:

phone_number.disconnected

A WhatsApp number was disconnected, by you or by the provider. Its agent no longer answers on it.

JSON Schema of data:

webhook_endpoint.test

Sent by POST /v2/webhook-endpoints/{id}/test to check that an endpoint receives and verifies events.

JSON Schema of data:

Verify signatures
On this page
  • case.escalated
  • case.closed
  • case.stage_entered
  • message.created
  • case.control_changed
  • message.received
  • message.human_sent
  • message.agent_sent
  • case.agent_failed
  • case.turn_completed
  • budget.threshold_reached
  • budget.exceeded
  • mcp_server.failed
  • message.status_changed
  • message.failed
  • contact.opted_out
  • contact.suppressed
  • message.redacted
  • approval.requested
  • approval.decided
  • approval.expired
  • approval.escalated
  • approval.canceled
  • approval.review_requested
  • automated_decision.review_requested
  • team_question.created
  • team_question.answered
  • meeting.scheduled
  • meeting.rescheduled
  • meeting.canceled
  • template.status_changed
  • campaign.status_changed
  • trigger.attempted
  • copilot.turn
  • run.started
  • run.waiting_for_answer
  • run.completed
  • run.stopped
  • run.failed
  • run.canceled
  • schedule.fired
  • schedule.skipped
  • schedule.paused
  • knowledge_document.ready
  • knowledge_document.failed
  • phone_number.connected
  • phone_number.connection_failed
  • phone_number.disconnected
  • webhook_endpoint.test
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" }, "channel": { "type": [ "string", "null" ] } }, "required": [ "id", "pipelineId", "channel" ] }, "contact": { "type": "object", "properties": { "id": { "type": "string", "example": "ctc_3PqA0x8bVw1TqS9mYp3RkL" }, "name": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "externalRef": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "phone", "email", "externalRef" ] }, "escalation": { "type": "object", "properties": { "reason": { "type": [ "string", "null" ] }, "priority": { "type": [ "string", "null" ] }, "summary": { "type": [ "string", "null" ] } }, "required": [ "reason", "priority", "summary" ] }, "history": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": [ "string", "null" ] }, "content": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "role", "content", "createdAt" ] } } }, "required": [ "case", "contact", "escalation", "history" ] }
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" } }, "required": [ "id", "pipelineId" ] }, "reason": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "closed" ] }, "closedBy": { "type": "string", "enum": [ "system", "stage", "agent", "api", "user" ] }, "closedAt": { "type": "string", "format": "date-time" } }, "required": [ "case", "reason", "status", "closedBy", "closedAt" ] }
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" }, "pipelineName": { "type": [ "string", "null" ] } }, "required": [ "id", "pipelineId", "pipelineName" ] }, "stage": { "type": "object", "properties": { "id": { "type": "string", "example": "stg_3PqA0x8bVw1TqS9mYp3RkL" }, "name": { "type": [ "string", "null" ] }, "slug": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "slug" ] }, "previousStage": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string", "example": "stg_3PqA0x8bVw1TqS9mYp3RkL" }, "name": { "type": [ "string", "null" ] } }, "required": [ "id", "name" ] } ] }, "recipient": { "type": "object", "properties": { "externalSource": { "type": [ "string", "null" ] }, "externalId": { "type": [ "string", "null" ] } }, "required": [ "externalSource", "externalId" ] }, "enteredAt": { "type": "string", "format": "date-time" } }, "required": [ "case", "stage", "previousStage", "recipient", "enteredAt" ] }
{ "type": "object", "properties": { "object": { "type": "string", "enum": [ "message" ] }, "id": { "type": "string", "example": "msg_3PqA0x8bVw1TqS9mYp3RkL" }, "caseId": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" }, "author": { "type": "string", "enum": [ "contact", "agent", "team" ] }, "authorName": { "type": [ "string", "null" ] }, "visibility": { "type": "string", "enum": [ "public", "internal" ] }, "text": { "type": "string" }, "contentType": { "type": "string" }, "hasAttachment": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "caseId", "pipelineId", "author", "authorName", "visibility", "text", "contentType", "hasAttachment", "createdAt" ] }
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" }, "stageId": { "type": [ "string", "null" ] } }, "required": [ "id", "pipelineId", "stageId" ] }, "control": { "type": "string", "enum": [ "agent", "human" ] }, "escalated": { "type": "boolean" }, "controlledBy": { "type": [ "string", "null" ] }, "contactId": { "type": [ "string", "null" ] }, "externalRef": { "type": [ "string", "null" ] } }, "required": [ "case", "control", "escalated", "controlledBy", "contactId", "externalRef" ] }
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" }, "stageId": { "type": [ "string", "null" ] } }, "required": [ "id", "pipelineId", "stageId" ] }, "message": { "type": "object", "properties": { "id": { "type": "string", "example": "msg_3PqA0x8bVw1TqS9mYp3RkL" }, "channel": { "type": [ "string", "null" ] }, "contentType": { "type": [ "string", "null" ] }, "type": { "type": [ "string", "null" ], "description": "order when the person sent a cart from the catalog, reply when they tapped a button or a list row, location when they shared a location, flow_response when they finished a WhatsApp Flow, contact when they shared their phone, otherwise the content type." }, "createdAt": { "type": "string", "format": "date-time" }, "reply": { "anyOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id", "title" ] }, { "type": "null" } ] }, "order": { "anyOf": [ { "type": "object", "properties": { "catalogId": { "type": "string" }, "items": { "type": "array", "items": { "type": "object", "properties": { "productId": { "type": [ "string", "null" ] }, "quantity": { "type": [ "number", "null" ] }, "price": { "type": [ "number", "null" ] }, "currency": { "type": [ "string", "null" ] } }, "required": [ "productId", "quantity", "price", "currency" ] } } }, "required": [ "catalogId", "items" ] }, { "type": "null" } ] } }, "required": [ "id", "channel", "contentType", "type", "createdAt", "reply", "order" ] } }, "required": [ "case", "message" ] }
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": [ "string", "null" ] }, "channel": { "type": [ "string", "null" ] } }, "required": [ "id", "pipelineId", "channel" ] }, "recipient": { "type": "object", "properties": { "externalSource": { "type": [ "string", "null" ] }, "externalId": { "type": [ "string", "null" ] } }, "required": [ "externalSource", "externalId" ] }, "message": { "type": "object", "properties": { "id": { "type": "string", "example": "msg_3PqA0x8bVw1TqS9mYp3RkL" }, "sequenceNumber": { "type": [ "integer", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "senderName": { "type": [ "string", "null" ] }, "hasFile": { "type": "boolean" } }, "required": [ "id", "sequenceNumber", "createdAt", "senderName", "hasFile" ] } }, "required": [ "case", "recipient", "message" ] }
{ "type": "object", "properties": { "kind": { "type": "string", "enum": [ "agent" ] }, "openPanel": { "type": [ "boolean", "null" ] }, "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" } }, "required": [ "id", "pipelineId" ] }, "recipient": { "type": "object", "properties": { "externalId": { "type": [ "string", "null" ] } }, "required": [ "externalId" ] }, "message": { "type": "object", "properties": { "id": { "type": "string", "example": "msg_3PqA0x8bVw1TqS9mYp3RkL" } }, "required": [ "id" ] }, "trigger": { "type": "object", "properties": { "id": { "type": [ "string", "null" ] }, "event": { "type": [ "string", "null" ] } }, "required": [ "id", "event" ] } }, "required": [ "kind", "openPanel", "case", "recipient", "message", "trigger" ] }
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "pipelineId": { "type": "string", "example": "ppl_3PqA0x8bVw1TqS9mYp3RkL" } }, "required": [ "id", "pipelineId" ] }, "messageId": { "type": "string", "example": "msg_3PqA0x8bVw1TqS9mYp3RkL" }, "code": { "type": "string", "enum": [ "agent_error", "budget_exceeded" ] }, "requestId": { "type": [ "string", "null" ] } }, "required": [ "case", "messageId", "code", "requestId" ] }
{ "type": "object", "properties": { "case": { "type": "object", "properties": { "id": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" } }, "required": [ "id" ] }, "turnId": { "type": "string", "example": "trn_7Hc2LmQ0x8bVw1TqS9mYp3" }, "agentId": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "completed", "incomplete", "failed" ] }, "model": { "type": [ "string", "null" ] }, "tokens": { "type": "object", "properties": { "input": { "type": "integer" }, "output": { "type": "integer" } }, "required": [ "input", "output" ] }, "toolCalls": { "type": "integer" } }, "required": [ "case", "turnId", "agentId", "status", "model", "tokens", "toolCalls" ] }
{ "type": "object", "properties": { "budget": { "type": "object", "properties": { "id": { "type": "string", "example": "bgt_7Hc2LmQ0x8bVw1TqS9mYp3" }, "scope": { "type": "string", "enum": [ "organization", "subaccount", "agent", "contact" ] }, "subjectId": { "type": [ "string", "null" ] } }, "required": [ "id", "scope", "subjectId" ] }, "alertPercent": { "type": "integer" }, "monthlyLimitConversations": { "type": "integer" }, "usedConversations": { "type": "integer" }, "resetsAt": { "type": "string", "format": "date-time" } }, "required": [ "budget", "alertPercent", "monthlyLimitConversations", "usedConversations", "resetsAt" ] }
{ "type": "object", "properties": { "budget": { "type": "object", "properties": { "id": { "type": "string", "example": "bgt_7Hc2LmQ0x8bVw1TqS9mYp3" }, "scope": { "type": "string", "enum": [ "organization", "subaccount", "agent", "contact" ] }, "subjectId": { "type": [ "string", "null" ] } }, "required": [ "id", "scope", "subjectId" ] }, "monthlyLimitConversations": { "type": "integer" }, "usedConversations": { "type": "integer" }, "resetsAt": { "type": "string", "format": "date-time" } }, "required": [ "budget", "monthlyLimitConversations", "usedConversations", "resetsAt" ] }
{ "type": "object", "properties": { "mcpServer": { "type": "object", "properties": { "id": { "type": "string", "example": "mcp_7Hc2LmQ0x8bVw1TqS9mYp3" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "reason": { "type": "string", "enum": [ "unauthorized" ] } }, "required": [ "mcpServer", "reason" ] }
{ "type": "object", "properties": { "message": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "whatsapp_message" ] }, "id": { "type": "string", "example": "wam_3PqA0x8bVw1TqS9mYp3RkL" }, "status": { "type": "string", "enum": [ "queued", "scheduled", "sending", "sent", "delivered", "read", "failed", "skipped", "canceled" ] }, "templateId": { "type": [ "string", "null" ] }, "contactId": { "type": [ "string", "null" ] }, "caseId": { "type": [ "string", "null" ] }, "sendAt": { "type": [ "string", "null" ], "format": "date-time" }, "skipReason": { "type": [ "string", "null" ] }, "failure": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } ] }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "templateId", "contactId", "caseId", "sendAt", "skipReason", "failure", "createdAt" ] }, "previousStatus": { "type": "string", "enum": [ "queued", "scheduled", "sending", "sent", "delivered", "read", "failed", "skipped", "canceled" ] } }, "required": [ "message", "previousStatus" ] }
{ "type": "object", "properties": { "message": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "whatsapp_message" ] }, "id": { "type": "string", "example": "wam_3PqA0x8bVw1TqS9mYp3RkL" }, "status": { "type": "string", "enum": [ "queued", "scheduled", "sending", "sent", "delivered", "read", "failed", "skipped", "canceled" ] }, "templateId": { "type": [ "string", "null" ] }, "contactId": { "type": [ "string", "null" ] }, "caseId": { "type": [ "string", "null" ] }, "sendAt": { "type": [ "string", "null" ], "format": "date-time" }, "skipReason": { "type": [ "string", "null" ] }, "failure": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } ] }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "templateId", "contactId", "caseId", "sendAt", "skipReason", "failure", "createdAt" ] }, "previousStatus": { "type": "string", "enum": [ "queued", "scheduled", "sending", "sent", "delivered", "read", "failed", "skipped", "canceled" ] } }, "required": [ "message", "previousStatus" ] }
{ "type": "object", "properties": { "contactId": { "type": "string", "example": "ctc_3PqA0x8bVw1TqS9mYp3RkL" }, "channel": { "type": "string", "enum": [ "whatsapp", "email", "voice" ] }, "source": { "type": "string", "enum": [ "contact", "organization" ] }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "contactId", "channel", "source", "createdAt" ] }
{ "type": "object", "properties": { "contactId": { "type": "string", "example": "ctc_3PqA0x8bVw1TqS9mYp3RkL" }, "suppressionId": { "type": "string", "example": "sup_3PqA0x8bVw1TqS9mYp3RkL" } }, "required": [ "contactId", "suppressionId" ] }
{ "type": "object", "properties": { "caseId": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "messageId": { "type": "string", "example": "msg_3PqA0x8bVw1TqS9mYp3RkL" } }, "required": [ "caseId", "messageId" ] }
{ "type": "object", "properties": { "approval": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "approval" ] }, "id": { "type": "string", "example": "apr_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected", "expired", "canceled", "executing", "executed", "failed" ] }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "caseId": { "type": [ "string", "null" ] }, "tool": { "type": "string" }, "arguments": { "type": [ "object", "null" ], "additionalProperties": true }, "summary": { "type": "string" }, "reasonCode": { "type": [ "string", "null" ], "enum": [ "policy_always", "policy_condition", "policy_accumulated", "policy_rule", null ] }, "ruleIndex": { "type": [ "integer", "null" ] }, "automatedDecision": { "type": "boolean" }, "dataSeen": { "type": "array", "items": { "type": "string" } }, "approvers": { "type": "array", "items": { "type": "object" } }, "requestedByKeyId": { "type": [ "string", "null" ] }, "decision": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "decidedAt": { "type": "string", "format": "date-time" }, "by": { "type": "object" }, "reason": { "type": [ "string", "null" ] } }, "required": [ "decidedAt", "by", "reason" ] } ] }, "result": { "type": [ "string", "null" ] }, "executedAt": { "type": [ "string", "null" ], "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "escalatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewRequestedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "agentId", "caseId", "tool", "arguments", "summary", "reasonCode", "ruleIndex", "automatedDecision", "dataSeen", "approvers", "requestedByKeyId", "decision", "result", "executedAt", "expiresAt", "escalatedAt", "reviewRequestedAt", "reviewReason", "createdAt", "updatedAt" ] } }, "required": [ "approval" ] }
{ "type": "object", "properties": { "approval": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "approval" ] }, "id": { "type": "string", "example": "apr_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected", "expired", "canceled", "executing", "executed", "failed" ] }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "caseId": { "type": [ "string", "null" ] }, "tool": { "type": "string" }, "arguments": { "type": [ "object", "null" ], "additionalProperties": true }, "summary": { "type": "string" }, "reasonCode": { "type": [ "string", "null" ], "enum": [ "policy_always", "policy_condition", "policy_accumulated", "policy_rule", null ] }, "ruleIndex": { "type": [ "integer", "null" ] }, "automatedDecision": { "type": "boolean" }, "dataSeen": { "type": "array", "items": { "type": "string" } }, "approvers": { "type": "array", "items": { "type": "object" } }, "requestedByKeyId": { "type": [ "string", "null" ] }, "decision": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "decidedAt": { "type": "string", "format": "date-time" }, "by": { "type": "object" }, "reason": { "type": [ "string", "null" ] } }, "required": [ "decidedAt", "by", "reason" ] } ] }, "result": { "type": [ "string", "null" ] }, "executedAt": { "type": [ "string", "null" ], "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "escalatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewRequestedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "agentId", "caseId", "tool", "arguments", "summary", "reasonCode", "ruleIndex", "automatedDecision", "dataSeen", "approvers", "requestedByKeyId", "decision", "result", "executedAt", "expiresAt", "escalatedAt", "reviewRequestedAt", "reviewReason", "createdAt", "updatedAt" ] } }, "required": [ "approval" ] }
{ "type": "object", "properties": { "approval": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "approval" ] }, "id": { "type": "string", "example": "apr_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected", "expired", "canceled", "executing", "executed", "failed" ] }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "caseId": { "type": [ "string", "null" ] }, "tool": { "type": "string" }, "arguments": { "type": [ "object", "null" ], "additionalProperties": true }, "summary": { "type": "string" }, "reasonCode": { "type": [ "string", "null" ], "enum": [ "policy_always", "policy_condition", "policy_accumulated", "policy_rule", null ] }, "ruleIndex": { "type": [ "integer", "null" ] }, "automatedDecision": { "type": "boolean" }, "dataSeen": { "type": "array", "items": { "type": "string" } }, "approvers": { "type": "array", "items": { "type": "object" } }, "requestedByKeyId": { "type": [ "string", "null" ] }, "decision": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "decidedAt": { "type": "string", "format": "date-time" }, "by": { "type": "object" }, "reason": { "type": [ "string", "null" ] } }, "required": [ "decidedAt", "by", "reason" ] } ] }, "result": { "type": [ "string", "null" ] }, "executedAt": { "type": [ "string", "null" ], "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "escalatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewRequestedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "agentId", "caseId", "tool", "arguments", "summary", "reasonCode", "ruleIndex", "automatedDecision", "dataSeen", "approvers", "requestedByKeyId", "decision", "result", "executedAt", "expiresAt", "escalatedAt", "reviewRequestedAt", "reviewReason", "createdAt", "updatedAt" ] } }, "required": [ "approval" ] }
{ "type": "object", "properties": { "approval": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "approval" ] }, "id": { "type": "string", "example": "apr_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected", "expired", "canceled", "executing", "executed", "failed" ] }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "caseId": { "type": [ "string", "null" ] }, "tool": { "type": "string" }, "arguments": { "type": [ "object", "null" ], "additionalProperties": true }, "summary": { "type": "string" }, "reasonCode": { "type": [ "string", "null" ], "enum": [ "policy_always", "policy_condition", "policy_accumulated", "policy_rule", null ] }, "ruleIndex": { "type": [ "integer", "null" ] }, "automatedDecision": { "type": "boolean" }, "dataSeen": { "type": "array", "items": { "type": "string" } }, "approvers": { "type": "array", "items": { "type": "object" } }, "requestedByKeyId": { "type": [ "string", "null" ] }, "decision": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "decidedAt": { "type": "string", "format": "date-time" }, "by": { "type": "object" }, "reason": { "type": [ "string", "null" ] } }, "required": [ "decidedAt", "by", "reason" ] } ] }, "result": { "type": [ "string", "null" ] }, "executedAt": { "type": [ "string", "null" ], "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "escalatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewRequestedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "agentId", "caseId", "tool", "arguments", "summary", "reasonCode", "ruleIndex", "automatedDecision", "dataSeen", "approvers", "requestedByKeyId", "decision", "result", "executedAt", "expiresAt", "escalatedAt", "reviewRequestedAt", "reviewReason", "createdAt", "updatedAt" ] } }, "required": [ "approval" ] }
{ "type": "object", "properties": { "approval": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "approval" ] }, "id": { "type": "string", "example": "apr_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected", "expired", "canceled", "executing", "executed", "failed" ] }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "caseId": { "type": [ "string", "null" ] }, "tool": { "type": "string" }, "arguments": { "type": [ "object", "null" ], "additionalProperties": true }, "summary": { "type": "string" }, "reasonCode": { "type": [ "string", "null" ], "enum": [ "policy_always", "policy_condition", "policy_accumulated", "policy_rule", null ] }, "ruleIndex": { "type": [ "integer", "null" ] }, "automatedDecision": { "type": "boolean" }, "dataSeen": { "type": "array", "items": { "type": "string" } }, "approvers": { "type": "array", "items": { "type": "object" } }, "requestedByKeyId": { "type": [ "string", "null" ] }, "decision": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "decidedAt": { "type": "string", "format": "date-time" }, "by": { "type": "object" }, "reason": { "type": [ "string", "null" ] } }, "required": [ "decidedAt", "by", "reason" ] } ] }, "result": { "type": [ "string", "null" ] }, "executedAt": { "type": [ "string", "null" ], "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "escalatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewRequestedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "agentId", "caseId", "tool", "arguments", "summary", "reasonCode", "ruleIndex", "automatedDecision", "dataSeen", "approvers", "requestedByKeyId", "decision", "result", "executedAt", "expiresAt", "escalatedAt", "reviewRequestedAt", "reviewReason", "createdAt", "updatedAt" ] } }, "required": [ "approval" ] }
{ "type": "object", "properties": { "approval": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "approval" ] }, "id": { "type": "string", "example": "apr_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected", "expired", "canceled", "executing", "executed", "failed" ] }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "caseId": { "type": [ "string", "null" ] }, "tool": { "type": "string" }, "arguments": { "type": [ "object", "null" ], "additionalProperties": true }, "summary": { "type": "string" }, "reasonCode": { "type": [ "string", "null" ], "enum": [ "policy_always", "policy_condition", "policy_accumulated", "policy_rule", null ] }, "ruleIndex": { "type": [ "integer", "null" ] }, "automatedDecision": { "type": "boolean" }, "dataSeen": { "type": "array", "items": { "type": "string" } }, "approvers": { "type": "array", "items": { "type": "object" } }, "requestedByKeyId": { "type": [ "string", "null" ] }, "decision": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "decidedAt": { "type": "string", "format": "date-time" }, "by": { "type": "object" }, "reason": { "type": [ "string", "null" ] } }, "required": [ "decidedAt", "by", "reason" ] } ] }, "result": { "type": [ "string", "null" ] }, "executedAt": { "type": [ "string", "null" ], "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" }, "escalatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewRequestedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "agentId", "caseId", "tool", "arguments", "summary", "reasonCode", "ruleIndex", "automatedDecision", "dataSeen", "approvers", "requestedByKeyId", "decision", "result", "executedAt", "expiresAt", "escalatedAt", "reviewRequestedAt", "reviewReason", "createdAt", "updatedAt" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "approval", "reason" ] }
{ "type": "object", "properties": { "automatedDecision": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "automated_decision" ] }, "id": { "type": "string", "example": "dec_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "caseId": { "type": [ "string", "null" ] }, "tool": { "type": "string" }, "outcome": { "type": "string", "enum": [ "allowed", "rejected" ] }, "reasonCode": { "type": "string", "enum": [ "policy_rule", "policy_not_required" ] }, "ruleIndex": { "type": [ "integer", "null" ] }, "dataSeen": { "type": "array", "items": { "type": "string" } }, "reviewRequestedAt": { "type": [ "string", "null" ], "format": "date-time" }, "reviewReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "caseId", "tool", "outcome", "reasonCode", "ruleIndex", "dataSeen", "reviewRequestedAt", "reviewReason", "createdAt" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "automatedDecision", "reason" ] }
{ "type": "object", "properties": { "question": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "team_question" ] }, "id": { "type": "string", "example": "tqn_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "open", "answered", "delivered", "discarded" ] }, "caseId": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "question": { "type": "string" }, "context": { "type": [ "string", "null" ] }, "answer": { "type": [ "string", "null" ] }, "answeredAt": { "type": [ "string", "null" ], "format": "date-time" }, "deliveredAt": { "type": [ "string", "null" ], "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "caseId", "question", "context", "answer", "answeredAt", "deliveredAt", "createdAt", "updatedAt" ] } }, "required": [ "question" ] }
{ "type": "object", "properties": { "question": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "team_question" ] }, "id": { "type": "string", "example": "tqn_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "open", "answered", "delivered", "discarded" ] }, "caseId": { "type": "string", "example": "cse_7Hc2LmQ0x8bVw1TqS9mYp3" }, "question": { "type": "string" }, "context": { "type": [ "string", "null" ] }, "answer": { "type": [ "string", "null" ] }, "answeredAt": { "type": [ "string", "null" ], "format": "date-time" }, "deliveredAt": { "type": [ "string", "null" ], "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "status", "caseId", "question", "context", "answer", "answeredAt", "deliveredAt", "createdAt", "updatedAt" ] } }, "required": [ "question" ] }
{ "type": "object", "properties": { "meeting": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "meeting" ] }, "id": { "type": "string", "example": "mtg_5RvP2aKq9XwLmN3tYbZc01" }, "agendaId": { "type": "string", "example": "agd_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "scheduled", "confirmed", "completed", "canceled", "no_show", "rescheduled" ] }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" }, "durationMinutes": { "type": "integer" }, "timezone": { "type": "string" }, "attendeeEmail": { "type": "string" }, "attendeeName": { "type": "string" }, "attendeePhone": { "type": [ "string", "null" ] }, "companyName": { "type": [ "string", "null" ] }, "context": { "type": [ "string", "null" ] }, "meetLink": { "type": [ "string", "null" ] }, "canceledAt": { "type": [ "string", "null" ], "format": "date-time" }, "cancelReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agendaId", "status", "start", "end", "durationMinutes", "timezone", "attendeeEmail", "attendeeName", "attendeePhone", "companyName", "context", "meetLink", "canceledAt", "cancelReason", "createdAt", "updatedAt" ] } }, "required": [ "meeting" ] }
{ "type": "object", "properties": { "meeting": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "meeting" ] }, "id": { "type": "string", "example": "mtg_5RvP2aKq9XwLmN3tYbZc01" }, "agendaId": { "type": "string", "example": "agd_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "scheduled", "confirmed", "completed", "canceled", "no_show", "rescheduled" ] }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" }, "durationMinutes": { "type": "integer" }, "timezone": { "type": "string" }, "attendeeEmail": { "type": "string" }, "attendeeName": { "type": "string" }, "attendeePhone": { "type": [ "string", "null" ] }, "companyName": { "type": [ "string", "null" ] }, "context": { "type": [ "string", "null" ] }, "meetLink": { "type": [ "string", "null" ] }, "canceledAt": { "type": [ "string", "null" ], "format": "date-time" }, "cancelReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agendaId", "status", "start", "end", "durationMinutes", "timezone", "attendeeEmail", "attendeeName", "attendeePhone", "companyName", "context", "meetLink", "canceledAt", "cancelReason", "createdAt", "updatedAt" ] } }, "required": [ "meeting" ] }
{ "type": "object", "properties": { "meeting": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "meeting" ] }, "id": { "type": "string", "example": "mtg_5RvP2aKq9XwLmN3tYbZc01" }, "agendaId": { "type": "string", "example": "agd_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "scheduled", "confirmed", "completed", "canceled", "no_show", "rescheduled" ] }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" }, "durationMinutes": { "type": "integer" }, "timezone": { "type": "string" }, "attendeeEmail": { "type": "string" }, "attendeeName": { "type": "string" }, "attendeePhone": { "type": [ "string", "null" ] }, "companyName": { "type": [ "string", "null" ] }, "context": { "type": [ "string", "null" ] }, "meetLink": { "type": [ "string", "null" ] }, "canceledAt": { "type": [ "string", "null" ], "format": "date-time" }, "cancelReason": { "type": [ "string", "null" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agendaId", "status", "start", "end", "durationMinutes", "timezone", "attendeeEmail", "attendeeName", "attendeePhone", "companyName", "context", "meetLink", "canceledAt", "cancelReason", "createdAt", "updatedAt" ] } }, "required": [ "meeting" ] }
{ "type": "object", "properties": { "template": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "template" ] }, "id": { "type": "string", "example": "tpl_3PqA0x8bVw1TqS9mYp3RkL" }, "name": { "type": "string" }, "language": { "type": "string" }, "category": { "type": "string", "enum": [ "marketing", "utility", "authentication" ] }, "status": { "type": "string", "enum": [ "in_review", "approved", "rejected", "paused" ] }, "rejectionReason": { "type": [ "string", "null" ] } }, "required": [ "object", "id", "name", "language", "category", "status", "rejectionReason" ] }, "previousStatus": { "type": "string", "enum": [ "in_review", "approved", "rejected", "paused" ] } }, "required": [ "template", "previousStatus" ] }
{ "type": "object", "properties": { "campaign": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "campaign" ] }, "id": { "type": "string", "example": "cmp_3PqA0x8bVw1TqS9mYp3RkL" }, "name": { "type": "string" }, "status": { "type": "string", "enum": [ "draft", "scheduled", "sending", "paused", "completed", "canceled" ] }, "pauseReason": { "type": [ "string", "null" ] } }, "required": [ "object", "id", "name", "status", "pauseReason" ] }, "previousStatus": { "type": [ "string", "null" ], "enum": [ "draft", "scheduled", "sending", "paused", "completed", "canceled", null ] } }, "required": [ "campaign", "previousStatus" ] }
{ "type": "object", "properties": { "triggerId": { "type": "string", "example": "trg_1Qa0x8bVw1TqS9mYp3RkLd" }, "contactId": { "type": "string", "example": "ctc_3PqA0x8bVw1TqS9mYp3RkL" }, "caseId": { "type": [ "string", "null" ] }, "attempt": { "type": "integer" }, "attempts": { "type": "integer" }, "result": { "type": "string", "enum": [ "sent", "skipped", "stopped" ] }, "reason": { "type": [ "string", "null" ] }, "messageId": { "type": [ "string", "null" ] }, "nextAttemptAt": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "triggerId", "contactId", "caseId", "attempt", "attempts", "result", "reason", "messageId", "nextAttemptAt" ] }
{ "type": "object", "properties": { "kind": { "type": "string", "enum": [ "status", "step" ] }, "userId": { "type": [ "string", "null" ] }, "turnId": { "type": [ "string", "null" ] }, "seq": { "type": [ "integer", "null" ] }, "status": { "type": "string", "enum": [ "running", "finished", "stopped", "failed" ] }, "messageIds": { "type": "array", "items": { "type": "string" } }, "order": { "type": "integer" }, "slug": { "type": [ "string", "null" ] }, "mode": { "type": "string", "enum": [ "read", "write" ] }, "stepStatus": { "type": "string", "enum": [ "running", "done", "failed" ] } }, "required": [ "kind", "userId", "turnId", "seq" ] }
{ "type": "object", "properties": { "run": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "run" ] }, "id": { "type": "string", "example": "run_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "running", "waiting_for_answer", "completed_unverified", "stopped", "failed", "canceled" ] }, "stopReason": { "type": [ "string", "null" ], "enum": [ "rounds", "cost", "time", "no_conclusion", "loop", "abandoned", null ], "description": "rounds: the run used all the rounds allowed by limits.maxRounds. cost: the run reached the spending limit Lelemon sets for every run. time: the run lasted all the minutes allowed by limits.maxMinutes. no_conclusion: the agent answered four times in a row without calling its finish action, so it never declared the job done. Its last answer is in result.partial. loop: the agent kept repeating the same action, so the run was cut. abandoned: with status failed: the agent asked a question and nobody answered it in 30 days." }, "question": { "type": [ "string", "null" ] }, "rounds": { "type": "integer" }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "result": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "summary": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "partial": { "type": "string" }, "error": { "type": "string" }, "errorCode": { "type": "string" } }, "required": [] } ] }, "cancelRequested": { "type": "boolean" }, "schedule": { "type": [ "string", "null" ], "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "actor": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "end_user", "staff", "admin" ] }, "declaredBy": { "type": "string" } }, "required": [ "id", "role", "declaredBy" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": [ "string", "null" ], "format": "date-time" }, "finishedAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "status", "stopReason", "question", "rounds", "limits", "result", "cancelRequested", "schedule", "actor", "createdAt", "startedAt", "finishedAt", "updatedAt" ] } }, "required": [ "run" ] }
{ "type": "object", "properties": { "run": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "run" ] }, "id": { "type": "string", "example": "run_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "running", "waiting_for_answer", "completed_unverified", "stopped", "failed", "canceled" ] }, "stopReason": { "type": [ "string", "null" ], "enum": [ "rounds", "cost", "time", "no_conclusion", "loop", "abandoned", null ], "description": "rounds: the run used all the rounds allowed by limits.maxRounds. cost: the run reached the spending limit Lelemon sets for every run. time: the run lasted all the minutes allowed by limits.maxMinutes. no_conclusion: the agent answered four times in a row without calling its finish action, so it never declared the job done. Its last answer is in result.partial. loop: the agent kept repeating the same action, so the run was cut. abandoned: with status failed: the agent asked a question and nobody answered it in 30 days." }, "question": { "type": [ "string", "null" ] }, "rounds": { "type": "integer" }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "result": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "summary": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "partial": { "type": "string" }, "error": { "type": "string" }, "errorCode": { "type": "string" } }, "required": [] } ] }, "cancelRequested": { "type": "boolean" }, "schedule": { "type": [ "string", "null" ], "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "actor": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "end_user", "staff", "admin" ] }, "declaredBy": { "type": "string" } }, "required": [ "id", "role", "declaredBy" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": [ "string", "null" ], "format": "date-time" }, "finishedAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "status", "stopReason", "question", "rounds", "limits", "result", "cancelRequested", "schedule", "actor", "createdAt", "startedAt", "finishedAt", "updatedAt" ] } }, "required": [ "run" ] }
{ "type": "object", "properties": { "run": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "run" ] }, "id": { "type": "string", "example": "run_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "running", "waiting_for_answer", "completed_unverified", "stopped", "failed", "canceled" ] }, "stopReason": { "type": [ "string", "null" ], "enum": [ "rounds", "cost", "time", "no_conclusion", "loop", "abandoned", null ], "description": "rounds: the run used all the rounds allowed by limits.maxRounds. cost: the run reached the spending limit Lelemon sets for every run. time: the run lasted all the minutes allowed by limits.maxMinutes. no_conclusion: the agent answered four times in a row without calling its finish action, so it never declared the job done. Its last answer is in result.partial. loop: the agent kept repeating the same action, so the run was cut. abandoned: with status failed: the agent asked a question and nobody answered it in 30 days." }, "question": { "type": [ "string", "null" ] }, "rounds": { "type": "integer" }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "result": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "summary": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "partial": { "type": "string" }, "error": { "type": "string" }, "errorCode": { "type": "string" } }, "required": [] } ] }, "cancelRequested": { "type": "boolean" }, "schedule": { "type": [ "string", "null" ], "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "actor": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "end_user", "staff", "admin" ] }, "declaredBy": { "type": "string" } }, "required": [ "id", "role", "declaredBy" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": [ "string", "null" ], "format": "date-time" }, "finishedAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "status", "stopReason", "question", "rounds", "limits", "result", "cancelRequested", "schedule", "actor", "createdAt", "startedAt", "finishedAt", "updatedAt" ] } }, "required": [ "run" ] }
{ "type": "object", "properties": { "run": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "run" ] }, "id": { "type": "string", "example": "run_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "running", "waiting_for_answer", "completed_unverified", "stopped", "failed", "canceled" ] }, "stopReason": { "type": [ "string", "null" ], "enum": [ "rounds", "cost", "time", "no_conclusion", "loop", "abandoned", null ], "description": "rounds: the run used all the rounds allowed by limits.maxRounds. cost: the run reached the spending limit Lelemon sets for every run. time: the run lasted all the minutes allowed by limits.maxMinutes. no_conclusion: the agent answered four times in a row without calling its finish action, so it never declared the job done. Its last answer is in result.partial. loop: the agent kept repeating the same action, so the run was cut. abandoned: with status failed: the agent asked a question and nobody answered it in 30 days." }, "question": { "type": [ "string", "null" ] }, "rounds": { "type": "integer" }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "result": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "summary": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "partial": { "type": "string" }, "error": { "type": "string" }, "errorCode": { "type": "string" } }, "required": [] } ] }, "cancelRequested": { "type": "boolean" }, "schedule": { "type": [ "string", "null" ], "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "actor": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "end_user", "staff", "admin" ] }, "declaredBy": { "type": "string" } }, "required": [ "id", "role", "declaredBy" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": [ "string", "null" ], "format": "date-time" }, "finishedAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "status", "stopReason", "question", "rounds", "limits", "result", "cancelRequested", "schedule", "actor", "createdAt", "startedAt", "finishedAt", "updatedAt" ] } }, "required": [ "run" ] }
{ "type": "object", "properties": { "run": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "run" ] }, "id": { "type": "string", "example": "run_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "running", "waiting_for_answer", "completed_unverified", "stopped", "failed", "canceled" ] }, "stopReason": { "type": [ "string", "null" ], "enum": [ "rounds", "cost", "time", "no_conclusion", "loop", "abandoned", null ], "description": "rounds: the run used all the rounds allowed by limits.maxRounds. cost: the run reached the spending limit Lelemon sets for every run. time: the run lasted all the minutes allowed by limits.maxMinutes. no_conclusion: the agent answered four times in a row without calling its finish action, so it never declared the job done. Its last answer is in result.partial. loop: the agent kept repeating the same action, so the run was cut. abandoned: with status failed: the agent asked a question and nobody answered it in 30 days." }, "question": { "type": [ "string", "null" ] }, "rounds": { "type": "integer" }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "result": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "summary": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "partial": { "type": "string" }, "error": { "type": "string" }, "errorCode": { "type": "string" } }, "required": [] } ] }, "cancelRequested": { "type": "boolean" }, "schedule": { "type": [ "string", "null" ], "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "actor": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "end_user", "staff", "admin" ] }, "declaredBy": { "type": "string" } }, "required": [ "id", "role", "declaredBy" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": [ "string", "null" ], "format": "date-time" }, "finishedAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "status", "stopReason", "question", "rounds", "limits", "result", "cancelRequested", "schedule", "actor", "createdAt", "startedAt", "finishedAt", "updatedAt" ] } }, "required": [ "run" ] }
{ "type": "object", "properties": { "run": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "run" ] }, "id": { "type": "string", "example": "run_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "running", "waiting_for_answer", "completed_unverified", "stopped", "failed", "canceled" ] }, "stopReason": { "type": [ "string", "null" ], "enum": [ "rounds", "cost", "time", "no_conclusion", "loop", "abandoned", null ], "description": "rounds: the run used all the rounds allowed by limits.maxRounds. cost: the run reached the spending limit Lelemon sets for every run. time: the run lasted all the minutes allowed by limits.maxMinutes. no_conclusion: the agent answered four times in a row without calling its finish action, so it never declared the job done. Its last answer is in result.partial. loop: the agent kept repeating the same action, so the run was cut. abandoned: with status failed: the agent asked a question and nobody answered it in 30 days." }, "question": { "type": [ "string", "null" ] }, "rounds": { "type": "integer" }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "result": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "summary": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "partial": { "type": "string" }, "error": { "type": "string" }, "errorCode": { "type": "string" } }, "required": [] } ] }, "cancelRequested": { "type": "boolean" }, "schedule": { "type": [ "string", "null" ], "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "actor": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "end_user", "staff", "admin" ] }, "declaredBy": { "type": "string" } }, "required": [ "id", "role", "declaredBy" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": [ "string", "null" ], "format": "date-time" }, "finishedAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "status", "stopReason", "question", "rounds", "limits", "result", "cancelRequested", "schedule", "actor", "createdAt", "startedAt", "finishedAt", "updatedAt" ] } }, "required": [ "run" ] }
{ "type": "object", "properties": { "schedule": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "schedule" ] }, "id": { "type": "string", "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "contactId": { "type": "string", "example": "ctc_5RvP2aKq9XwLmN3tYbZc01" }, "name": { "type": "string" }, "cron": { "type": "string" }, "timezone": { "type": "string" }, "goal": { "type": "string" }, "channel": { "type": "string", "enum": [ "email" ] }, "from": { "type": [ "string", "null" ] }, "onReply": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "instructions": { "type": "string" } }, "required": [ "instructions" ] } ] }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "enabled": { "type": "boolean" }, "pausedReason": { "type": [ "string", "null" ] }, "nextRunAt": { "type": "string", "format": "date-time" }, "lastRunAt": { "type": [ "string", "null" ], "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "contactId", "name", "cron", "timezone", "goal", "channel", "from", "onReply", "limits", "enabled", "pausedReason", "nextRunAt", "lastRunAt", "createdAt", "updatedAt" ] }, "run": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "run" ] }, "id": { "type": "string", "example": "run_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "status": { "type": "string", "enum": [ "running", "waiting_for_answer", "completed_unverified", "stopped", "failed", "canceled" ] }, "stopReason": { "type": [ "string", "null" ], "enum": [ "rounds", "cost", "time", "no_conclusion", "loop", "abandoned", null ], "description": "rounds: the run used all the rounds allowed by limits.maxRounds. cost: the run reached the spending limit Lelemon sets for every run. time: the run lasted all the minutes allowed by limits.maxMinutes. no_conclusion: the agent answered four times in a row without calling its finish action, so it never declared the job done. Its last answer is in result.partial. loop: the agent kept repeating the same action, so the run was cut. abandoned: with status failed: the agent asked a question and nobody answered it in 30 days." }, "question": { "type": [ "string", "null" ] }, "rounds": { "type": "integer" }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "result": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "summary": { "type": "string" }, "checks": { "type": "array", "items": { "type": "string" } }, "partial": { "type": "string" }, "error": { "type": "string" }, "errorCode": { "type": "string" } }, "required": [] } ] }, "cancelRequested": { "type": "boolean" }, "schedule": { "type": [ "string", "null" ], "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "actor": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "end_user", "staff", "admin" ] }, "declaredBy": { "type": "string" } }, "required": [ "id", "role", "declaredBy" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "startedAt": { "type": [ "string", "null" ], "format": "date-time" }, "finishedAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "status", "stopReason", "question", "rounds", "limits", "result", "cancelRequested", "schedule", "actor", "createdAt", "startedAt", "finishedAt", "updatedAt" ] } }, "required": [ "schedule", "run" ] }
{ "type": "object", "properties": { "schedule": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "schedule" ] }, "id": { "type": "string", "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "contactId": { "type": "string", "example": "ctc_5RvP2aKq9XwLmN3tYbZc01" }, "name": { "type": "string" }, "cron": { "type": "string" }, "timezone": { "type": "string" }, "goal": { "type": "string" }, "channel": { "type": "string", "enum": [ "email" ] }, "from": { "type": [ "string", "null" ] }, "onReply": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "instructions": { "type": "string" } }, "required": [ "instructions" ] } ] }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "enabled": { "type": "boolean" }, "pausedReason": { "type": [ "string", "null" ] }, "nextRunAt": { "type": "string", "format": "date-time" }, "lastRunAt": { "type": [ "string", "null" ], "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "contactId", "name", "cron", "timezone", "goal", "channel", "from", "onReply", "limits", "enabled", "pausedReason", "nextRunAt", "lastRunAt", "createdAt", "updatedAt" ] }, "reason": { "type": "string", "enum": [ "opted_out", "recipient_not_allowed", "agent_unavailable", "contact_unavailable" ] } }, "required": [ "schedule", "reason" ] }
{ "type": "object", "properties": { "schedule": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "schedule" ] }, "id": { "type": "string", "example": "sch_5RvP2aKq9XwLmN3tYbZc01" }, "agentId": { "type": "string", "example": "agt_5RvP2aKq9XwLmN3tYbZc01" }, "contactId": { "type": "string", "example": "ctc_5RvP2aKq9XwLmN3tYbZc01" }, "name": { "type": "string" }, "cron": { "type": "string" }, "timezone": { "type": "string" }, "goal": { "type": "string" }, "channel": { "type": "string", "enum": [ "email" ] }, "from": { "type": [ "string", "null" ] }, "onReply": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "instructions": { "type": "string" } }, "required": [ "instructions" ] } ] }, "limits": { "type": "object", "properties": { "maxRounds": { "type": "integer" }, "maxMinutes": { "type": "integer" } }, "required": [ "maxRounds", "maxMinutes" ] }, "enabled": { "type": "boolean" }, "pausedReason": { "type": [ "string", "null" ] }, "nextRunAt": { "type": "string", "format": "date-time" }, "lastRunAt": { "type": [ "string", "null" ], "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "agentId", "contactId", "name", "cron", "timezone", "goal", "channel", "from", "onReply", "limits", "enabled", "pausedReason", "nextRunAt", "lastRunAt", "createdAt", "updatedAt" ] }, "reason": { "type": "string", "enum": [ "consecutive_failures" ] } }, "required": [ "schedule", "reason" ] }
{ "type": "object", "properties": { "document": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "knowledge_document" ] }, "id": { "type": "string", "example": "kbd_9Hs3x8bVw1TqS9mYp3RkLd" }, "collectionId": { "type": "string", "example": "kbc_2LpX0x8bVw1TqS9mYp3RkL" }, "name": { "type": "string" }, "mimeType": { "type": "string" }, "sizeBytes": { "type": "integer" }, "status": { "type": "string", "enum": [ "processing", "ready", "failed" ] }, "chunkCount": { "type": "integer" }, "error": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "collectionId", "name", "mimeType", "sizeBytes", "status", "chunkCount", "error", "createdAt", "updatedAt" ] } }, "required": [ "document" ] }
{ "type": "object", "properties": { "document": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "knowledge_document" ] }, "id": { "type": "string", "example": "kbd_9Hs3x8bVw1TqS9mYp3RkLd" }, "collectionId": { "type": "string", "example": "kbc_2LpX0x8bVw1TqS9mYp3RkL" }, "name": { "type": "string" }, "mimeType": { "type": "string" }, "sizeBytes": { "type": "integer" }, "status": { "type": "string", "enum": [ "processing", "ready", "failed" ] }, "chunkCount": { "type": "integer" }, "error": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "collectionId", "name", "mimeType", "sizeBytes", "status", "chunkCount", "error", "createdAt", "updatedAt" ] } }, "required": [ "document" ] }
{ "type": "object", "properties": { "phoneNumber": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "phone_number" ] }, "id": { "type": "string", "example": "pn_4Zq0x8bVw1TqS9mYp3RkLd" }, "phone": { "type": [ "string", "null" ] }, "verifiedName": { "type": [ "string", "null" ] }, "agentId": { "type": [ "string", "null" ] }, "active": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "phone", "verifiedName", "agentId", "active", "createdAt", "updatedAt" ] }, "connectionId": { "type": "string" } }, "required": [ "phoneNumber", "connectionId" ] }
{ "type": "object", "properties": { "connection": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "whatsapp_connection" ] }, "id": { "type": "string", "example": "wcn_4Zq0x8bVw1TqS9mYp3RkLd" }, "phone": { "type": "string" }, "agentId": { "type": [ "string", "null" ] }, "connectionType": { "type": "string", "enum": [ "coexistence", "dedicated" ] }, "status": { "type": "string" }, "setupUrl": { "type": [ "string", "null" ] }, "expiresAt": { "type": [ "string", "null" ], "format": "date-time" }, "phoneNumberId": { "type": [ "string", "null" ] }, "failure": { "oneOf": [ { "type": "null" }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ] } ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "phone", "agentId", "connectionType", "status", "setupUrl", "expiresAt", "phoneNumberId", "failure", "createdAt", "updatedAt" ] } }, "required": [ "connection" ] }
{ "type": "object", "properties": { "phoneNumber": { "type": "object", "properties": { "object": { "type": "string", "enum": [ "phone_number" ] }, "id": { "type": "string", "example": "pn_4Zq0x8bVw1TqS9mYp3RkLd" }, "phone": { "type": [ "string", "null" ] }, "verifiedName": { "type": [ "string", "null" ] }, "agentId": { "type": [ "string", "null" ] }, "active": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "object", "id", "phone", "verifiedName", "agentId", "active", "createdAt", "updatedAt" ] } }, "required": [ "phoneNumber" ] }
{ "type": "object", "properties": { "endpointId": { "type": "string", "example": "whk_3PqA0x8bVw1TqS9mYp3RkL" }, "message": { "type": "string" } }, "required": [ "endpointId", "message" ] }
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON