Lelemon
  • Get started
  • Use cases
  • Guides
  • API basics
  • Webhooks
  • SDK, CLI and MCP
  • API reference
  • Changelog
  • v1 (legacy)
Information
Me
    Retrieve the current keyget
API keys
    List scopesget
Agents
    List agentsgetCreate an agentpostRetrieve an agentgetDelete an agentdeleteUpdate an agentpatchActivate an agentpostPause an agentpostList versionsgetRetrieve a versiongetRestore a versionpostList the fixed facts of an agentgetSave a fixed fact of an agentputForget a fixed fact of an agentdelete
Models and templates
    List agent templatesgetList modelsget
Subaccounts
    List subaccountsgetCreate a subaccountpostRetrieve a subaccountgetDelete a subaccountdeleteUpdate a subaccountpatchGive a subaccount its own keypost
WhatsApp
    List WhatsApp connectionsgetCreate a WhatsApp connection linkpostRetrieve a WhatsApp connectiongetRevoke a pending WhatsApp connectiondeleteList WhatsApp phone numbersgetRetrieve a WhatsApp phone numbergetDisconnect a WhatsApp phone numberdeleteChange the agent, label or state of a numberpatchRead the cart and catalog settings of a numbergetTurn the cart button or the catalog icon of a number on or offpatch
Actions
    List actionsgetCreate an actionpostRead the current authorization textgetRotate the signing secret of your actionspostRetrieve the signing secret of an actiongetRetrieve an actiongetDelete an actiondeleteUpdate an actionpatchTest an actionpostRead the approval floor of a shared actiongetSet the approval floor of a shared actionput
MCP servers
    List MCP serversgetConnect an MCP serverpostRetrieve an MCP servergetDisconnect an MCP serverdeleteUpdate an MCP serverpatchList the tools of an MCP servergetDiscover toolspostRead the run identity of an MCP servergetTurn on or rotate the run identity of an MCP serverpostTurn off the run identity of an MCP serverdelete
Data connectors
    Get the lelemon-connector/v1 formatgetValidate a connector documentpostList data connectorsgetRegister a data connectorpostRetrieve a data connectorgetDelete a data connectordeleteUpdate a data connectorpatchRetrieve the signing secret of a data connectorgetRotate the signing secret of a data connectorpostCheck a data connectorpostRetrieve the manifest of a data connectorgetSearch accounts by emailgetRead the card of an account livegetReveal one masked value of an accountpostGet the link of an account actionpostRead a view livegetList who looked at what through a connectorget
Skills
    List skillsgetCreate a skillpostRetrieve a skillgetDelete a skilldeleteUpdate a skillpatch
Agent tools
    List an agent's toolsgetGrant a toolputRemove a tooldelete
Approvals
    List approvalsgetRetrieve an approvalgetApprove an actionpostReject an actionpostAsk for a human review of a decisionpost
Automated decisions
    List automated decisionsgetRetrieve an automated decisiongetAsk for a human review of an automated decisionpost
Team questions
    List team questionsgetRetrieve a team questiongetRead a team question with its contextgetAnswer a team questionpost
Runs
    Give an agent a jobpostList runsgetRetrieve a rungetCancel a runpostAnswer a run that asked somethingpost
Schedules
    Schedule a job for an agentpostList scheduled tasksgetRetrieve a scheduled taskgetDelete a scheduled taskdeleteChange a scheduled taskpatchFire a scheduled task nowpost
Pipelines
    List pipelinesgetCreate a pipelinepostRetrieve a pipelinegetDelete a pipelinedeleteUpdate a pipelinepatchClone a pipelinepostReorder the stages of a pipelinepost
Stages
    List the stages of a pipelinegetCreate a stagepostRetrieve a stagegetDelete a stagedeleteUpdate a stagepatchMake a stage the entry stagepost
Fields
    List the fields of a pipelinegetCreate a fieldpostRetrieve a fieldgetDelete a fielddeleteUpdate a fieldpatch
Routing rules
    List the routing rules of a pipelinegetCreate a routing rulepostRetrieve a routing rulegetDelete a routing ruledeleteUpdate a routing rulepatch
Knowledge
    List collectionsgetCreate a collectionpostSearch the knowledgepostRetrieve a collectiongetDelete a collectiondeleteUpdate a collectionpatchList documentsgetAdd a documentpostRetrieve a documentgetDelete a documentdeleteUpdate a documentpatchLet an agent search a collectionputStop an agent from searching a collectiondelete
Contacts
    List contactsgetCreate a contactpostCreate or update a contact by your own idputRetrieve a contactgetErase a contactdeleteUpdate a contactpatch
Contact fields
    List the contact fieldsgetCreate a contact fieldpostRetrieve a contact fieldgetDelete a contact fielddeleteUpdate a contact fieldpatch
Companies
    List companiesgetCreate a companypostRetrieve a companygetDelete a companydeleteUpdate a companypatch
Lead forms
    List lead formsgetCreate a lead formpostRetrieve a lead formgetDelete a lead formdeleteUpdate a lead formpatch
Suppressions
    Retrieve a suppressionget
Cases
    List casesgetOpen a casepostRetrieve a casegetDelete a casedeleteUpdate a casepatchMove a case to a stagepostAssign a case to a memberpostClose a casepostReopen a casepostTake control of a casepostHand a case back to the agentpostMark a case as readpostMove several cases to a stagepostArchive a casepostBring an archived case backpostMute the contact of a casepostUnmute the contact of a casepostHand a case to a personpostReveal a sensitive field of a casepostEscalate a case to the technical teampostList the escalations of a caseget
Case queue
    Read the attention queue of a memberget
Contact events
    List the events of a contactgetReport a contact eventpostRetrieve a contact eventget
Case reminders
    List the reminders of a casegetAdd a reminder to a casepost
Reminders
    Retrieve a remindergetDelete a reminderdeleteEdit a reminderpatchComplete a reminderpostDismiss a reminderpost
Presence
    Report who is online in your apppostRead the presence settinggetTurn presence on or offput
Organization
    Get the organizationgetRename the organizationpatchGet the organization settingsgetChange the organization settingspatchGet the company profilegetChange the company profilepatch
Case notes
    List the notes of a casegetAdd a note to a casepostRetrieve a notegetDelete a notedeleteEdit a notepatch
Case attachments
    List the files of a casegetUpload a file to a casepostRetrieve a file of a casegetDelete a file of a casedeleteGet the download link of a fileget
Files
    List filesgetUpload a filepostRetrieve a filegetDelete a filedelete
Case messages
    List the messages of a casegetAdd a message to a casepostRedact a messagepost
Case turns
    List the turns the agent took in a caseget
Usage
    Get the usage of your agentsget
Case metrics
    List the times of the cases that changed in a rangeget
Budgets
    List the budgetsgetCreate a monthly budgetpostGet a budgetgetDelete a budgetdeleteChange a budgetpatch
Members
    List the active members of the organizationgetList who invited, changed the role of or removed membersgetRead whether a team member is availablegetMark a team member available or awayputChange the role of a memberpatchChange which cases a member seespatchRemove a member from the organizationdelete
Invitations
    List the invitations of the organizationgetInvite a person to the organizationpostResend an invitationpostCancel an invitationpost
Scheduling
    List the agendasgetCreate an agendapostRetrieve an agendagetUpdate an agendapatchList the team of an agendagetAdd a person to the team of an agendapostRemove a person from the team of an agendadeleteUpdate a person in the team of an agendapatchRead the free slots of an agendagetList meetingsgetBook a meetingpostRetrieve a meetinggetCancel a meetingpostMove a meeting to another slotpost
Webhook endpoints
    List webhook endpointsgetCreate a webhook endpointpostRetrieve a webhook endpointgetDelete a webhook endpointdeleteUpdate a webhook endpointpatchRotate the signing secretpostSend a test eventpostList the deliveries of an endpointget
Events
    Resend an eventpostList the event typesget
Recipient allowlist
    Get the recipient allowlistgetReplace the recipient allowlistput
WhatsApp templates
    List templatesgetCreate a templatepostSync template statusespostRetrieve a templategetDelete a templatedeleteUpdate a templatepatchRender a templatepostSend a test messagepost
WhatsApp messages
    Send a templatepostRetrieve a template messagegetCancel a scheduled messagepost
Triggers
    List triggersgetCreate a triggerpostRetrieve a triggergetDelete a triggerdeleteUpdate a triggerpatchList the runs of a triggerget
Opt-outs
    List opt-outsgetOpt a contact outputClear an opt-outdelete
Campaigns
    List campaignsgetCreate a campaignpostRetrieve a campaigngetDelete a campaigndeleteUpdate a campaignpatchPreview a campaignpostLaunch a campaignpostPause a campaignpostResume a campaignpostCancel a campaignpostList recipientsget
Email domains
    List the sender domainsgetAdd a sender domainpostGet a sender domain with its status and DNS recordsgetRemove a sender domaindeleteChange the default sender or the inbound agent of a domainpatchCheck the DNS records nowpost
Email messages
    Write first by emailpostRetrieve an email messageget
Teams
    List the teamsgetCreate a teampostRetrieve a teamgetDelete a teamdeleteUpdate a teampatchMerge another team into this onepostMove a pipeline into a teamputAdd a member to a team or change their role in itputRemove a member from a teamdelete
Linear
    Get the Linear connectiongetConnect LinearputDisconnect LineardeleteUpdate the Linear connectionpatch
Schemas
powered by Zudoku
Lelemon API
Lelemon API

Triggers


List triggers

GET
https://api.lelemon.cl
/v2/triggers
Bearer (API key)

Lists the triggers of the organization: the rules that send a message when an event arrives or a contact stays silent. Filter to find one before you change it. Read only. It is safe to repeat.

Required scope: triggers:read.

List triggers › query Parameters

limit
​integer · min: 1 · max: 100
Default: 20
cursor
​string · maxLength: 512

The nextCursor of the previous page, with the same filters.

contactEvent
​string

Only the triggers of this fact.

List triggers › Headers

Lelemon-Subaccount
​string · pattern: ^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 triggers › Responses

TriggerList
object
​string · enum · required
Enum values:
list
hasMore
​boolean · required
nextCursor
​string | null · required
​Trigger[] · required
GET/v2/triggers
curl https://api.lelemon.cl/v2/triggers \ --header 'Authorization: Bearer <token>'
Example Responses
{ "object": "list", "hasMore": true, "nextCursor": "nextCursor", "data": [ { "object": "trigger", "id": "trg_1Qa0x8bVw1TqS9mYp3RkLd", "contactEvent": "contactEvent", "channel": "whatsapp", "templateId": "templateId", "email": { "subject": "We miss you, {{name}}", "text": "Hi {{name}}, here is a coupon: {{coupon}}.", "from": "support@mail.acme.com" }, "variables": { "key": "string" }, "onReply": { "agentId": "agentId", "stageId": "stageId" }, "instructions": "instructions", "cooldownDays": 0, "onEvent": { "openCase": { "pipelineId": "ppl_3PqA0x8bVw1TqS9mYp3RkL", "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" }, "moveCase": { "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" } }, "cadence": { "attempts": 0, "intervalHours": 0, "window": { "from": "10:00", "to": "21:00", "timezone": "America/Santiago" }, "stopOn": [ "reply" ] }, "status": "active", "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" } ] }
json
application/json

Create a trigger

POST
https://api.lelemon.cl
/v2/triggers
Bearer (API key)

When you report a contact event with this name, the template goes out with the variables taken from the event. variables must cover every variable of the template. Add onEvent to open or move the contact case the moment the event arrives, without waiting for a reply. Leave templateId out and send only onEvent for a trigger that sends no message: when the event arrives it opens or moves the case of the contact and nothing goes out, so it costs nothing; a trigger with neither templateId nor onEvent is rejected because it would do nothing. Add cadence to repeat the template up to 5 times until the contact replies, opts out, or the case changes stage or closes. onEvent and cadence are for WhatsApp triggers only, and a trigger without a template has no variables, onReply, instructions, cooldownDays or cadence. Creating a trigger sends nothing, and send an Idempotency-Key to make a retry safe. Use dryRun=true to run the same checks (template, variables, onReply, onEvent, cadence) and get 200 with the trigger as it would be saved, without saving it; its id is not saved.

Required scope: triggers:write.

Create a trigger › query Parameters

dryRun
​boolean

When true, the request goes through the same validation as the real one and is answered with what would happen (always 200), and nothing is saved, sent or charged. The answer has the same shape as the real one plus dryRun: true; an id in it is not saved. It does not use the Idempotency-Key.

Create a trigger › Headers

Lelemon-Subaccount
​string · pattern: ^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-Key
​string · minLength: 1 · maxLength: 255

Makes 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.

Create a trigger › Request Body

CreateTrigger
contactEvent
​string · minLength: 1 · maxLength: 100 · required

Your own name for the fact, as you send it in POST /v2/contact-events.

channel
​string · enum

whatsapp sends the template. email sends the text in email and opens a case the agent continues.

Enum values:
whatsapp
email
Default: whatsapp
templateId
​string

The template to send. A whatsapp trigger needs either templateId or onEvent. Without templateId it sends no message and only acts on the case, so variables, onReply, instructions, cooldownDays and cadence do not apply.

​object

Required for email.

​object

Template (or email placeholder) variable to a path in the event: data.x or contact.name, contact.phone, contact.email, contact.externalRef. Any other text is used as is. Required when the trigger has a template or an email; leave it out when it has neither.

​TriggerOnReplyInput
instructions
​string · maxLength: 4000

Context the agent gets if they answer. An event can replace it with onReply.instructions.

cooldownDays
​integer · min: 1 · max: 3650

Don't send twice to the same contact within this many days.

​object

What happens to the contact case the moment the event arrives, without waiting for a reply. Send exactly one of openCase or moveCase. WhatsApp triggers only. With no templateId it is the whole trigger: the case is opened or moved and no message goes out.

​object

Repeat the template up to attempts times, every intervalHours, until the contact replies, opts out, or the case changes stage or closes. WhatsApp triggers only. cooldownDays applies to the first attempt only.

Create a trigger › Responses

dryRun=true: the trigger as it would be saved.

What a dryRun answer adds to the normal one: nothing was saved, sent or charged, and an id in it is not saved.
object
​string · enum · required
Enum values:
trigger
id
​string · required
contactEvent
​string · required
channel
​string · enum · required
Enum values:
whatsapp
email
templateId
​string | null · required
​required
​object · required
​required
instructions
​string | null · required
cooldownDays
​integer | null · required
​required
​required
status
​string · enum · required
Enum values:
active
paused
createdAt
​string · date-time · required
updatedAt
​string · date-time · required
dryRun
​boolean · const

Present and true when the request had dryRun=true.

Const value:
POST/v2/triggers
curl https://api.lelemon.cl/v2/triggers \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "contactEvent": "customer.inactive_30_days", "channel": "whatsapp", "templateId": "tpl_02y0e5MANqacVbmtn1YyeJ", "variables": { "name": "contact.name", "coupon": "data.coupon" }, "instructions": "The customer got a 10% coupon. Help them place an order.", "cooldownDays": 30, "cadence": { "attempts": 3, "intervalHours": 24, "window": { "from": "09:00", "to": "19:00", "timezone": "America/Santiago" }, "stopOn": [ "reply", "opt_out" ] } }'
Example Request Body
{ "contactEvent": "customer.inactive_30_days", "channel": "whatsapp", "templateId": "tpl_02y0e5MANqacVbmtn1YyeJ", "variables": { "name": "contact.name", "coupon": "data.coupon" }, "instructions": "The customer got a 10% coupon. Help them place an order.", "cooldownDays": 30, "cadence": { "attempts": 3, "intervalHours": 24, "window": { "from": "09:00", "to": "19:00", "timezone": "America/Santiago" }, "stopOn": [ "reply", "opt_out" ] } }
json
application/json
Example Responses
{ "object": "trigger", "id": "trg_1Qa0x8bVw1TqS9mYp3RkLd", "contactEvent": "contactEvent", "channel": "whatsapp", "templateId": "templateId", "email": { "subject": "We miss you, {{name}}", "text": "Hi {{name}}, here is a coupon: {{coupon}}.", "from": "support@mail.acme.com" }, "variables": { "key": "string" }, "onReply": { "agentId": "agentId", "stageId": "stageId" }, "instructions": "instructions", "cooldownDays": 0, "onEvent": { "openCase": { "pipelineId": "ppl_3PqA0x8bVw1TqS9mYp3RkL", "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" }, "moveCase": { "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" } }, "cadence": { "attempts": 0, "intervalHours": 0, "window": { "from": "10:00", "to": "21:00", "timezone": "America/Santiago" }, "stopOn": [ "reply" ] }, "status": "active", "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z", "dryRun": true }
json
application/json

Retrieve a trigger

GET
https://api.lelemon.cl
/v2/triggers/{id}
Bearer (API key)

Returns one trigger by id. Use it to refresh a single record you already know; to find records, use the list route. It includes its cadence. 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: triggers:read.

Retrieve a trigger › path Parameters

id
​string · pattern: ^trg_[0-9A-Za-z]{22}… · required

The id of the trigger (trg_…).

Retrieve a trigger › Headers

Lelemon-Subaccount
​string · pattern: ^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 trigger › Responses

Trigger
object
​string · enum · required
Enum values:
trigger
id
​string · required
contactEvent
​string · required
channel
​string · enum · required
Enum values:
whatsapp
email
templateId
​string | null · required
​required
​object · required
​required
instructions
​string | null · required
cooldownDays
​integer | null · required
​required
​required
status
​string · enum · required
Enum values:
active
paused
createdAt
​string · date-time · required
updatedAt
​string · date-time · required
GET/v2/triggers/{id}
curl https://api.lelemon.cl/v2/triggers/:id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "object": "trigger", "id": "trg_1Qa0x8bVw1TqS9mYp3RkLd", "contactEvent": "contactEvent", "channel": "whatsapp", "templateId": "templateId", "email": { "subject": "We miss you, {{name}}", "text": "Hi {{name}}, here is a coupon: {{coupon}}.", "from": "support@mail.acme.com" }, "variables": { "key": "string" }, "onReply": { "agentId": "agentId", "stageId": "stageId" }, "instructions": "instructions", "cooldownDays": 0, "onEvent": { "openCase": { "pipelineId": "ppl_3PqA0x8bVw1TqS9mYp3RkL", "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" }, "moveCase": { "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" } }, "cadence": { "attempts": 0, "intervalHours": 0, "window": { "from": "10:00", "to": "21:00", "timezone": "America/Santiago" }, "stopOn": [ "reply" ] }, "status": "active", "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Delete a trigger

DELETE
https://api.lelemon.cl
/v2/triggers/{id}
Bearer (API key)

Deletes a trigger. Events that arrive afterwards no longer start it. To stop it for a while and keep it, disable it with the update route instead. The effect is permanent through the API. Repeating the call returns 404 not_found, because the trigger no longer exists, so do not retry a 404 as a failure.

Required scope: triggers:write.

Delete a trigger › path Parameters

id
​string · pattern: ^trg_[0-9A-Za-z]{22}… · required

The id of the trigger (trg_…).

Delete a trigger › Headers

Lelemon-Subaccount
​string · pattern: ^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 trigger › Responses

No data returned
DELETE/v2/triggers/{id}
curl https://api.lelemon.cl/v2/triggers/:id \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
No example specified for this content type

Update a trigger

PATCH
https://api.lelemon.cl
/v2/triggers/{id}
Bearer (API key)

Change any field. status paused stops it without deleting it, and it also ends the cadences already running. Send onEvent or cadence as null to remove them. A change to cadence applies to new events only: cadences already running keep the settings they started with. Use dryRun=true to run the same checks and get the trigger as it would be saved, without saving it.

Required scope: triggers:write.

Update a trigger › path Parameters

id
​string · pattern: ^trg_[0-9A-Za-z]{22}… · required

The id of the trigger (trg_…).

Update a trigger › query Parameters

dryRun
​boolean

When true, the request goes through the same validation as the real one and is answered with what would happen (always 200), and nothing is saved, sent or charged. The answer has the same shape as the real one plus dryRun: true; an id in it is not saved. It does not use the Idempotency-Key.

Update a trigger › Headers

Lelemon-Subaccount
​string · pattern: ^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 trigger › Request Body optional

UpdateTrigger
contactEvent
​string · minLength: 1 · maxLength: 100
templateId
​string
​object

Email triggers only.

​object
​
instructions
​string | null · maxLength: 4000
cooldownDays
​integer | null · min: 1 · max: 3650
​
​
status
​string · enum
Enum values:
active
paused

Update a trigger › Responses

What a dryRun answer adds to the normal one: nothing was saved, sent or charged, and an id in it is not saved.
object
​string · enum · required
Enum values:
trigger
id
​string · required
contactEvent
​string · required
channel
​string · enum · required
Enum values:
whatsapp
email
templateId
​string | null · required
​required
​object · required
​required
instructions
​string | null · required
cooldownDays
​integer | null · required
​required
​required
status
​string · enum · required
Enum values:
active
paused
createdAt
​string · date-time · required
updatedAt
​string · date-time · required
dryRun
​boolean · const

Present and true when the request had dryRun=true.

Const value:
PATCH/v2/triggers/{id}
curl https://api.lelemon.cl/v2/triggers/:id \ --request PATCH \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "status": "paused", "cooldownDays": 15, "cadence": null }'
Example Request Body
{ "status": "paused", "cooldownDays": 15, "cadence": null }
json
application/json
Example Responses
{ "object": "trigger", "id": "trg_1Qa0x8bVw1TqS9mYp3RkLd", "contactEvent": "contactEvent", "channel": "whatsapp", "templateId": "templateId", "email": { "subject": "We miss you, {{name}}", "text": "Hi {{name}}, here is a coupon: {{coupon}}.", "from": "support@mail.acme.com" }, "variables": { "key": "string" }, "onReply": { "agentId": "agentId", "stageId": "stageId" }, "instructions": "instructions", "cooldownDays": 0, "onEvent": { "openCase": { "pipelineId": "ppl_3PqA0x8bVw1TqS9mYp3RkL", "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" }, "moveCase": { "stageId": "stg_3PqA0x8bVw1TqS9mYp3RkL" } }, "cadence": { "attempts": 0, "intervalHours": 0, "window": { "from": "10:00", "to": "21:00", "timezone": "America/Santiago" }, "stopOn": [ "reply" ] }, "status": "active", "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z", "dryRun": true }
json
application/json

List the runs of a trigger

GET
https://api.lelemon.cl
/v2/triggers/{id}/runs
Bearer (API key)

Lists the cadence runs of the trigger, newest first: the contact, how many attempts went out, when the next one goes and why it stopped. A trigger without cadence has none. Read only. 404 not_found when the trigger does not exist or belongs to another organization. It is safe to repeat.

Required scope: triggers:read.

List the runs of a trigger › path Parameters

id
​string · pattern: ^trg_[0-9A-Za-z]{22}… · required

The id of the trigger (trg_…).

List the runs of a trigger › query Parameters

limit
​integer · min: 1 · max: 100
Default: 20
cursor
​string · maxLength: 512

The nextCursor of the previous page, with the same filters.

List the runs of a trigger › Headers

Lelemon-Subaccount
​string · pattern: ^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 runs of a trigger › Responses

CadenceRunList
object
​string · enum · required
Enum values:
list
hasMore
​boolean · required
nextCursor
​string | null · required
​CadenceRun[] · required
GET/v2/triggers/{id}/runs
curl https://api.lelemon.cl/v2/triggers/:id/runs \ --header 'Authorization: Bearer <token>'
Example Responses
{ "object": "list", "hasMore": true, "nextCursor": "nextCursor", "data": [ { "object": "cadence_run", "id": "cdr_4Zq0x8bVw1TqS9mYp3RkLd", "contact": { "id": "ctc_4Zq0x8bVw1TqS9mYp3RkLd", "name": "Ana Pérez" }, "status": "active", "stopReason": "reply", "attemptsMade": 1, "maxAttempts": 3, "intervalHours": 24, "nextAt": "2024-08-25T15:00:00Z", "startedAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" } ] }
json
application/json

WhatsApp messagesOpt-outs