Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent’s reply straight back in the response.
POST
/
chat-agent
/
trigger
curl --request POST \ --url https://api-v2.subverseai.com/api/chat-agent/trigger \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "communicationChannel": "Support WhatsApp", "customerNumber": "+919876543210", "agentName": "payment_reminder", "metadata": { "name": "John Doe", "amountDue": "₹1,200" }, "whatsappOptions": { "messageType": "prompt", "additionalContext": "Remind the customer that their payment is due tomorrow." }}'
Start a conversation with a customer on WhatsApp, Web Chat or Email using one of your agents. You can let the agent write the message, send your own text, use an approved WhatsApp template, or schedule the message for later.You can also use this API to get the agent’s reply straight back in the response, without messaging any customer. This is handy for testing an agent or building your own chat experience.
Endpoint
POST https://api-v2.subverseai.com/api/chat-agent/trigger
Authentication
Every request needs your workspace API key in the x-api-key header.
x-api-key: your_workspace_api_key
You can create an API key from your dashboard. See API Keys for details.
Choose how you want to use it
Message a customer
Send a message through one of your WhatsApp, Web Chat or Email channels. The customer receives it and can reply, and your agent carries on the conversation.
Get the agent's reply
Set doReturnResponse to true. The agent’s reply comes back in the response and nothing is sent to a customer.
Message a customer
Before you start
Set up a WhatsApp, Web Chat or Email channel under Integrations in your dashboard, and make sure it is enabled.
Assign an agent to the channel, or pass agentName in your request.
Basic fields
Field
Required
Description
communicationChannel
Yes
The name of your channel, exactly as it appears under Integrations in your dashboard.
customerNumber
WhatsApp & Web Chat
WhatsApp: the customer’s phone number with country code, e.g. +919876543210. Web Chat: the user’s ID on your website or app.
customerEmail
Email
The customer’s email address.
agentName
No
The agent that should handle the conversation. Defaults to the agent assigned to the channel.
agentVersion
No
default (published version), draft (latest saved draft) or a version number such as 2.
A list of links to files (images, PDFs, documents) to send with the message. Links must be publicly accessible.
WhatsApp
Use whatsappOptions.messageType to choose how the first message is created.
Agent writes it (prompt)
Your exact text (say)
Approved template (template)
The agent writes the opening message itself, using its instructions, the customer’s metadata and any additionalContext you provide. This is the default.
{ "communicationChannel": "Support WhatsApp", "customerNumber": "+919876543210", "agentName": "payment_reminder", "metadata": { "name": "John Doe", "amountDue": "₹1,200" }, "whatsappOptions": { "messageType": "prompt", "additionalContext": "Remind the customer that their payment is due tomorrow." }}
Sends your text exactly as written. If the customer replies, your agent takes over the conversation.
{ "communicationChannel": "Support WhatsApp", "customerNumber": "+919876543210", "whatsappOptions": { "messageType": "say", "message": "Hi John, your order ORD-1042 has been shipped!" }}
Sends one of your approved WhatsApp templates. Use this when messaging a customer who hasn’t chatted with you in the last 24 hours, since WhatsApp only allows templates in that case.
Extra instructions or background for the agent when writing the message.
message
say
Required for say. The exact text to send.
templateId
template
Required for template. The name of your approved WhatsApp template.
templateLanguage
template
The template’s language code, e.g. en or hi. Defaults to en.
templateVariables
template
Values for the template’s placeholders.
Sending from a specific number: if your WhatsApp channel has more than one number, pass agentNumber to choose which one to send from. It must be one of the channel’s numbers. If you leave it out, one of them is picked for you.
Web Chat
The agent writes the opening message and sends it to the user in your web chat. Pass the user’s ID as customerNumber. To give the agent extra instructions, use whatsappOptions.additionalContext.
{ "communicationChannel": "Website Chat", "customerNumber": "user_8812", "metadata": { "name": "John Doe", "plan": "Pro" }, "whatsappOptions": { "additionalContext": "Welcome the user and ask if they need help upgrading their plan." }}
Email
Use emailOptions.messageType to choose who writes the email.
Agent writes it (prompt)
Your exact text (say)
{ "communicationChannel": "Support Email", "customerEmail": "[email protected]", "metadata": { "name": "John Doe" }, "emailOptions": { "messageType": "prompt", "subject": "Following up on your request", "additionalContext": "Follow up on the refund request the customer raised last week." }}
{ "communicationChannel": "Support Email", "customerEmail": "[email protected]", "emailOptions": { "messageType": "say", "subject": "Your order has shipped", "body": "Hi John, your order ORD-1042 is on its way!", "cc": "[email protected]" }}
emailOptions field
Used with
Description
messageType
All
prompt (default) or say.
additionalContext
prompt
Extra instructions or background for the agent when writing the email.
body
say
Required for say. The exact email content to send.
subject
All
Email subject line.
cc
All
Email addresses to CC, separated by commas.
bcc
All
Email addresses to BCC, separated by commas.
replyTo
All
The sessionId of an earlier email conversation. The email is sent as a reply in that same thread, and anyone already in CC/BCC stays included. Leave it out to start a new thread.
Schedule a message
Instead of sending right away, you can send at a set time, only during working hours, or both. Scheduling works with every channel and message type.
Field
Description
scheduleTime
Date and time to send, in ISO format, e.g. 2026-10-05T09:30:00Z. If the time has already passed, the message is sent right away.
startWorkingHour
Earliest time of day to send, in 24-hour HH:MM format. Messages due earlier wait until this time.
endWorkingHour
Latest time of day to send, in 24-hour HH:MM format. Messages due later are sent the next day at startWorkingHour (or at midnight if startWorkingHour isn’t set).
timezone
Timezone for your working hours, e.g. Asia/Kolkata. Defaults to UTC.
{ "communicationChannel": "Support WhatsApp", "customerNumber": "+919876543210", "whatsappOptions": { "messageType": "say", "message": "Hi John, just checking in on your recent order." }, "scheduleTime": "2026-10-05T04:00:00Z", "startWorkingHour": "09:00", "endWorkingHour": "20:00", "timezone": "Asia/Kolkata"}
Changed your mind? Use Cancel Scheduled Messages with the sessionId you got back to stop a message that hasn’t been sent yet.
Get the agent’s reply
Set doReturnResponse to true to send a message to your agent and receive its reply in the response. No message is sent to a customer, so you don’t need a channel.
Field
Required
Description
doReturnResponse
Yes
Set to true.
agentName
Yes
The agent that should reply.
agentVersion
No
default, draft or a version number.
message
No
The customer’s message for the agent to reply to.
sessionId
No
The sessionId from a previous response, to continue the same conversation. Leave it out to start a new one.
customerNumber / customerEmail
No
Identifies the customer in your session history.
metadata
No
Customer details used to personalise the reply.
attachments
No
Links to files for the agent to look at, such as an image or a PDF.
chatOptions.additionalContext
No
Extra instructions or background for the agent, for this reply only.
{ "agentName": "support_bot", "doReturnResponse": true, "message": "Where is my order?", "customerEmail": "[email protected]", "metadata": { "orderId": "ORD-1042" }}
To keep chatting, send the next message with the same sessionId:
{ "agentName": "support_bot", "doReturnResponse": true, "sessionId": "b7e2d4f1-1c3a-4b5d-8e6f-0a9b8c7d6e5f", "message": "Can I change the delivery address?"}
doReturnResponse can’t be combined with scheduleTime, startWorkingHour or endWorkingHour.
Personalise with metadata
Anything you put in metadata can be used in your agent’s prompts as ${variable_name}. For example, with this metadata:
You get back the sessionId and a transcript with your message and everything the agent did in reply.
{ "responseCode": 200, "message": "Trigger dispatched", "data": { "sessionId": "b7e2d4f1-1c3a-4b5d-8e6f-0a9b8c7d6e5f", "transcript": [ { "type": "message", "role": "user", "content": [{ "type": "text", "text": "Where is my order?" }], "senderId": "[email protected]", "timestamp": "2026-10-01T10:00:00.000Z" }, { "type": "message", "role": "assistant", "content": [{ "type": "text", "text": "Hi! Your order ORD-1042 has shipped and should arrive by Friday." }], "agentName": "support_bot", "timestamp": "2026-10-01T10:00:02.000Z" } ] }}
The transcript may also include tool usage and other entries. See Transcript Entry Types for the full list.
Links to images and files in the transcript expire after a limited time. Download or save them promptly.
Errors
Errors use the same format:
{ "responseCode": 400, "errorCode": "customerNumberRequired", "message": "customerNumber is required for chat channels", "data": null}
Status
errorCode
What it means
400
customerNumberRequired
customerNumber is missing for a WhatsApp or Web Chat channel.
400
customerEmailRequired
customerEmail is missing for an Email channel.
400
messageRequired
whatsappOptions.message is missing for a WhatsApp say message.
400
templateIdRequired
whatsappOptions.templateId is missing for a WhatsApp template message.
400
templateNotSupported
The WhatsApp channel doesn’t support templates.
400
emailBodyRequired
emailOptions.body is missing for an Email say message.
400
agentNumberNotInChannel
The agentNumber you passed isn’t one of the channel’s WhatsApp numbers.
400
noAgentPhoneNumbers
The WhatsApp channel has no phone numbers set up.
400
noAgentEmail
The Email channel has no email address set up.
400
unsupportedChannelType
The channel isn’t a WhatsApp, Web Chat or Email channel. To place calls, use Trigger Call.
400
agentNameRequired
agentName is missing when doReturnResponse is true.
400
incompatibleOptions
doReturnResponse was used together with scheduling options.
401
apiKeyMissing
The x-api-key header is missing.
401
apiKeyInvalid
The API key is not valid.
403
forbidden
The sessionId belongs to a different workspace.
404
channelNotFound
No enabled channel with that name was found in your workspace. Check the spelling and that the channel is turned on.
404
sessionNotFound
The sessionId you passed doesn’t exist.
404
replyToSessionNotFound
The emailOptions.replyTo conversation doesn’t exist.
422
validationError
A field has the wrong type, e.g. text where true/false is expected.
500
internalError
Something went wrong on our side. Please try again or contact support.
Code Examples
cURL
curl -X POST https://api-v2.subverseai.com/api/chat-agent/trigger \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "communicationChannel": "Support WhatsApp", "customerNumber": "+919876543210", "metadata": { "name": "John Doe" }, "whatsappOptions": { "messageType": "prompt", "additionalContext": "Remind the customer that their payment is due tomorrow." } }'
JavaScript
const response = await fetch( "https://api-v2.subverseai.com/api/chat-agent/trigger", { method: "POST", headers: { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ communicationChannel: "Support WhatsApp", customerNumber: "+919876543210", metadata: { name: "John Doe" }, whatsappOptions: { messageType: "prompt", additionalContext: "Remind the customer that their payment is due tomorrow.", }, }), });const result = await response.json();console.log(result.data.sessionId);
Python
import requestsresponse = requests.post( "https://api-v2.subverseai.com/api/chat-agent/trigger", headers={"x-api-key": "YOUR_API_KEY"}, json={ "communicationChannel": "Support WhatsApp", "customerNumber": "+919876543210", "metadata": {"name": "John Doe"}, "whatsappOptions": { "messageType": "prompt", "additionalContext": "Remind the customer that their payment is due tomorrow.", }, },)print(response.json()["data"]["sessionId"])
Node.js (axios)
const axios = require("axios");const { data } = await axios.post( "https://api-v2.subverseai.com/api/chat-agent/trigger", { communicationChannel: "Support WhatsApp", customerNumber: "+919876543210", metadata: { name: "John Doe" }, whatsappOptions: { messageType: "prompt", additionalContext: "Remind the customer that their payment is due tomorrow.", }, }, { headers: { "x-api-key": "YOUR_API_KEY" } });console.log(data.data.sessionId);
Authorizations
x-api-key
string
header
required
Authentication header containing API key from SubVerse dashboard.
Body
application/json
communicationChannel
string
Name of the WhatsApp, Web Chat or Email channel to send from, exactly as it appears under Integrations in your dashboard. Leave it out when using doReturnResponse.
Example:
"Support WhatsApp"
customerNumber
string
Who to message. For WhatsApp, the customer's phone number with country code (e.g. +919876543210). For Web Chat, the user's ID on your website or app. Required for WhatsApp and Web Chat channels.
customerEmail
string<email>
The customer's email address. Required for Email channels.
agentName
string
The agent that should handle the conversation. If left out, the agent assigned to the channel is used. Required when doReturnResponse is true.
agentVersion
string
Which version of the agent to use: default (the published version), draft (latest saved draft) or a version number such as 2. If left out, the channel's version (or the published version) is used.
agentNumber
string
WhatsApp only. The business number to send from. It must be one of the numbers on the selected channel. If left out, one of the channel's numbers is picked for you.
metadata
object
Details about the customer to personalise the conversation. Use them in your agent's prompts as ${variable_name} and they will be replaced with the real values.
Example:
{ "name": "John Doe", "orderId": "ORD-1042" }
whatsappOptions
object
Options for WhatsApp channels. For Web Chat channels, only additionalContext applies.
Show child attributes
emailOptions
object
Options for Email channels.
Show child attributes
attachments
string<uri>[]
Links to files (images, PDFs, documents, etc.) to send along with the message. Links must be publicly accessible.
scheduleTime
string<date-time>
Send the message at a future date and time (ISO format, e.g. 2026-10-05T09:30:00Z). If the time has already passed, the message is sent right away.
startWorkingHour
string
Earliest time of day to send, in 24-hour HH:MM format. Messages due before this time wait until it is reached.
Example:
"09:00"
endWorkingHour
string
Latest time of day to send, in 24-hour HH:MM format. Messages due later are sent the next day at startWorkingHour (or at midnight if startWorkingHour isn't set).
Example:
"20:00"
timezone
string
Timezone used for startWorkingHour and endWorkingHour, e.g. Asia/Kolkata or America/New_York. Defaults to UTC.
doReturnResponse
boolean
default:false
Set to true to get the agent's reply straight back in the API response instead of sending it to a customer. Useful for testing an agent or building your own chat experience. Cannot be combined with scheduling options.
message
string
Used with doReturnResponse. The customer's message for the agent to reply to.
sessionId
string
Used with doReturnResponse. The sessionId from an earlier response, to continue the same conversation. Leave it out to start a new one.
chatOptions
object
Used with doReturnResponse.
Show child attributes
Response
Chat triggered
responseCode
integer
required
Always returns 200 value, with error or success response details in message.
message
string
required
Success or error message with description.
data
any | null
Additional details if available.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SubVerse AI","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/subverse-611dde60/VgmLvpy56UXbyj_D/logo/light.svg?fit=max\u0026auto=format\u0026n=VgmLvpy56UXbyj_D\u0026q=85\u0026s=6a4e3a291c6e837d60596088edd95b6d","dark":"https://mintcdn.com/subverse-611dde60/VgmLvpy56UXbyj_D/logo/dark.svg?fit=max\u0026auto=format\u0026n=VgmLvpy56UXbyj_D\u0026q=85\u0026s=fc4c7c7220dbe714a302aeab46c9ce37"},"favicon":"https://mintcdn.com/subverse-611dde60/VgmLvpy56UXbyj_D/favicon.ico?fit=max\u0026auto=format\u0026n=VgmLvpy56UXbyj_D\u0026q=85\u0026s=0ae8478d35e786474d92b99442283652","navbar":{"links":[{"href":"https://www.subverseai.com/contact-us","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"http://dashboard.subverseai.com/"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/subverse-ai","website":"https://subverseai.com/","podcast":"https://subverseai.substack.com/"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"subverse-611dde60","hasAudioNarration":false,"actualSubdomain":"subverse-611dde60","customDomains":["docs.subverseai.com"],"gitSource":{"type":"github","owner":"subverseai","repo":"subverse-docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6af5e3086aaba2f8a1d5a4e4","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Integrations","count":33},{"language":"default","tag":"Orchestration","count":30},{"language":"default","tag":"Dashboard","count":15},{"language":"default","tag":"Communication","count":11},{"language":"default","tag":"Action Nodes","count":10},{"language":"default","tag":"Build Agents","count":9},{"language":"default","tag":"Platform","count":9},{"language":"default","tag":"Trigger Nodes","count":8},{"language":"default","tag":"API Reference","count":6},{"language":"default","tag":"Agentic Functions","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/chat/trigger","slug":"/api-reference/chat/trigger","pageMetadata":{"title":"Trigger Chat","openapi":"POST /chat-agent/trigger","description":"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent's reply straight back in the response.","href":"/api-reference/chat/trigger"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent’s reply straight back in the response.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Note,Tab,Table,Tabs,Tip,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Start a conversation with a customer on `,_jsx(_components.strong,{children:`WhatsApp`}),`, `,_jsx(_components.strong,{children:`Web Chat`}),` or `,_jsx(_components.strong,{children:`Email`}),` using one of your agents. You can let the agent write the message, send your own text, use an approved WhatsApp template, or schedule the message for later.`]}),`\n`,_jsxs(_components.p,{children:[`You can also use this API to `,_jsx(_components.strong,{children:`get the agent’s reply straight back`}),` in the response, without messaging any customer. This is handy for testing an agent or building your own chat experience.`]}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api-v2.subverseai.com/api/chat-agent/trigger`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Every request needs your workspace API key in the `,_jsx(_components.code,{children:`x-api-key`}),` header.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`x-api-key: your_workspace_api_key`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`You can create an API key from your dashboard. See `,_jsx(_components.a,{href:`/integrations/api-keys`,children:`API Keys`}),` for details.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`choose-how-you-want-to-use-it`,children:`Choose how you want to use it`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Message a customer`,icon:`paper-plane`,children:_jsx(_components.p,{children:`Send a message through one of your WhatsApp, Web Chat or Email channels. The customer receives it and can reply, and your agent carries on the conversation.`})}),_jsx(Card,{title:`Get the agent's reply`,icon:`reply`,children:_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`doReturnResponse`}),` to `,_jsx(_components.code,{children:`true`}),`. The agent’s reply comes back in the response and nothing is sent to a customer.`]})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`message-a-customer`,children:`Message a customer`}),`\n`,_jsx(Heading,{level:`3`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Set up a WhatsApp, Web Chat or Email channel under `,_jsx(_components.strong,{children:`Integrations`}),` in your dashboard, and make sure it is enabled.`]}),`\n`,_jsxs(_components.li,{children:[`Assign an agent to the channel, or pass `,_jsx(_components.code,{children:`agentName`}),` in your request.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`basic-fields`,children:`Basic fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`communicationChannel`})}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`The name of your channel, exactly as it appears under `,_jsx(_components.strong,{children:`Integrations`}),` in your dashboard.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`customerNumber`})}),_jsx(_components.td,{children:`WhatsApp \u0026 Web Chat`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`WhatsApp:`}),` the customer’s phone number with country code, e.g. `,_jsx(_components.code,{children:`+919876543210`}),`. `,_jsx(_components.strong,{children:`Web Chat:`}),` the user’s ID on your website or app.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`customerEmail`})}),_jsx(_components.td,{children:`Email`}),_jsx(_components.td,{children:`The customer’s email address.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`agentName`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`The agent that should handle the conversation. Defaults to the agent assigned to the channel.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`agentVersion`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`default`}),` (published version), `,_jsx(_components.code,{children:`draft`}),` (latest saved draft) or a version number such as `,_jsx(_components.code,{children:`2`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`metadata`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Customer details used to personalise the conversation. See `,_jsx(_components.a,{href:`#personalise-with-metadata`,children:`Personalise with metadata`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`attachments`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`A list of links to files (images, PDFs, documents) to send with the message. Links must be publicly accessible.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`whatsapp`,children:`WhatsApp`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`whatsappOptions.messageType`}),` to choose how the first message is created.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Agent writes it (prompt)`,id:`agent-writes-it-prompt`,children:[_jsxs(_components.p,{children:[`The agent writes the opening message itself, using its instructions, the customer’s `,_jsx(_components.code,{children:`metadata`}),` and any `,_jsx(_components.code,{children:`additionalContext`}),` you provide. This is the default.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Support WhatsApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+919876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"agentName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"payment_reminder\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amountDue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"₹1,200\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"whatsappOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"additionalContext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Remind the customer that their payment is due tomorrow.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Your exact text (say)`,id:`your-exact-text-say`,children:[_jsx(_components.p,{children:`Sends your text exactly as written. If the customer replies, your agent takes over the conversation.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Support WhatsApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+919876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"whatsappOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"say\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hi John, your order ORD-1042 has been shipped!\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Approved template (template)`,id:`approved-template-template`,children:[_jsx(_components.p,{children:`Sends one of your approved WhatsApp templates. Use this when messaging a customer who hasn’t chatted with you in the last 24 hours, since WhatsApp only allows templates in that case.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Support WhatsApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+919876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"whatsappOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"template\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"templateId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order_update\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"templateLanguage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"templateVariables\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-1042\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsxs(_components.th,{children:[_jsx(_components.code,{children:`whatsappOptions`}),` field`]}),_jsx(_components.th,{children:`Used with`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`messageType`})}),_jsx(_components.td,{children:`All`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`prompt`}),` (default), `,_jsx(_components.code,{children:`say`}),` or `,_jsx(_components.code,{children:`template`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`additionalContext`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`Extra instructions or background for the agent when writing the message.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`say`})}),_jsxs(_components.td,{children:[_jsxs(_components.strong,{children:[`Required for `,_jsx(_components.code,{children:`say`}),`.`]}),` The exact text to send.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`templateId`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`template`})}),_jsxs(_components.td,{children:[_jsxs(_components.strong,{children:[`Required for `,_jsx(_components.code,{children:`template`}),`.`]}),` The name of your approved WhatsApp template.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`templateLanguage`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`template`})}),_jsxs(_components.td,{children:[`The template’s language code, e.g. `,_jsx(_components.code,{children:`en`}),` or `,_jsx(_components.code,{children:`hi`}),`. Defaults to `,_jsx(_components.code,{children:`en`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`templateVariables`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`template`})}),_jsx(_components.td,{children:`Values for the template’s placeholders.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Sending from a specific number:`}),` if your WhatsApp channel has more than one number, pass `,_jsx(_components.code,{children:`agentNumber`}),` to choose which one to send from. It must be one of the channel’s numbers. If you leave it out, one of them is picked for you.`]}),`\n`,_jsx(Heading,{level:`3`,id:`web-chat`,children:`Web Chat`}),`\n`,_jsxs(_components.p,{children:[`The agent writes the opening message and sends it to the user in your web chat. Pass the user’s ID as `,_jsx(_components.code,{children:`customerNumber`}),`. To give the agent extra instructions, use `,_jsx(_components.code,{children:`whatsappOptions.additionalContext`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Website Chat\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user_8812\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"plan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Pro\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"whatsappOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"additionalContext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Welcome the user and ask if they need help upgrading their plan.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`email`,children:`Email`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`emailOptions.messageType`}),` to choose who writes the email.`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Agent writes it (prompt)`,id:`agent-writes-it-prompt-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Support Email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerEmail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emailOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subject\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Following up on your request\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"additionalContext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Follow up on the refund request the customer raised last week.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),_jsx(Tab,{title:`Your exact text (say)`,id:`your-exact-text-say-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Support Email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerEmail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emailOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"say\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subject\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Your order has shipped\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hi John, your order ORD-1042 is on its way!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[email protected]\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsxs(_components.th,{children:[_jsx(_components.code,{children:`emailOptions`}),` field`]}),_jsx(_components.th,{children:`Used with`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`messageType`})}),_jsx(_components.td,{children:`All`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`prompt`}),` (default) or `,_jsx(_components.code,{children:`say`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`additionalContext`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`Extra instructions or background for the agent when writing the email.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`body`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`say`})}),_jsxs(_components.td,{children:[_jsxs(_components.strong,{children:[`Required for `,_jsx(_components.code,{children:`say`}),`.`]}),` The exact email content to send.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subject`})}),_jsx(_components.td,{children:`All`}),_jsx(_components.td,{children:`Email subject line.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cc`})}),_jsx(_components.td,{children:`All`}),_jsx(_components.td,{children:`Email addresses to CC, separated by commas.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bcc`})}),_jsx(_components.td,{children:`All`}),_jsx(_components.td,{children:`Email addresses to BCC, separated by commas.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replyTo`})}),_jsx(_components.td,{children:`All`}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`sessionId`}),` of an earlier email conversation. The email is sent as a reply in that same thread, and anyone already in CC/BCC stays included. Leave it out to start a new thread.`]})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`schedule-a-message`,children:`Schedule a message`}),`\n`,_jsx(_components.p,{children:`Instead of sending right away, you can send at a set time, only during working hours, or both. Scheduling works with every channel and message type.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scheduleTime`})}),_jsxs(_components.td,{children:[`Date and time to send, in ISO format, e.g. `,_jsx(_components.code,{children:`2026-10-05T09:30:00Z`}),`. If the time has already passed, the message is sent right away.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`startWorkingHour`})}),_jsxs(_components.td,{children:[`Earliest time of day to send, in 24-hour `,_jsx(_components.code,{children:`HH:MM`}),` format. Messages due earlier wait until this time.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`endWorkingHour`})}),_jsxs(_components.td,{children:[`Latest time of day to send, in 24-hour `,_jsx(_components.code,{children:`HH:MM`}),` format. Messages due later are sent the next day at `,_jsx(_components.code,{children:`startWorkingHour`}),` (or at midnight if `,_jsx(_components.code,{children:`startWorkingHour`}),` isn’t set).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`timezone`})}),_jsxs(_components.td,{children:[`Timezone for your working hours, e.g. `,_jsx(_components.code,{children:`Asia/Kolkata`}),`. Defaults to `,_jsx(_components.code,{children:`UTC`}),`.`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Support WhatsApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+919876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"whatsappOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"say\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hi John, just checking in on your recent order.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"scheduleTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-05T04:00:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startWorkingHour\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"09:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"endWorkingHour\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"20:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timezone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Asia/Kolkata\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Changed your mind? Use `,_jsx(_components.a,{href:`/api-reference/chat/cancel`,children:`Cancel Scheduled Messages`}),` with the `,_jsx(_components.code,{children:`sessionId`}),` you got back to stop a message that hasn’t been sent yet.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`get-the-agent’s-reply`,children:`Get the agent’s reply`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`doReturnResponse`}),` to `,_jsx(_components.code,{children:`true`}),` to send a message to your agent and receive its reply in the response. No message is sent to a customer, so you don’t need a channel.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`doReturnResponse`})}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Set to `,_jsx(_components.code,{children:`true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`agentName`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The agent that should reply.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`agentVersion`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`default`}),`, `,_jsx(_components.code,{children:`draft`}),` or a version number.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`The customer’s message for the agent to reply to.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sessionId`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`sessionId`}),` from a previous response, to continue the same conversation. Leave it out to start a new one.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`customerNumber`}),` / `,_jsx(_components.code,{children:`customerEmail`})]}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Identifies the customer in your session history.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`metadata`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Customer details used to personalise the reply.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`attachments`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Links to files for the agent to look at, such as an image or a PDF.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`chatOptions.additionalContext`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Extra instructions or background for the agent, for this reply only.`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"agentName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"support_bot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"doReturnResponse\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Where is my order?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customerEmail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-1042\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`To keep chatting, send the next message with the same `,_jsx(_components.code,{children:`sessionId`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"agentName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"support_bot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"doReturnResponse\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"b7e2d4f1-1c3a-4b5d-8e6f-0a9b8c7d6e5f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Can I change the delivery address?\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`doReturnResponse`}),` can’t be combined with `,_jsx(_components.code,{children:`scheduleTime`}),`, `,_jsx(_components.code,{children:`startWorkingHour`}),` or `,_jsx(_components.code,{children:`endWorkingHour`}),`.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`personalise-with-metadata`,children:`Personalise with metadata`}),`\n`,_jsxs(_components.p,{children:[`Anything you put in `,_jsx(_components.code,{children:`metadata`}),` can be used in your agent’s prompts as `,_jsx(_components.code,{children:\"${variable_name}\"}),`. For example, with this metadata:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-1042\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`an agent prompt containing `,_jsx(_components.code,{children:\"Greet ${name} and confirm order ${orderId}\"}),` becomes `,_jsx(_components.code,{children:`Greet John Doe and confirm order ORD-1042`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`WhatsApp templates don’t use `,_jsx(_components.code,{children:`metadata`}),`. Fill template placeholders with `,_jsx(_components.code,{children:`whatsappOptions.templateVariables`}),` instead.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`message-sent-or-scheduled`,children:`Message sent or scheduled`}),`\n`,_jsxs(_components.p,{children:[`You get back a `,_jsx(_components.code,{children:`sessionId`}),` for the conversation. Keep it so you can `,_jsx(_components.a,{href:`/api-reference/session/fetch`,children:`look up the conversation`}),` later or `,_jsx(_components.a,{href:`/api-reference/chat/cancel`,children:`cancel`}),` a scheduled message.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"responseCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Trigger dispatched\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a3f1c9e2-7b4d-4e8a-9c21-5d6e7f8a9b0c\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`agent-reply-doreturnresponse`,children:[`Agent reply (`,_jsx(_components.code,{children:`doReturnResponse`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`You get back the `,_jsx(_components.code,{children:`sessionId`}),` and a `,_jsx(_components.code,{children:`transcript`}),` with your message and everything the agent did in reply.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"responseCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Trigger dispatched\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"b7e2d4f1-1c3a-4b5d-8e6f-0a9b8c7d6e5f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transcript\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Where is my order?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"senderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-01T10:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hi! Your order ORD-1042 has shipped and should arrive by Friday.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"agentName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"support_bot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-01T10:00:02.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The transcript may also include tool usage and other entries. See `,_jsx(_components.a,{href:`/api-reference/session/fetch#transcript-entry-types`,children:`Transcript Entry Types`}),` for the full list.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Links to images and files in the transcript expire after a limited time. Download or save them promptly.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsx(_components.p,{children:`Errors use the same format:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"responseCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customerNumberRequired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customerNumber is required for chat channels\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`errorCode`})}),_jsx(_components.th,{children:`What it means`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`customerNumberRequired`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`customerNumber`}),` is missing for a WhatsApp or Web Chat channel.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`customerEmailRequired`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`customerEmail`}),` is missing for an Email channel.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`messageRequired`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`whatsappOptions.message`}),` is missing for a WhatsApp `,_jsx(_components.code,{children:`say`}),` message.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`templateIdRequired`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`whatsappOptions.templateId`}),` is missing for a WhatsApp `,_jsx(_components.code,{children:`template`}),` message.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`templateNotSupported`})}),_jsx(_components.td,{children:`The WhatsApp channel doesn’t support templates.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`emailBodyRequired`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`emailOptions.body`}),` is missing for an Email `,_jsx(_components.code,{children:`say`}),` message.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`agentNumberNotInChannel`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`agentNumber`}),` you passed isn’t one of the channel’s WhatsApp numbers.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`noAgentPhoneNumbers`})}),_jsx(_components.td,{children:`The WhatsApp channel has no phone numbers set up.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`noAgentEmail`})}),_jsx(_components.td,{children:`The Email channel has no email address set up.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unsupportedChannelType`})}),_jsxs(_components.td,{children:[`The channel isn’t a WhatsApp, Web Chat or Email channel. To place calls, use `,_jsx(_components.a,{href:`/api-reference/direct-call/trigger`,children:`Trigger Call`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`agentNameRequired`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`agentName`}),` is missing when `,_jsx(_components.code,{children:`doReturnResponse`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`incompatibleOptions`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`doReturnResponse`}),` was used together with scheduling options.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`apiKeyMissing`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`x-api-key`}),` header is missing.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`apiKeyInvalid`})}),_jsx(_components.td,{children:`The API key is not valid.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`forbidden`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`sessionId`}),` belongs to a different workspace.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`channelNotFound`})}),_jsx(_components.td,{children:`No enabled channel with that name was found in your workspace. Check the spelling and that the channel is turned on.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`sessionNotFound`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`sessionId`}),` you passed doesn’t exist.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`replyToSessionNotFound`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`emailOptions.replyTo`}),` conversation doesn’t exist.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`validationError`})}),_jsxs(_components.td,{children:[`A field has the wrong type, e.g. text where `,_jsx(_components.code,{children:`true`}),`/`,_jsx(_components.code,{children:`false`}),` is expected.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`500`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`internalError`})}),_jsx(_components.td,{children:`Something went wrong on our side. Please try again or contact support.`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`code-examples`,children:`Code Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`curl`,children:`cURL`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api-v2.subverseai.com/api/chat-agent/trigger`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"communicationChannel\": \"Support WhatsApp\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customerNumber\": \"+919876543210\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": { \"name\": \"John Doe\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"whatsappOptions\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messageType\": \"prompt\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"additionalContext\": \"Remind the customer that their payment is due tomorrow.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`javascript`,children:`JavaScript`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api-v2.subverseai.com/api/chat-agent/trigger\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` communicationChannel:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Support WhatsApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerNumber:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"+919876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"John Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` whatsappOptions:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messageType:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` additionalContext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Remind the customer that their payment is due tomorrow.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sessionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`python`,children:`Python`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api-v2.subverseai.com/api/chat-agent/trigger\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"communicationChannel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Support WhatsApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customerNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+919876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"whatsappOptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messageType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"additionalContext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Remind the customer that their payment is due tomorrow.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.json()[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`node-js-axios`,children:`Node.js (axios)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` axios`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"axios\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` axios`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api-v2.subverseai.com/api/chat-agent/trigger\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` communicationChannel:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Support WhatsApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerNumber:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"+919876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"John Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` whatsappOptions:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messageType:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` additionalContext:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Remind the customer that their payment is due tomorrow.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sessionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Trigger Chat","openapi":"POST /chat-agent/trigger","description":"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent's reply straight back in the response.","href":"/api-reference/chat/trigger"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[]},{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Choose how you want to use it","slug":"choose-how-you-want-to-use-it","depth":2,"children":[]},{"title":"Message a customer","slug":"message-a-customer","depth":2,"children":[{"title":"Before you start","slug":"before-you-start","depth":3,"children":[]},{"title":"Basic fields","slug":"basic-fields","depth":3,"children":[]},{"title":"WhatsApp","slug":"whatsapp","depth":3,"children":[]},{"title":"Web Chat","slug":"web-chat","depth":3,"children":[]},{"title":"Email","slug":"email","depth":3,"children":[]}]},{"title":"Schedule a message","slug":"schedule-a-message","depth":2,"children":[]},{"title":"Get the agent’s reply","slug":"get-the-agent’s-reply","depth":2,"children":[]},{"title":"Personalise with metadata","slug":"personalise-with-metadata","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Message sent or scheduled","slug":"message-sent-or-scheduled","depth":3,"children":[]},{"title":"Agent reply (doReturnResponse)","slug":"agent-reply-doreturnresponse","depth":3,"children":[]}]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Code Examples","slug":"code-examples","depth":2,"children":[{"title":"cURL","slug":"curl","depth":3,"children":[]},{"title":"JavaScript","slug":"javascript","depth":3,"children":[]},{"title":"Python","slug":"python","depth":3,"children":[]},{"title":"Node.js (axios)","slug":"node-js-axios","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Trigger chat","description":"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent's reply straight back in the response.","operationId":"triggerChat","tags":["Chat"],"requestBody":"c0b19b9e-ac52-4763-8221-acbe5bf8b6dd","responses":{"200":"d58341c5-f16a-4be0-97bb-25efcb3bc1b1","400":"f22f81e3-ef1a-466a-9858-1aa7fa061a49","401":"f3734845-c8fc-4eb1-bda7-8e32738f81f5","404":"a54b9a40-e7a5-4e3b-91e9-d6b468be7beb","500":"24147533-509b-4e8d-9512-2a0fb2701de2"},"method":"post","type":"path","servers":["4789a73e-a798-477c-a422-a96b21fde062"],"security":["b1b31256-e266-44d4-9c6d-a95b44ef76bc"],"path":"/chat-agent/trigger","baseUrlOptions":["https://api-v2.subverseai.com/api"],"title":"Trigger chat","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"communicationChannel":{"type":"string","description":"Name of the WhatsApp, Web Chat or Email channel to send from, exactly as it appears under Integrations in your dashboard. Leave it out when using `doReturnResponse`.","example":"Support WhatsApp","uniqueKey":"communicationChannel","typeLabel":"string"},"customerNumber":{"type":"string","description":"Who to message. For WhatsApp, the customer's phone number with country code (e.g. `+919876543210`). For Web Chat, the user's ID on your website or app. Required for WhatsApp and Web Chat channels.","uniqueKey":"customerNumber","typeLabel":"string"},"customerEmail":{"type":"string","format":"email","description":"The customer's email address. Required for Email channels.","uniqueKey":"customerEmail","typeLabel":"string\u003cemail>"},"agentName":{"type":"string","description":"The agent that should handle the conversation. If left out, the agent assigned to the channel is used. Required when `doReturnResponse` is `true`.","uniqueKey":"agentName","typeLabel":"string"},"agentVersion":{"type":"string","description":"Which version of the agent to use: `default` (the published version), `draft` (latest saved draft) or a version number such as `2`. If left out, the channel's version (or the published version) is used.","uniqueKey":"agentVersion","typeLabel":"string"},"agentNumber":{"type":"string","description":"WhatsApp only. The business number to send from. It must be one of the numbers on the selected channel. If left out, one of the channel's numbers is picked for you.","uniqueKey":"agentNumber","typeLabel":"string"},"metadata":{"type":"object","additionalProperties":true,"description":"Details about the customer to personalise the conversation. Use them in your agent's prompts as `${variable_name}` and they will be replaced with the real values.","example":{"name":"John Doe","orderId":"ORD-1042"},"uniqueKey":"metadata","typeLabel":"object"},"whatsappOptions":{"type":"object","description":"Options for WhatsApp channels. For Web Chat channels, only `additionalContext` applies.","properties":{"messageType":{"type":"string","enum":["prompt","say","template"],"default":"prompt","description":"How the first message is created. `prompt`: the agent writes the message. `say`: send your exact text from `message`. `template`: send an approved WhatsApp template.","uniqueKey":"whatsappOptions.messageType","typeLabel":"enum\u003cstring>"},"additionalContext":{"type":"string","description":"With `prompt`: extra instructions or background the agent should use when writing the message, e.g. \"Remind the customer their payment is due tomorrow.\"","uniqueKey":"whatsappOptions.additionalContext","typeLabel":"string"},"message":{"type":"string","description":"With `say`: the exact text to send. Required for `say`.","uniqueKey":"whatsappOptions.message","typeLabel":"string"},"templateId":{"type":"string","description":"With `template`: the name of your approved WhatsApp template. Required for `template`.","uniqueKey":"whatsappOptions.templateId","typeLabel":"string"},"templateLanguage":{"type":"string","default":"en","description":"With `template`: the template's language code, e.g. `en` or `hi`.","uniqueKey":"whatsappOptions.templateLanguage","typeLabel":"string"},"templateVariables":{"type":"object","additionalProperties":true,"description":"With `template`: values to fill into the template's placeholders.","example":{"1":"John","2":"ORD-1042"},"uniqueKey":"whatsappOptions.templateVariables","typeLabel":"object"}},"uniqueKey":"whatsappOptions","typeLabel":"object"},"emailOptions":{"type":"object","description":"Options for Email channels.","properties":{"messageType":{"type":"string","enum":["prompt","say"],"default":"prompt","description":"`prompt`: the agent writes the email. `say`: send your exact text from `body`.","uniqueKey":"emailOptions.messageType","typeLabel":"enum\u003cstring>"},"additionalContext":{"type":"string","description":"With `prompt`: extra instructions or background the agent should use when writing the email.","uniqueKey":"emailOptions.additionalContext","typeLabel":"string"},"body":{"type":"string","description":"With `say`: the exact email content to send. Required for `say`.","uniqueKey":"emailOptions.body","typeLabel":"string"},"subject":{"type":"string","description":"Email subject line.","uniqueKey":"emailOptions.subject","typeLabel":"string"},"cc":{"type":"string","description":"Email addresses to CC, separated by commas.","uniqueKey":"emailOptions.cc","typeLabel":"string"},"bcc":{"type":"string","description":"Email addresses to BCC, separated by commas.","uniqueKey":"emailOptions.bcc","typeLabel":"string"},"replyTo":{"type":"string","description":"The `sessionId` of an earlier email conversation. The email is sent as a reply in that same thread, keeping anyone previously in CC/BCC. Leave it out to start a new email thread.","uniqueKey":"emailOptions.replyTo","typeLabel":"string"}},"uniqueKey":"emailOptions","typeLabel":"object"},"attachments":{"type":"array","items":{"type":"string","format":"uri","uniqueKey":"attachments.items.[INDEX]","typeLabel":"string\u003curi>"},"description":"Links to files (images, PDFs, documents, etc.) to send along with the message. Links must be publicly accessible.","uniqueKey":"attachments","typeLabel":"string\u003curi>[]"},"scheduleTime":{"type":"string","format":"date-time","description":"Send the message at a future date and time (ISO format, e.g. `2026-10-05T09:30:00Z`). If the time has already passed, the message is sent right away.","uniqueKey":"scheduleTime","typeLabel":"string\u003cdate-time>"},"startWorkingHour":{"type":"string","description":"Earliest time of day to send, in 24-hour `HH:MM` format. Messages due before this time wait until it is reached.","example":"09:00","uniqueKey":"startWorkingHour","typeLabel":"string"},"endWorkingHour":{"type":"string","description":"Latest time of day to send, in 24-hour `HH:MM` format. Messages due later are sent the next day at `startWorkingHour` (or at midnight if `startWorkingHour` isn't set).","example":"20:00","uniqueKey":"endWorkingHour","typeLabel":"string"},"timezone":{"type":"string","description":"Timezone used for `startWorkingHour` and `endWorkingHour`, e.g. `Asia/Kolkata` or `America/New_York`. Defaults to `UTC`.","uniqueKey":"timezone","typeLabel":"string"},"doReturnResponse":{"type":"boolean","default":false,"description":"Set to `true` to get the agent's reply straight back in the API response instead of sending it to a customer. Useful for testing an agent or building your own chat experience. Cannot be combined with scheduling options.","uniqueKey":"doReturnResponse","typeLabel":"boolean"},"message":{"type":"string","description":"Used with `doReturnResponse`. The customer's message for the agent to reply to.","uniqueKey":"message","typeLabel":"string"},"sessionId":{"type":"string","description":"Used with `doReturnResponse`. The `sessionId` from an earlier response, to continue the same conversation. Leave it out to start a new one.","uniqueKey":"sessionId","typeLabel":"string"},"chatOptions":{"type":"object","description":"Used with `doReturnResponse`.","properties":{"additionalContext":{"type":"string","description":"Extra instructions or background for the agent for this reply only.","uniqueKey":"chatOptions.additionalContext","typeLabel":"string"}},"uniqueKey":"chatOptions","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"WhatsAppPrompt":{"title":"WhatsAppPrompt","summary":"WhatsApp — agent writes the message","value":{"communicationChannel":"Support WhatsApp","customerNumber":"+919876543210","agentName":"payment_reminder","metadata":{"name":"John Doe","amountDue":"₹1,200"},"whatsappOptions":{"messageType":"prompt","additionalContext":"Remind the customer that their payment is due tomorrow."}}},"WhatsAppTemplate":{"title":"WhatsAppTemplate","summary":"WhatsApp — send an approved template","value":{"communicationChannel":"Support WhatsApp","customerNumber":"+919876543210","whatsappOptions":{"messageType":"template","templateId":"order_update","templateLanguage":"en","templateVariables":{"1":"John","2":"ORD-1042"}}}},"EmailSay":{"title":"EmailSay","summary":"Email — send your own text","value":{"communicationChannel":"Support Email","customerEmail":"[email protected]","emailOptions":{"messageType":"say","subject":"Your order has shipped","body":"Hi John, your order ORD-1042 is on its way!"}}},"Scheduled":{"title":"Scheduled","summary":"Scheduled within working hours","value":{"communicationChannel":"Support WhatsApp","customerNumber":"+919876543210","whatsappOptions":{"messageType":"say","message":"Hi John, just checking in on your recent order."},"scheduleTime":"2026-10-05T04:00:00Z","startWorkingHour":"09:00","endWorkingHour":"20:00","timezone":"Asia/Kolkata"}},"InstantReply":{"title":"InstantReply","summary":"Get the agent's reply in the response","value":{"agentName":"support_bot","doReturnResponse":true,"message":"Where is my order?","customerEmail":"[email protected]","metadata":{"orderId":"ORD-1042"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"d58341c5-f16a-4be0-97bb-25efcb3bc1b1":{"description":"Chat triggered","content":{"application/json":{"schema":{"type":"object","required":["responseCode","message"],"properties":{"responseCode":{"type":"integer","description":"Always returns 200 value, with error or success response details in message.","isRequired":true,"uniqueKey":"responseCode","typeLabel":"integer"},"message":{"type":"string","description":"Success or error message with description.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"data":{"oneOf":[{"description":"Additional details if available.","uniqueKey":"data.oneOf.0","typeLabel":"any"},{"description":"Additional details if available.","type":"null","uniqueKey":"data.oneOf.1","typeLabel":"null"}],"uniqueKey":"data","typeLabel":"any | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"200 sent":{"title":"200 sent","summary":"200 - Message sent or scheduled","value":{"responseCode":200,"message":"Trigger dispatched","data":{"sessionId":"a3f1c9e2-7b4d-4e8a-9c21-5d6e7f8a9b0c"}}},"200 instant-reply":{"title":"200 instant-reply","summary":"200 - Agent reply returned (doReturnResponse)","value":{"responseCode":200,"message":"Trigger dispatched","data":{"sessionId":"b7e2d4f1-1c3a-4b5d-8e6f-0a9b8c7d6e5f","transcript":[{"type":"message","role":"user","content":[{"type":"text","text":"Where is my order?"}],"senderId":"[email protected]","timestamp":"2026-10-01T10:00:00.000Z"},{"type":"message","role":"assistant","content":[{"type":"text","text":"Hi! Your order ORD-1042 has shipped and should arrive by Friday."}],"agentName":"support_bot","timestamp":"2026-10-01T10:00:02.000Z"}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"f22f81e3-ef1a-466a-9858-1aa7fa061a49":{"description":"Something in the request is missing or not allowed","content":{"application/json":{"schema":{"type":"object","required":["responseCode","message"],"properties":{"responseCode":{"type":"integer","description":"Always returns 200 value, with error or success response details in message.","isRequired":true,"uniqueKey":"responseCode","typeLabel":"integer"},"message":{"type":"string","description":"Success or error message with description.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"data":{"oneOf":[{"description":"Additional details if available.","uniqueKey":"data.oneOf.0","typeLabel":"any"},{"description":"Additional details if available.","type":"null","uniqueKey":"data.oneOf.1","typeLabel":"null"}],"uniqueKey":"data","typeLabel":"any | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"customerNumberRequired":{"title":"customerNumberRequired","summary":"400 - Customer number missing","value":{"responseCode":400,"errorCode":"customerNumberRequired","message":"customerNumber is required for chat channels","data":null}},"customerEmailRequired":{"title":"customerEmailRequired","summary":"400 - Customer email missing","value":{"responseCode":400,"errorCode":"customerEmailRequired","message":"customerEmail is required for Email channels","data":null}},"templateIdRequired":{"title":"templateIdRequired","summary":"400 - Template name missing","value":{"responseCode":400,"errorCode":"templateIdRequired","message":"whatsappOptions.templateId is required for template message type","data":null}},"incompatibleOptions":{"title":"incompatibleOptions","summary":"400 - Instant reply used with scheduling","value":{"responseCode":400,"errorCode":"incompatibleOptions","message":"doReturnResponse cannot be used with scheduleTime, startWorkingHour, or endWorkingHour","data":null}}},"exampleType":"examples"}},"exampleType":"examples"},"f3734845-c8fc-4eb1-bda7-8e32738f81f5":{"description":"API key missing or invalid","content":{"application/json":{"schema":{"type":"object","required":["responseCode","message"],"properties":{"responseCode":{"type":"integer","description":"Always returns 200 value, with error or success response details in message.","isRequired":true,"uniqueKey":"responseCode","typeLabel":"integer"},"message":{"type":"string","description":"Success or error message with description.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"data":{"oneOf":[{"description":"Additional details if available.","uniqueKey":"data.oneOf.0","typeLabel":"any"},{"description":"Additional details if available.","type":"null","uniqueKey":"data.oneOf.1","typeLabel":"null"}],"uniqueKey":"data","typeLabel":"any | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"apiKeyMissing":{"title":"apiKeyMissing","summary":"401 - API key missing","value":{"responseCode":401,"errorCode":"apiKeyMissing","message":"API key missing","data":null}},"apiKeyInvalid":{"title":"apiKeyInvalid","summary":"401 - Invalid API key","value":{"responseCode":401,"errorCode":"apiKeyInvalid","message":"Invalid API key","data":null}}},"exampleType":"examples"}},"exampleType":"examples"},"a54b9a40-e7a5-4e3b-91e9-d6b468be7beb":{"description":"Channel or conversation not found","content":{"application/json":{"schema":{"type":"object","required":["responseCode","message"],"properties":{"responseCode":{"type":"integer","description":"Always returns 200 value, with error or success response details in message.","isRequired":true,"uniqueKey":"responseCode","typeLabel":"integer"},"message":{"type":"string","description":"Success or error message with description.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"data":{"oneOf":[{"description":"Additional details if available.","uniqueKey":"data.oneOf.0","typeLabel":"any"},{"description":"Additional details if available.","type":"null","uniqueKey":"data.oneOf.1","typeLabel":"null"}],"uniqueKey":"data","typeLabel":"any | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"channelNotFound":{"title":"channelNotFound","summary":"404 - Channel not found","value":{"responseCode":404,"errorCode":"channelNotFound","message":"Channel 'Support WhatsApp' not found or disabled","data":null}},"sessionNotFound":{"title":"sessionNotFound","summary":"404 - Conversation not found","value":{"responseCode":404,"errorCode":"sessionNotFound","message":"Session not found","data":null}}},"exampleType":"examples"}},"exampleType":"examples"},"24147533-509b-4e8d-9512-2a0fb2701de2":{"description":"Something went wrong on our side","content":{"application/json":{"schema":{"type":"object","required":["responseCode","message"],"properties":{"responseCode":{"type":"integer","description":"Always returns 200 value, with error or success response details in message.","isRequired":true,"uniqueKey":"responseCode","typeLabel":"integer"},"message":{"type":"string","description":"Success or error message with description.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"data":{"oneOf":[{"description":"Additional details if available.","uniqueKey":"data.oneOf.0","typeLabel":"any"},{"description":"Additional details if available.","type":"null","uniqueKey":"data.oneOf.1","typeLabel":"null"}],"uniqueKey":"data","typeLabel":"any | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"internalError":{"title":"internalError","summary":"500 - Internal server error","value":{"responseCode":500,"errorCode":"internalError","message":"Internal server error","data":null}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"b1b31256-e266-44d4-9c6d-a95b44ef76bc":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Authentication header containing API key from SubVerse dashboard.","scopes":[]}}},"servers":{"4789a73e-a798-477c-a422-a96b21fde062":{"url":"https://api-v2.subverseai.com/api"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Authentication header containing API key from SubVerse dashboard.","scopes":[]},"schema":{"title":"x-api-key","type":"string","description":"Authentication header containing API key from SubVerse dashboard.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"subverse-611dde60","siteName":"SubVerse AI","title":"Trigger Chat - SubVerse AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-02T05:16:47.190Z","originalFileLocation":"api-reference/chat/trigger.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent\u0026#x27;s reply straight back in the response.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SubVerse AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Trigger Chat - SubVerse AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent\u0026#x27;s reply straight back in the response.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SubVerse AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.subverseai.com/api-reference/chat/trigger\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://subverse-611dde60.mintlify.site/_mintlify/api/og/v2?division=Chat\u0026amp;title=Trigger+Chat\u0026amp;description=Start+a+conversation+with+a+customer+over+WhatsApp%2C+Web+Chat+or+Email+using+your+chosen+agent+%E2%80%94+or+get+the+agent%27s+reply+straight+back+in+the+response.\u0026amp;theme=3bd39284bb7e8456a419edc6\u0026amp;signature=ccbd35338c5628028feea274dd438ecc4dcd8b792976e5519926ae583e365ce9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Trigger Chat - SubVerse AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent\u0026#x27;s reply straight back in the response.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://subverse-611dde60.mintlify.site/_mintlify/api/og/v2?division=Chat\u0026amp;title=Trigger+Chat\u0026amp;description=Start+a+conversation+with+a+customer+over+WhatsApp%2C+Web+Chat+or+Email+using+your+chosen+agent+%E2%80%94+or+get+the+agent%27s+reply+straight+back+in+the+response.\u0026amp;theme=3bd39284bb7e8456a419edc6\u0026amp;signature=ccbd35338c5628028feea274dd438ecc4dcd8b792976e5519926ae583e365ce9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/subverse-611dde60/u-JMxRMN04quoBJS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SubVerse AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.subverseai.com/api-reference/chat/trigger\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/chat/trigger.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.subverseai.com/#organization\",\"name\":\"SubVerse AI\",\"url\":\"https://docs.subverseai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/subverse-611dde60/VgmLvpy56UXbyj_D/logo/light.svg?fit=max\u0026auto=format\u0026n=VgmLvpy56UXbyj_D\u0026q=85\u0026s=6a4e3a291c6e837d60596088edd95b6d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.subverseai.com#website\",\"name\":\"SubVerse AI\",\"url\":\"https://docs.subverseai.com\",\"publisher\":{\"@id\":\"https://docs.subverseai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.subverseai.com/api-reference/chat/trigger#webpage\",\"url\":\"https://docs.subverseai.com/api-reference/chat/trigger\",\"name\":\"Trigger Chat\",\"description\":\"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent's reply straight back in the response.\",\"dateModified\":\"2026-10-02T05:16:47.190Z\",\"isPartOf\":{\"@id\":\"https://docs.subverseai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.subverseai.com/api-reference/chat/trigger#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.subverseai.com/api-reference/chat/trigger#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SubVerse AI\",\"item\":\"https://docs.subverseai.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trigger Chat\",\"item\":\"https://docs.subverseai.com/api-reference/chat/trigger\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.subverseai.com/api-reference/chat/trigger#apireference\",\"headline\":\"Trigger Chat\",\"name\":\"Trigger Chat\",\"description\":\"Start a conversation with a customer over WhatsApp, Web Chat or Email using your chosen agent — or get the agent's reply straight back in the response.\",\"url\":\"https://docs.subverseai.com/api-reference/chat/trigger\",\"mainEntityOfPage\":{\"@id\":\"https://docs.subverseai.com/api-reference/chat/trigger#webpage\"},\"dateModified\":\"2026-10-02T05:16:47.190Z\",\"publisher\":{\"@id\":\"https://docs.subverseai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.subverseai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SubVerse AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"SubVerse AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/chat/trigger.md","siteName":"SubVerse AI","nav":{"global":{"anchors":[]},"tabs":[{"tab":"Dashboard","pages":[{"title":"Dashboard","href":"/dashboard/overview"}]},{"tab":"Models","pages":[{"title":"Models","href":"/models/overview"}]},{"tab":"Orchestration","pages":[{"title":"Orchestration","href":"/orchestration/introduction"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]},{"tab":"API Reference","groups":[{"group":"Call","pages":[{"title":"Trigger Call","openapi":"POST /call/trigger","href":"/api-reference/direct-call/trigger"},{"title":"Cancel Call","openapi":"PUT /call/cancel/{callId}","description":"Cancels an outbound call that is still queued. Only calls whose call status is `call_in_queue` can be canceled. Removes the pending queued calls and updates call status to canceled.","href":"/api-reference/direct-call/cancel"}]},{"group":"Chat","pages":[{"title":"Trigger Chat","openapi":"POST /chat-agent/trigger","href":"/api-reference/chat/trigger"},{"title":"Cancel Scheduled Messages","openapi":"DELETE /chat-agent/cancel/{sessionId}","description":"Cancel messages scheduled with Trigger Chat that have not been sent yet.","href":"/api-reference/chat/cancel"}]},{"group":"Storage","pages":[{"title":"Generate Signed URL","openapi":"GET /call/signed-recording-url","href":"/api-reference/direct-call/signed-url"}]},{"group":"Session","pages":[{"title":"Get Session Details","openapi":"GET /session/fetch/{sessionId}","href":"/api-reference/session/fetch"}]}]}]},"basePath":"","title":"Trigger Chat - SubVerse AI","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js","Markdown-Dj-na-_-.js","dist-C5gjFYHe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","AssistantPageLink-DEBW87tT.js"]}