How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation’s owner.
An Official API (Cloud API) number can be connected to more than one
platform at the same time: D-API and a CRM, a chatbot, another API. To Meta,
each platform is a partner (an app). This page explains how they coexist
without getting in each other’s way.
Summary in three sentences. Both partners can be on the number at the same
time, but each conversation has a single owner who replies. The business
that owns the number decides who owns what, in Meta Business Suite. D-API
shows its role, receives a copy of the other partners’ conversations
(standby) and, when allowed, takes over a conversation at any time.
Why this exists
Without any rule, every connected partner receives every message and every
partner can reply. In practice that is a mess: two bots answering the same
customer, or one partner replying to a conversation the other was handling.Meta solved this with Conversation Routing: the business defines which
partner handles each kind of conversation, and Meta delivers the message only
to that partner.
When a second partner joins the account, Meta may create a routing
configuration automatically from the partners already there. If D-API (or
the other partner) stopped receiving messages, or started getting error
131070, right after a new connection, this is why. Check the configuration
in Meta Business Suite and D-API’s role.
Concepts
Term
What it is
Conversation
The exchange with one customer on one number. Routing applies per conversation, not to the whole number: the same number can have conversations with different owners.
Owner
The partner handling that conversation. It is the only one that receives the customer’s message as a regular message and the only one that can send service messages (free-form text within the 24h window).
Entry point
How the conversation started. It decides who becomes the owner. There are five: Service (default), Click to WhatsApp ad, Marketing template response, Utility template response and Call.
Primary
The partner configured for an entry point. It becomes the owner when the conversation starts through it.
Standby
The observer partner: receives a copy of everything happening in other partners’ conversations (customer messages, what the owner sent, and statuses), but does not reply.
Escalation
At most one partner per account. It can take over any conversation at any time, even when someone else owns it. This is what makes a fallback possible.
Idle conversation
No owner. Happens after 24h without a customer message or when the owner releases the conversation. The customer’s next message picks the owner again, by entry point.
Templates can always be sent, by any partner, owner or not. Sending a
template does not change the conversation’s owner. What can change it is
the customer’s reply: tapping a template button routes the conversation again
through the marketing/utility entry point.
1. Find out the number’s situation
One call shows whether there are other partners and what D-API’s role is:
exclusive: only D-API is on the account. Everything works as usual.
shared_without_routing: there is another partner and no routing. Both
receive every message and both can reply. Configure routing to avoid
duplicate replies.
routed: routing is active. What D-API does depends on roles and
isStandby.
string[]
Entry points where D-API is the primary: customer_service (service),
ctwa (Click to WhatsApp ad), marketing, utility, calls. Contains
escalation if D-API is the escalation partner. Empty when D-API is primary
for nothing.
boolean
true if the business granted D-API standby visibility (a copy of other
partners’ conversations).
boolean
true if D-API can take over any conversation. Shortcut for roles
containing escalation.
object[]
Partners (apps) connected to the account. isCurrentApp: true marks D-API.
number
How many partners besides D-API.
This route queries Meta live, and Meta rate-limits it. Use it on settings
screens or after a 131070 error. Do not call it before every send.
2. Configure routing in Meta Business Suite
The configuration belongs to the business that owns the number and only
exists in Meta’s interface. No partner (D-API included) can configure it via
API.
1
Accept the terms
Standby, escalation and owner changes require the business to accept the
Meta Business Agents and Platform Terms of Service. Without it, only
basic routing works.
2
Open conversation routing
In Meta Business Suite, open the WhatsApp account settings and look for
Conversation Routing. It can be configured for the whole account or
for a specific number (the number’s configuration wins).
3
Pick the primary for each entry point
For each of the five entry points, pick the partner that handles it. For
marketing and utility there is a “Route to sender” option: the
customer’s reply goes to the partner that sent the template.
4
Pick the escalation partner (optional)
At most one. It can take over any conversation.
5
Grant standby visibility (optional)
Off by default. Select the partners that should receive a copy of the
conversations they don’t own.
6
Save and check
Call GET /routing and confirm D-API’s
role is the expected one.
3. Use cases
D-API as fallback
Split by entry point
Bot and human
Back to D-API only
Scenario. The business uses another platform day to day and wants D-API
ready to take over if it fails, without interfering with it.Meta Business Suite configuration:
Item
Value
Primary for every entry point
Other partner
Escalation
D-API
Standby
D-API
GET /routing result:situation: "routed", roles: ["escalation"],
isStandby: true.Day to day:
The other partner receives and answers everything, as usual.
D-API receives a copy of everything through the webhook, with
is_standby: true: customer messages and what the other partner sent
(fromMe: true). The history in the dashboard is complete.
D-API flows, automations and AI agents do not run on these copies.
D-API can send templates whenever it wants.
When the other platform goes down, D-API takes the conversation in one
of two ways:
Implicit: send a regular message through D-API. Meta transfers the
conversation immediately, and the other partner is told it lost it.
After taking over, that customer’s next messages reach D-API as regular
messages (no is_standby), and flows and automations run again.To give the conversation back to the other partner, use
pass with targetRole: "customer_service", or
release to let the customer’s next message decide by
the configuration.
Because D-API is the escalation partner, any service message it sends
(via API, the dashboard, a scheduled flow) takes the conversation from
the other partner. If your integration must not take conversations, send
only templates while the other platform is up.
Scenario. D-API sends campaigns and notifications; the other partner
handles customer service.Configuration:
Entry point
Primary
Marketing template response
Route to sender
Utility template response
Route to sender
Service
Other partner
Click to WhatsApp ad
Other partner
Result: whoever replies to a D-API template talks to D-API (reply flows
work). Whoever comes from an ad or writes out of the blue goes to the other
partner’s service.If D-API should also follow the other partner’s service conversations, give
it standby visibility too.
Scenario. One partner does the first contact with a bot, and another one
(or D-API) answers when the customer asks for a human.Configuration: the bot is primary for Service; whoever handles
humans is the escalation partner.Operation: when the customer asks for a human, the bot does a pass
without targetRole (it goes straight to escalation). If the bot is D-API:
curl -X POST https://api.d-api.cloud/api/v1/connections/cloud-api/YOUR_CONNECTION/thread-control \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "pass", "to": "5551999999999", "metadata": "Customer asked for an agent" }'
The metadata text reaches the partner that receives the conversation.
Two ways:
Remove the other partner from the account. With fewer than two
partners, Meta deletes the routing on its own and everything reaches
D-API normally again. GET /routing then shows situation: "exclusive".
Keep both and make D-API primary for every entry point. The other
partner stays connected but no longer gets conversations (unless it also
has escalation or standby).
Either way, the business makes the change in Meta Business Suite.
4. Change a conversation’s owner
One route, three actions. Always for one conversation (one customer).
POST /api/v1/connections/cloud-api/{id}/thread-control
string
required
take, pass or release.
string
required
The customer’s phone number. Any formatting or a JID
(5551999999999@s.whatsapp.net) is accepted.
string
Only with pass. Which entry point receives it: customer_service, ctwa,
marketing, utility, escalation or ai_agent (Meta Business Agent, if
enabled on the account). Without it, pass goes to the escalation partner.
string
Free text, up to 2000 characters, delivered to the partner that receives the
conversation.
Take over (take)
D-API takes the conversation from whoever owns it. Only works if D-API is the
escalation partner.
pass is rejected if the conversation is idle, if D-API is not the owner, if
the chosen entry point has no primary, or if the target already owns it.
Release (release)
D-API, as the owner, makes the conversation idle. The customer’s next
message is routed again by the business’s configuration. Releasing an idle
conversation does not fail.
releasetriggers no webhook for anyone: there is no new owner until the
customer writes again.
Errors
HTTP
code
When
400
INVALID_INPUT
to without a phone number, targetRole outside pass, metadata over 2000 characters.
403
NOT_ESCALATION_PARTNER
take while D-API is not the escalation partner.
400
THREAD_CONTROL_NOT_ENABLED
The number has no routing or the business has not accepted the terms.
400
ACTION_NOT_ENABLED
The action or target is not enabled on the account (e.g. ai_agent without Meta Business Agent).
400
META_GRAPH_ERROR
Any other Meta refusal (e.g. pass while not the owner). data.metaCode has Meta’s code.
404
—
Connection not found.
Error example
{ "success": false, "error": "You are not permitted to take thread control for this phone number.", "code": "NOT_ESCALATION_PARTNER", "data": { "metaCode": 2494191, "fbtraceId": "AbCdEf123" }}
5. Webhooks
normalized mode
meta_passthrough mode
Copies of other partners’ conversations: is_standby
Copies arrive on the same events as always, with one extra field:
is_standby: true. Regular messages do not have the field.
What happened
Event
Fields that change
The customer wrote in another partner’s conversation
messages.received
fromMe: false, is_standby: true
The other partner sent the customer a message
messages.received
fromMe: true, is_standby: true
A message from the other partner was delivered, read or failed
message.delivered / message.read / message.failed
is_standby: true
Customer wrote in the other partner's conversation
Templates sent by the other partner arrive with type: "template" and the
text [Template name]: parameters in message. Interactive messages
arrive with type: "interactive" and their body text.
Do not reply to messages with is_standby: true. The conversation
belongs to another partner: the reply is rejected with 131070 or, if
D-API is the escalation partner, it takes the conversation from the
other partner.
Owner change: conversation.control_changed
Sent when a conversation changes owner involving D-API:
type: "control_passed": another partner handed the conversation to
D-API. D-API is now the owner (is_owner: true).
type: "control_taken": the escalation partner took the conversation from
D-API. D-API is no longer the owner (is_owner: false).
{ "event": "conversation.control_changed", "sessionId": "cloud-3f2a…", "data": { "type": "control_passed", "is_owner": true, "remote_jid": "5551999999999@s.whatsapp.net", "phone": "5551999999999", "previous_owner_role": "customer_service", "new_owner_role": "escalation", "metadata": "Customer asked for an agent", "conversation_summary": "Customer wants to change the size on order #12345.", "timestamp": 1761955320 }}
string
control_passed or control_taken.
boolean
true: D-API became the conversation’s owner. false: it no longer is.
string | null
Role of the previous owner (customer_service, ctwa, marketing,
utility, escalation, ai_agent).
string | null
Role of the new owner.
string | null
Text sent by whoever made the change.
string | null
Conversation summary generated by Meta, when it sends one (only on
control_passed).
In meta_passthrough mode D-API forwards Meta’s payload unchanged, as
with every other event:
Copies arrive on the standby field (change.field === "standby"), with
the content in value.standby.messages, value.standby.message_echoes
or value.standby.statuses.
Owner changes arrive on the messaging_handovers field (value.type =
control_passed or control_taken).
6. Sending in another partner’s conversation: error 131070
If D-API tries to send free-form text or media in a conversation it doesn’t own
(and it is not the escalation partner), Meta refuses. The send route responds:
{ "success": false, "error": "Failed to send message", "message": "Conversa controlada por outro app (Meta 131070). Este número usa Conversation Routing e outro parceiro é o dono desta conversa. Envie um template (permitido sempre), peça ao dono um pass, ou chame POST /api/v1/connections/cloud-api/{id}/thread-control com action=take se a D-API for o parceiro de escalonamento."}
The message text is in Portuguese. Match on 131070 in the text to detect
this case.
What to do:
Need to reach the customer now? Send a template.
Is D-API the escalation partner? Take over with take (or the send
itself takes over, with no error).
Otherwise, ask the owning partner to pass the conversation to D-API,
or change the configuration in Meta Business Suite.
An idle conversation (no owner) also refuses free-form text: the
customer’s next message decides the owner. To pull an idle conversation, send
a marketing or utility template: if the business set that entry point to
“Route to sender”, the customer’s reply brings the conversation to D-API.
FAQ
Is D-API always in standby?
No. D-API’s role is whatever the business configured in Meta Business
Suite, and it can differ per number. The business can change it at any
time: make D-API primary for one or every entry point, remove standby, or
remove the other partner (then routing disappears and everything is back
to normal). Use GET /routing to see
the current role.
Can both platforms be used at the same time?
Yes, on the same number and at the same time, but not in the same
conversation at the same time: each conversation has one owner. Both can
send templates freely.
How do I know if there is another partner on the number?
GET /routing: otherAppsCount greater than zero and the list in
subscribedApps.
Do D-API flows and automations run on standby copies?
No. Copies with is_standby: true go to the history and the webhook, but
do not trigger flows, automations or AI agents. They run again once D-API
owns the conversation.
Do the other partner's messages show up in the D-API dashboard?
Yes, when D-API has standby visibility: the customer’s messages and the
other partner’s replies are added to the conversation history.
Do I pay for the other partner's messages?
No. Messages sent by the other partner are not part of D-API billing. Meta
bills each template to whoever sent it.
What about the Datacrazy integration?
Standby copies are not forwarded to Datacrazy: its format cannot mark a
message as a copy, and its automation would reply to a conversation D-API
does not own.
How long does a conversation keep the same owner?
Until it is handed over, released or taken, or until 24h without a
customer message. After that it becomes idle, and the customer’s next
message picks the owner again by entry point.
Does connecting D-API to a number that already uses another partner change anything for it?
D-API does not register again a number that is already active on the
Official API with another partner, so it does not change the two-step
verification that partner set up. But Meta may create an automatic
routing configuration when the second partner joins. After connecting,
check the configuration in Meta Business Suite.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"D-API","colors":{"primary":"#00B7CD","light":"#2DD4E0","dark":"#0E8FA3"},"logo":{"light":"https://mintcdn.com/d-api/dcX-Hd4-QsKLE866/logo/dapi-horizontal.png?fit=max\u0026auto=format\u0026n=dcX-Hd4-QsKLE866\u0026q=85\u0026s=449901bb5b53e11232d03fd1fa54a4c3","dark":"https://mintcdn.com/d-api/dcX-Hd4-QsKLE866/logo/dapi-horizontal.png?fit=max\u0026auto=format\u0026n=dcX-Hd4-QsKLE866\u0026q=85\u0026s=449901bb5b53e11232d03fd1fa54a4c3"},"favicon":"https://mintcdn.com/d-api/dcX-Hd4-QsKLE866/favicon.png?fit=max\u0026auto=format\u0026n=dcX-Hd4-QsKLE866\u0026q=85\u0026s=a2b2d31d3ad7ea89d6d82db7f17b2b07","navbar":{"links":[{"href":"https://wa.me/5551920018823?text=Ol%C3%A1%2C%20preciso%20de%20ajuda%20com%20a%20documenta%C3%A7%C3%A3o%20da%20D-API","label":"Suporte"}],"primary":{"type":"button","label":"Painel","href":"https://app.d-api.cloud"}},"footer":{"links":[{"header":"D-API","items":[{"label":"Painel","href":"https://app.d-api.cloud"},{"label":"Suporte","href":"https://wa.me/5551920018823?text=Ol%C3%A1%2C%20preciso%20de%20ajuda%20com%20a%20documenta%C3%A7%C3%A3o%20da%20D-API"}]}]},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"pt-BR","default":true,"href":"whatsapp/introducao"},{"language":"en","footer":{"links":[{"header":"D-API","items":[{"label":"Dashboard","href":"https://app.d-api.cloud"},{"label":"Support","href":"https://wa.me/5551920018823?text=Hi%2C%20I%20need%20help%20with%20the%20D-API%20documentation"}]}]},"navbar":{"links":[{"href":"https://wa.me/5551920018823?text=Hi%2C%20I%20need%20help%20with%20the%20D-API%20documentation","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.d-api.cloud"}},"href":"en/whatsapp/introducao"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"d-api","hasAudioNarration":false,"actualSubdomain":"d-api","customDomains":["docs.d-api.cloud"],"gitSource":{"type":"github","owner":"joaoartur","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6af87e0a4fd4397144dfd711","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"pt-BR","tag":"API Reference","count":140},{"language":"en","tag":"API Reference","count":140},{"language":"pt-BR","tag":"Sessões","count":27},{"language":"en","tag":"Sessions","count":27},{"language":"pt-BR","tag":"Ligações","count":17},{"language":"pt-BR","tag":"WhatsApp","count":17},{"language":"en","tag":"Calls","count":17},{"language":"en","tag":"WhatsApp","count":17},{"language":"pt-BR","tag":"Grupos","count":15},{"language":"pt-BR","tag":"Conversas","count":15},{"language":"en","tag":"Groups","count":15},{"language":"en","tag":"Chats","count":15},{"language":"pt-BR","tag":"Webhooks","count":14},{"language":"en","tag":"Webhooks","count":14},{"language":"pt-BR","tag":"API Oficial (Cloud API)","count":11},{"language":"pt-BR","tag":"Mensagens","count":11},{"language":"en","tag":"Official API (Cloud API)","count":11},{"language":"en","tag":"Messages","count":11},{"language":"pt-BR","tag":"Catálogo","count":9},{"language":"en","tag":"Catalog","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/api-oficial/multiplos-parceiros","slug":"/en/api-oficial/multiplos-parceiros","pageMetadata":{"title":"Multiple partners on the same number","description":"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation's owner.","href":"/en/api-oficial/multiplos-parceiros"},"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: \"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation’s owner.\"\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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,Heading,Info,Note,ParamField,ResponseField,Step,Steps,Tab,Table,Tabs,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`An `,_jsx(_components.strong,{children:`Official API`}),` (Cloud API) number can be connected to `,_jsx(_components.strong,{children:`more than one\nplatform at the same time`}),`: D-API and a CRM, a chatbot, another API. To Meta,\neach platform is a `,_jsx(_components.strong,{children:`partner`}),` (an app). This page explains how they coexist\nwithout getting in each other’s way.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Summary in three sentences.`}),` Both partners can be on the number at the same\ntime, but `,_jsx(_components.strong,{children:`each conversation has a single owner`}),` who replies. `,_jsx(_components.strong,{children:`The business\nthat owns the number`}),` decides who owns what, in Meta Business Suite. D-API\nshows its role, receives a copy of the other partners’ conversations\n(standby) and, when allowed, `,_jsx(_components.strong,{children:`takes over a conversation at any time`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`why-this-exists`,children:`Why this exists`}),`\n`,_jsxs(_components.p,{children:[`Without any rule, every connected partner receives `,_jsx(_components.strong,{children:`every`}),` message and every\npartner can reply. In practice that is a mess: two bots answering the same\ncustomer, or one partner replying to a conversation the other was handling.`]}),`\n`,_jsxs(_components.p,{children:[`Meta solved this with `,_jsx(_components.strong,{children:`Conversation Routing`}),`: the business defines which\npartner handles each kind of conversation, and Meta delivers the message only\nto that partner.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`When a second partner joins the account, Meta `,_jsx(_components.strong,{children:`may create a routing\nconfiguration automatically`}),` from the partners already there. If D-API (or\nthe other partner) stopped receiving messages, or started getting error\n`,_jsx(_components.code,{children:`131070`}),`, right after a new connection, this is why. Check the configuration\nin Meta Business Suite and `,_jsx(_components.a,{href:`#1-find-out-the-number%E2%80%99s-situation`,children:`D-API’s role`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`concepts`,children:`Concepts`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Term`}),_jsx(_components.th,{children:`What it is`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Conversation`})}),_jsxs(_components.td,{children:[`The exchange with `,_jsx(_components.strong,{children:`one`}),` customer on one number. Routing applies per conversation, not to the whole number: the same number can have conversations with different owners.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Owner`})}),_jsxs(_components.td,{children:[`The partner handling that conversation. It is the `,_jsx(_components.strong,{children:`only`}),` one that receives the customer’s message as a regular message and the `,_jsx(_components.strong,{children:`only`}),` one that can send service messages (free-form text within the 24h window).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Entry point`})}),_jsxs(_components.td,{children:[`How the conversation started. It decides who becomes the owner. There are five: `,_jsx(_components.strong,{children:`Service`}),` (default), `,_jsx(_components.strong,{children:`Click to WhatsApp ad`}),`, `,_jsx(_components.strong,{children:`Marketing template response`}),`, `,_jsx(_components.strong,{children:`Utility template response`}),` and `,_jsx(_components.strong,{children:`Call`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Primary`})}),_jsx(_components.td,{children:`The partner configured for an entry point. It becomes the owner when the conversation starts through it.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Standby`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`observer`}),` partner: receives a `,_jsx(_components.strong,{children:`copy`}),` of everything happening in other partners’ conversations (customer messages, what the owner sent, and statuses), but `,_jsx(_components.strong,{children:`does not reply`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Escalation`})}),_jsxs(_components.td,{children:[`At most `,_jsx(_components.strong,{children:`one`}),` partner per account. It can `,_jsx(_components.strong,{children:`take over any conversation at any time`}),`, even when someone else owns it. This is what makes a fallback possible.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Idle conversation`})}),_jsxs(_components.td,{children:[`No owner. Happens after `,_jsx(_components.strong,{children:`24h without a customer message`}),` or when the owner releases the conversation. The customer’s next message picks the owner again, by entry point.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`what-each-partner-can-do`,children:`What each partner can do`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Conversation owner`}),_jsx(_components.th,{children:`Standby`}),_jsx(_components.th,{children:`Escalation (not the owner)`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Receives the customer’s message`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`A copy, flagged with `,_jsx(_components.code,{children:`is_standby`})]}),_jsx(_components.td,{children:`Only if also standby`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sends free-form text / media`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`No`}),` (error `,_jsx(_components.code,{children:`131070`}),`)`]}),_jsxs(_components.td,{children:[`Yes, and `,_jsx(_components.strong,{children:`becomes the owner`}),` by sending`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sends templates (marketing, utility, authentication)`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Yes`})}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Takes the conversation (`,_jsx(_components.code,{children:`take`}),`)`]}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Hands over (`,_jsx(_components.code,{children:`pass`}),`) or releases (`,_jsx(_components.code,{children:`release`}),`)`]}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`No (must take first)`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Templates can always be sent`}),`, by any partner, owner or not. Sending a\ntemplate does `,_jsx(_components.strong,{children:`not`}),` change the conversation’s owner. What can change it is\nthe customer’s reply: tapping a template button routes the conversation again\nthrough the marketing/utility entry point.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`1-find-out-the-number’s-situation`,children:`1. Find out the number’s situation`}),`\n`,_jsx(_components.p,{children:`One call shows whether there are other partners and what D-API’s role is:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.d-api.cloud/api/v1/connections/cloud-api/YOUR_CONNECTION/routing`}),_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:` \"Authorization: YOUR_API_KEY\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`YOUR_CONNECTION`}),` is the connection id or the session id (`,_jsx(_components.code,{children:`cloud-…`}),`).`]}),`\n`,_jsx(CodeBlock,{filename:`Response`,numberOfLines:`15`,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:`15`,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:` \"success\"`}),_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:` \"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:` \"situation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"routed\"`}),_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:` \"routingEnabled\"`}),_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:` \"roles\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"escalation\"`}),_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:` \"isStandby\"`}),_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:` \"isEscalation\"`}),_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:` \"subscribedApps\"`}),_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1234567890\"`}),_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:`\"D-API\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"isCurrentApp\"`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9876543210\"`}),_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:`\"Other CRM\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"isCurrentApp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"otherAppsCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\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(ResponseField,{name:`situation`,type:`string`,id:`param-situation`,children:[_jsx(_components.p,{children:`The summary. One of three values:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`exclusive`}),`: only D-API is on the account. Everything works as usual.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`shared_without_routing`}),`: there is another partner and `,_jsx(_components.strong,{children:`no routing`}),`. Both\nreceive every message and both can reply. Configure routing to avoid\nduplicate replies.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`routed`}),`: routing is active. What D-API does depends on `,_jsx(_components.code,{children:`roles`}),` and\n`,_jsx(_components.code,{children:`isStandby`}),`.`]}),`\n`]})]}),`\n`,_jsx(ResponseField,{name:`roles`,type:`string[]`,id:`param-roles`,children:_jsxs(_components.p,{children:[`Entry points where D-API is the primary: `,_jsx(_components.code,{children:`customer_service`}),` (service),\n`,_jsx(_components.code,{children:`ctwa`}),` (Click to WhatsApp ad), `,_jsx(_components.code,{children:`marketing`}),`, `,_jsx(_components.code,{children:`utility`}),`, `,_jsx(_components.code,{children:`calls`}),`. Contains\n`,_jsx(_components.code,{children:`escalation`}),` if D-API is the escalation partner. Empty when D-API is primary\nfor nothing.`]})}),`\n`,_jsx(ResponseField,{name:`isStandby`,type:`boolean`,id:`param-is-standby`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` if the business granted D-API standby visibility (a copy of other\npartners’ conversations).`]})}),`\n`,_jsx(ResponseField,{name:`isEscalation`,type:`boolean`,id:`param-is-escalation`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` if D-API can take over any conversation. Shortcut for `,_jsx(_components.code,{children:`roles`}),`\ncontaining `,_jsx(_components.code,{children:`escalation`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`subscribedApps`,type:`object[]`,id:`param-subscribed-apps`,children:_jsxs(_components.p,{children:[`Partners (apps) connected to the account. `,_jsx(_components.code,{children:`isCurrentApp: true`}),` marks D-API.`]})}),`\n`,_jsx(ResponseField,{name:`otherAppsCount`,type:`number`,id:`param-other-apps-count`,children:_jsx(_components.p,{children:`How many partners besides D-API.`})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This route queries Meta live, and Meta rate-limits it. Use it on settings\nscreens or after a `,_jsx(_components.code,{children:`131070`}),` error. `,_jsx(_components.strong,{children:`Do not call it before every send.`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`2-configure-routing-in-meta-business-suite`,children:`2. Configure routing in Meta Business Suite`}),`\n`,_jsxs(_components.p,{children:[`The configuration belongs to `,_jsx(_components.strong,{children:`the business that owns the number`}),` and only\nexists in Meta’s interface. No partner (D-API included) can configure it via\nAPI.`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Accept the terms`,children:_jsxs(_components.p,{children:[`Standby, escalation and owner changes require the business to accept the\n`,_jsx(_components.strong,{children:`Meta Business Agents and Platform Terms of Service`}),`. Without it, only\nbasic routing works.`]})}),_jsx(Step,{title:`Open conversation routing`,children:_jsxs(_components.p,{children:[`In `,_jsx(_components.strong,{children:`Meta Business Suite`}),`, open the WhatsApp account settings and look for\n`,_jsx(_components.strong,{children:`Conversation Routing`}),`. It can be configured for the whole account or\nfor a specific number (the number’s configuration wins).`]})}),_jsx(Step,{title:`Pick the primary for each entry point`,children:_jsxs(_components.p,{children:[`For each of the five entry points, pick the partner that handles it. For\nmarketing and utility there is a `,_jsx(_components.strong,{children:`“Route to sender”`}),` option: the\ncustomer’s reply goes to the partner that sent the template.`]})}),_jsx(Step,{title:`Pick the escalation partner (optional)`,children:_jsx(_components.p,{children:`At most one. It can take over any conversation.`})}),_jsx(Step,{title:`Grant standby visibility (optional)`,children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Off`}),` by default. Select the partners that should receive a copy of the\nconversations they don’t own.`]})}),_jsx(Step,{title:`Save and check`,children:_jsxs(_components.p,{children:[`Call `,_jsx(_components.a,{href:`#1-find-out-the-number%E2%80%99s-situation`,children:_jsx(_components.code,{children:`GET /routing`})}),` and confirm D-API’s\nrole is the expected one.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`3-use-cases`,children:`3. Use cases`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`D-API as fallback`,id:`d-api-as-fallback`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Scenario.`}),` The business uses another platform day to day and wants D-API\nready to take over if it fails, `,_jsx(_components.strong,{children:`without interfering`}),` with it.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Meta Business Suite configuration:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Item`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Primary for every entry point`}),_jsx(_components.td,{children:`Other partner`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Escalation`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`D-API`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Standby`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`D-API`})})]})]})]}),_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`GET /routing`}),` result:`]}),` `,_jsx(_components.code,{children:`situation: \"routed\"`}),`, `,_jsx(_components.code,{children:`roles: [\"escalation\"]`}),`,\n`,_jsx(_components.code,{children:`isStandby: true`}),`.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Day to day:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The other partner receives and answers everything, as usual.`}),`\n`,_jsxs(_components.li,{children:[`D-API receives a `,_jsx(_components.strong,{children:`copy`}),` of everything through the webhook, with\n`,_jsx(_components.code,{children:`is_standby: true`}),`: customer messages and what the other partner sent\n(`,_jsx(_components.code,{children:`fromMe: true`}),`). The history in the dashboard is complete.`]}),`\n`,_jsxs(_components.li,{children:[`D-API flows, automations and AI agents `,_jsx(_components.strong,{children:`do not run`}),` on these copies.`]}),`\n`,_jsxs(_components.li,{children:[`D-API can send `,_jsx(_components.strong,{children:`templates`}),` whenever it wants.`]}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When the other platform goes down`}),`, D-API takes the conversation in one\nof two ways:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Explicit:`}),` call `,_jsx(_components.a,{href:`#take-over-take`,children:_jsx(_components.code,{children:`take`})}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Implicit:`}),` send a regular message through D-API. Meta transfers the\nconversation immediately, and the other partner is told it lost it.`]}),`\n`]}),_jsxs(_components.p,{children:[`After taking over, that customer’s next messages reach D-API as regular\nmessages (no `,_jsx(_components.code,{children:`is_standby`}),`), and flows and automations run again.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`To give the conversation back`}),` to the other partner, use\n`,_jsx(_components.a,{href:`#hand-over-pass`,children:_jsx(_components.code,{children:`pass`})}),` with `,_jsx(_components.code,{children:`targetRole: \"customer_service\"`}),`, or\n`,_jsx(_components.a,{href:`#release-release`,children:_jsx(_components.code,{children:`release`})}),` to let the customer’s next message decide by\nthe configuration.`]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Because D-API is the escalation partner, `,_jsx(_components.strong,{children:`any`}),` service message it sends\n(via API, the dashboard, a scheduled flow) takes the conversation from\nthe other partner. If your integration must not take conversations, send\nonly templates while the other platform is up.`]})})]}),_jsxs(Tab,{title:`Split by entry point`,id:`split-by-entry-point`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Scenario.`}),` D-API sends campaigns and notifications; the other partner\nhandles customer service.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Configuration:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Entry point`}),_jsx(_components.th,{children:`Primary`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Marketing template response`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Route to sender`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Utility template response`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Route to sender`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Service`}),_jsx(_components.td,{children:`Other partner`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Click to WhatsApp ad`}),_jsx(_components.td,{children:`Other partner`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Result:`}),` whoever replies to a D-API template talks to D-API (reply flows\nwork). Whoever comes from an ad or writes out of the blue goes to the other\npartner’s service.`]}),_jsxs(_components.p,{children:[`If D-API should also follow the other partner’s service conversations, give\nit `,_jsx(_components.strong,{children:`standby`}),` visibility too.`]})]}),_jsxs(Tab,{title:`Bot and human`,id:`bot-and-human`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Scenario.`}),` One partner does the first contact with a bot, and another one\n(or D-API) answers when the customer asks for a human.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Configuration:`}),` the bot is primary for `,_jsx(_components.strong,{children:`Service`}),`; whoever handles\nhumans is the `,_jsx(_components.strong,{children:`escalation`}),` partner.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Operation:`}),` when the customer asks for a human, the bot does a `,_jsx(_components.code,{children:`pass`}),`\nwithout `,_jsx(_components.code,{children:`targetRole`}),` (it goes straight to escalation). If the bot is D-API:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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.d-api.cloud/api/v1/connections/cloud-api/YOUR_CONNECTION/thread-control`}),_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:` \"Authorization: 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:` '{ \"action\": \"pass\", \"to\": \"5551999999999\", \"metadata\": \"Customer asked for an agent\" }'`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`metadata`}),` text reaches the partner that receives the conversation.`]})]}),_jsxs(Tab,{title:`Back to D-API only`,id:`back-to-d-api-only`,children:[_jsx(_components.p,{children:`Two ways:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Remove the other partner from the account.`}),` With fewer than two\npartners, Meta `,_jsx(_components.strong,{children:`deletes the routing`}),` on its own and everything reaches\nD-API normally again. `,_jsx(_components.code,{children:`GET /routing`}),` then shows `,_jsx(_components.code,{children:`situation: \"exclusive\"`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep both and make D-API primary for every entry point.`}),` The other\npartner stays connected but no longer gets conversations (unless it also\nhas escalation or standby).`]}),`\n`]}),_jsx(_components.p,{children:`Either way, the business makes the change in Meta Business Suite.`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`4-change-a-conversation’s-owner`,children:`4. Change a conversation’s owner`}),`\n`,_jsxs(_components.p,{children:[`One route, three actions. Always for `,_jsx(_components.strong,{children:`one conversation`}),` (one customer).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/connections/cloud-api/{id}/thread-control`})]}),`\n`]})})}),`\n`,_jsx(ParamField,{body:`action`,type:`string`,required:true,id:`param-action`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`take`}),`, `,_jsx(_components.code,{children:`pass`}),` or `,_jsx(_components.code,{children:`release`}),`.`]})}),`\n`,_jsx(ParamField,{body:`to`,type:`string`,required:true,id:`param-to`,children:_jsxs(_components.p,{children:[`The customer’s phone number. Any formatting or a JID\n(`,_jsx(_components.code,{children:`5551999999999@s.whatsapp.net`}),`) is accepted.`]})}),`\n`,_jsx(ParamField,{body:`targetRole`,type:`string`,id:`param-target-role`,children:_jsxs(_components.p,{children:[`Only with `,_jsx(_components.code,{children:`pass`}),`. Which entry point receives it: `,_jsx(_components.code,{children:`customer_service`}),`, `,_jsx(_components.code,{children:`ctwa`}),`,\n`,_jsx(_components.code,{children:`marketing`}),`, `,_jsx(_components.code,{children:`utility`}),`, `,_jsx(_components.code,{children:`escalation`}),` or `,_jsx(_components.code,{children:`ai_agent`}),` (Meta Business Agent, if\nenabled on the account). Without it, `,_jsx(_components.code,{children:`pass`}),` goes to the escalation partner.`]})}),`\n`,_jsx(ParamField,{body:`metadata`,type:`string`,id:`param-metadata`,children:_jsx(_components.p,{children:`Free text, up to 2000 characters, delivered to the partner that receives the\nconversation.`})}),`\n`,_jsxs(Heading,{level:`3`,id:`take-over-take`,children:[`Take over (`,_jsx(_components.code,{children:`take`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`D-API takes the conversation from whoever owns it. `,_jsx(_components.strong,{children:`Only works if D-API is the\nescalation partner.`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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.d-api.cloud/api/v1/connections/cloud-api/YOUR_CONNECTION/thread-control`}),_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:` \"Authorization: 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:` '{ \"action\": \"take\", \"to\": \"5551999999999\" }'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:`Response`,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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"success\"`}),_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:`, `}),_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"take\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Meta notifies the partner that lost the conversation.`}),`\n`,_jsxs(Heading,{level:`3`,id:`hand-over-pass`,children:[`Hand over (`,_jsx(_components.code,{children:`pass`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`D-API, `,_jsx(_components.strong,{children:`as the owner`}),`, hands the conversation to another partner.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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.d-api.cloud/api/v1/connections/cloud-api/YOUR_CONNECTION/thread-control`}),_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:` \"Authorization: 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:` '{ \"action\": \"pass\", \"to\": \"5551999999999\", \"targetRole\": \"customer_service\" }'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`pass`}),` is rejected if the conversation is idle, if D-API is not the owner, if\nthe chosen entry point has no primary, or if the target already owns it.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`release-release`,children:[`Release (`,_jsx(_components.code,{children:`release`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`D-API, `,_jsx(_components.strong,{children:`as the owner`}),`, makes the conversation idle. The customer’s next\nmessage is routed again by the business’s configuration. Releasing an idle\nconversation does not fail.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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.d-api.cloud/api/v1/connections/cloud-api/YOUR_CONNECTION/thread-control`}),_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:` \"Authorization: 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:` '{ \"action\": \"release\", \"to\": \"5551999999999\" }'`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`release`}),` `,_jsx(_components.strong,{children:`triggers no webhook`}),` for anyone: there is no new owner until the\ncustomer writes again.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`INVALID_INPUT`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`to`}),` without a phone number, `,_jsx(_components.code,{children:`targetRole`}),` outside `,_jsx(_components.code,{children:`pass`}),`, `,_jsx(_components.code,{children:`metadata`}),` over 2000 characters.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NOT_ESCALATION_PARTNER`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`take`}),` while D-API is not the escalation partner.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`THREAD_CONTROL_NOT_ENABLED`})}),_jsx(_components.td,{children:`The number has no routing or the business has not accepted the terms.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ACTION_NOT_ENABLED`})}),_jsxs(_components.td,{children:[`The action or target is not enabled on the account (e.g. `,_jsx(_components.code,{children:`ai_agent`}),` without Meta Business Agent).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`META_GRAPH_ERROR`})}),_jsxs(_components.td,{children:[`Any other Meta refusal (e.g. `,_jsx(_components.code,{children:`pass`}),` while not the owner). `,_jsx(_components.code,{children:`data.metaCode`}),` has Meta’s code.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Connection not found.`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:`Error example`,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:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You are not permitted to take thread control for this phone number.\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NOT_ESCALATION_PARTNER\"`}),_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"metaCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2494191`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"fbtraceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AbCdEf123\"`}),_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:`2`,id:`5-webhooks`,children:`5. Webhooks`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`normalized mode`,id:`normalized-mode`,\"data-child-heading-ids\":`[\"copies-of-other-partners%E2%80%99-conversations%3A-is_standby\",\"owner-change%3A-conversation-control_changed\"]`,children:[_jsxs(Heading,{level:`3`,id:`copies-of-other-partners’-conversations-is_standby`,children:[`Copies of other partners’ conversations: `,_jsx(_components.code,{children:`is_standby`})]}),_jsxs(_components.p,{children:[`Copies arrive on the `,_jsx(_components.strong,{children:`same events`}),` as always, with one extra field:\n`,_jsx(_components.code,{children:`is_standby: true`}),`. Regular messages `,_jsx(_components.strong,{children:`do not have`}),` the field.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What happened`}),_jsx(_components.th,{children:`Event`}),_jsx(_components.th,{children:`Fields that change`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The customer wrote in another partner’s conversation`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`messages.received`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fromMe: false`}),`, `,_jsx(_components.code,{children:`is_standby: true`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The other partner sent the customer a message`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`messages.received`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fromMe: true`}),`, `,_jsx(_components.code,{children:`is_standby: true`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A message from the other partner was delivered, read or failed`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`message.delivered`}),` / `,_jsx(_components.code,{children:`message.read`}),` / `,_jsx(_components.code,{children:`message.failed`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`is_standby: true`})})]})]})]}),_jsx(CodeBlock,{filename:`Customer wrote in the other partner's conversation`,numberOfLines:`15`,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:`15`,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:` \"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"messages.received\"`}),_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:`\"cloud-3f2a…\"`}),_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wamid.HBgM…\"`}),_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:` \"from\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"jid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5551999999999@s.whatsapp.net\"`}),_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:`\"Maria\"`}),_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:` \"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"jid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5511955026302@s.whatsapp.net\"`}),_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:` \"fromMe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:`\"My order hasn't arrived yet\"`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1761955200`}),_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:` \"is_group\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:`\"text\"`}),_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:` \"is_standby\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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(CodeBlock,{filename:`The other partner sent a template`,numberOfLines:`15`,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:`15`,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:` \"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"messages.received\"`}),_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:`\"cloud-3f2a…\"`}),_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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wamid.HBgN…\"`}),_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:` \"from\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"jid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5511955026302@s.whatsapp.net\"`}),_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:` \"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"jid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5551999999999@s.whatsapp.net\"`}),_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:` \"fromMe\"`}),_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:`\"[Template order_shipped]: Maria, #12345\"`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1761955260`}),_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:` \"is_group\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:`\"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:` \"is_standby\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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.p,{children:[`Templates sent by the other partner arrive with `,_jsx(_components.code,{children:`type: \"template\"`}),` and the\ntext `,_jsx(_components.code,{children:`[Template name]: parameters`}),` in `,_jsx(_components.code,{children:`message`}),`. Interactive messages\narrive with `,_jsx(_components.code,{children:`type: \"interactive\"`}),` and their body text.`]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Do not reply to messages with `,_jsx(_components.code,{children:`is_standby: true`}),`.`]}),` The conversation\nbelongs to another partner: the reply is rejected with `,_jsx(_components.code,{children:`131070`}),` or, if\nD-API is the escalation partner, it `,_jsx(_components.strong,{children:`takes the conversation`}),` from the\nother partner.`]})}),_jsxs(Heading,{level:`3`,id:`owner-change-conversation-control_changed`,children:[`Owner change: `,_jsx(_components.code,{children:`conversation.control_changed`})]}),_jsxs(_components.p,{children:[`Sent when a conversation changes owner `,_jsx(_components.strong,{children:`involving D-API`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type: \"control_passed\"`}),`: another partner handed the conversation to\nD-API. `,_jsx(_components.strong,{children:`D-API is now the owner`}),` (`,_jsx(_components.code,{children:`is_owner: true`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type: \"control_taken\"`}),`: the escalation partner took the conversation from\nD-API. `,_jsx(_components.strong,{children:`D-API is no longer the owner`}),` (`,_jsx(_components.code,{children:`is_owner: false`}),`).`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`15`,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:`15`,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:` \"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"conversation.control_changed\"`}),_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:`\"cloud-3f2a…\"`}),_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"control_passed\"`}),_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:` \"is_owner\"`}),_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:` \"remote_jid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5551999999999@s.whatsapp.net\"`}),_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:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5551999999999\"`}),_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:` \"previous_owner_role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customer_service\"`}),_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:` \"new_owner_role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"escalation\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Customer asked for an agent\"`}),_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:` \"conversation_summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Customer wants to change the size on order #12345.\"`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1761955320`})]}),`\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(ResponseField,{name:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`control_passed`}),` or `,_jsx(_components.code,{children:`control_taken`}),`.`]})}),_jsx(ResponseField,{name:`is_owner`,type:`boolean`,id:`param-is-owner`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),`: D-API became the conversation’s owner. `,_jsx(_components.code,{children:`false`}),`: it no longer is.`]})}),_jsx(ResponseField,{name:`previous_owner_role`,type:`string | null`,id:`param-previous-owner-role`,children:_jsxs(_components.p,{children:[`Role of the previous owner (`,_jsx(_components.code,{children:`customer_service`}),`, `,_jsx(_components.code,{children:`ctwa`}),`, `,_jsx(_components.code,{children:`marketing`}),`,\n`,_jsx(_components.code,{children:`utility`}),`, `,_jsx(_components.code,{children:`escalation`}),`, `,_jsx(_components.code,{children:`ai_agent`}),`).`]})}),_jsx(ResponseField,{name:`new_owner_role`,type:`string | null`,id:`param-new-owner-role`,children:_jsx(_components.p,{children:`Role of the new owner.`})}),_jsx(ResponseField,{name:`metadata`,type:`string | null`,id:`param-metadata-1`,children:_jsx(_components.p,{children:`Text sent by whoever made the change.`})}),_jsx(ResponseField,{name:`conversation_summary`,type:`string | null`,id:`param-conversation-summary`,children:_jsxs(_components.p,{children:[`Conversation summary generated by Meta, when it sends one (only on\n`,_jsx(_components.code,{children:`control_passed`}),`).`]})})]}),_jsxs(Tab,{title:`meta_passthrough mode`,id:`meta_passthrough-mode`,children:[_jsxs(_components.p,{children:[`In `,_jsx(_components.code,{children:`meta_passthrough`}),` mode D-API forwards Meta’s payload `,_jsx(_components.strong,{children:`unchanged`}),`, as\nwith every other event:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Copies arrive on the `,_jsx(_components.code,{children:`standby`}),` field (`,_jsx(_components.code,{children:`change.field === \"standby\"`}),`), with\nthe content in `,_jsx(_components.code,{children:`value.standby.messages`}),`, `,_jsx(_components.code,{children:`value.standby.message_echoes`}),`\nor `,_jsx(_components.code,{children:`value.standby.statuses`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Owner changes arrive on the `,_jsx(_components.code,{children:`messaging_handovers`}),` field (`,_jsx(_components.code,{children:`value.type`}),` =\n`,_jsx(_components.code,{children:`control_passed`}),` or `,_jsx(_components.code,{children:`control_taken`}),`).`]}),`\n`]}),_jsxs(_components.p,{children:[`See the full format in Meta’s documentation:\n`,_jsx(_components.a,{href:`https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/standby/`,children:`standby`}),`\nand `,_jsx(_components.a,{href:`https://developers.facebook.com/documentation/business-messaging/whatsapp/conversation-routing/thread-control/`,children:`thread control`}),`.`]})]})]}),`\n`,_jsxs(Heading,{level:`2`,id:`6-sending-in-another-partner’s-conversation-error-131070`,children:[`6. Sending in another partner’s conversation: error `,_jsx(_components.code,{children:`131070`})]}),`\n`,_jsx(_components.p,{children:`If D-API tries to send free-form text or media in a conversation it doesn’t own\n(and it is not the escalation partner), Meta refuses. The send route responds:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,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:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Failed to send 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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Conversa controlada por outro app (Meta 131070). Este número usa Conversation Routing e outro parceiro é o dono desta conversa. Envie um template (permitido sempre), peça ao dono um pass, ou chame POST /api/v1/connections/cloud-api/{id}/thread-control com action=take se a D-API for o parceiro de escalonamento.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`message`}),` text is in Portuguese. Match on `,_jsx(_components.code,{children:`131070`}),` in the text to detect\nthis case.`]})}),`\n`,_jsx(_components.p,{children:`What to do:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Need to reach the customer now?`}),` Send a `,_jsx(_components.strong,{children:`template`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Is D-API the escalation partner?`}),` Take over with `,_jsx(_components.code,{children:`take`}),` (or the send\nitself takes over, with no error).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Otherwise`}),`, ask the owning partner to `,_jsx(_components.code,{children:`pass`}),` the conversation to D-API,\nor change the configuration in Meta Business Suite.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`An `,_jsx(_components.strong,{children:`idle`}),` conversation (no owner) also refuses free-form text: the\ncustomer’s next message decides the owner. To pull an idle conversation, send\na marketing or utility template: if the business set that entry point to\n“Route to sender”, the customer’s reply brings the conversation to D-API.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`faq`,children:`FAQ`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Is D-API always in standby?`,id:`is-d-api-always-in-standby`,children:_jsxs(_components.p,{children:[`No. D-API’s role is whatever the business configured in Meta Business\nSuite, and it can differ per number. The business can change it at any\ntime: make D-API primary for one or every entry point, remove standby, or\nremove the other partner (then routing disappears and everything is back\nto normal). Use `,_jsx(_components.a,{href:`#1-find-out-the-number%E2%80%99s-situation`,children:_jsx(_components.code,{children:`GET /routing`})}),` to see\nthe current role.`]})}),_jsx(Accordion,{title:`Can both platforms be used at the same time?`,id:`can-both-platforms-be-used-at-the-same-time`,children:_jsxs(_components.p,{children:[`Yes, on the same number and at the same time, but `,_jsx(_components.strong,{children:`not in the same\nconversation at the same time`}),`: each conversation has one owner. Both can\nsend templates freely.`]})}),_jsx(Accordion,{title:`How do I know if there is another partner on the number?`,id:`how-do-i-know-if-there-is-another-partner-on-the-number`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /routing`}),`: `,_jsx(_components.code,{children:`otherAppsCount`}),` greater than zero and the list in\n`,_jsx(_components.code,{children:`subscribedApps`}),`.`]})}),_jsx(Accordion,{title:`Do D-API flows and automations run on standby copies?`,id:`do-d-api-flows-and-automations-run-on-standby-copies`,children:_jsxs(_components.p,{children:[`No. Copies with `,_jsx(_components.code,{children:`is_standby: true`}),` go to the history and the webhook, but\ndo not trigger flows, automations or AI agents. They run again once D-API\nowns the conversation.`]})}),_jsx(Accordion,{title:`Do the other partner's messages show up in the D-API dashboard?`,id:`do-the-other-partners-messages-show-up-in-the-d-api-dashboard`,children:_jsx(_components.p,{children:`Yes, when D-API has standby visibility: the customer’s messages and the\nother partner’s replies are added to the conversation history.`})}),_jsx(Accordion,{title:`Do I pay for the other partner's messages?`,id:`do-i-pay-for-the-other-partners-messages`,children:_jsx(_components.p,{children:`No. Messages sent by the other partner are not part of D-API billing. Meta\nbills each template to whoever sent it.`})}),_jsx(Accordion,{title:`What about the Datacrazy integration?`,id:`what-about-the-datacrazy-integration`,children:_jsxs(_components.p,{children:[`Standby copies are `,_jsx(_components.strong,{children:`not`}),` forwarded to Datacrazy: its format cannot mark a\nmessage as a copy, and its automation would reply to a conversation D-API\ndoes not own.`]})}),_jsx(Accordion,{title:`How long does a conversation keep the same owner?`,id:`how-long-does-a-conversation-keep-the-same-owner`,children:_jsxs(_components.p,{children:[`Until it is handed over, released or taken, or until `,_jsx(_components.strong,{children:`24h without a\ncustomer message`}),`. After that it becomes idle, and the customer’s next\nmessage picks the owner again by entry point.`]})}),_jsx(Accordion,{title:`Does connecting D-API to a number that already uses another partner change anything for it?`,id:`does-connecting-d-api-to-a-number-that-already-uses-another-partner-change-anything-for-it`,children:_jsxs(_components.p,{children:[`D-API does not register again a number that is already active on the\nOfficial API with another partner, so it does not change the two-step\nverification that partner set up. But `,_jsx(_components.strong,{children:`Meta`}),` may create an automatic\nrouting configuration when the second partner joins. After connecting,\ncheck the configuration in Meta Business Suite.`]})})]})]})}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":"Multiple partners on the same number","description":"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation's owner.","href":"/en/api-oficial/multiplos-parceiros"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why this exists","slug":"why-this-exists","depth":2,"children":[]},{"title":"Concepts","slug":"concepts","depth":2,"children":[{"title":"What each partner can do","slug":"what-each-partner-can-do","depth":3,"children":[]}]},{"title":"1. Find out the number’s situation","slug":"1-find-out-the-number’s-situation","depth":2,"children":[]},{"title":"2. Configure routing in Meta Business Suite","slug":"2-configure-routing-in-meta-business-suite","depth":2,"children":[]},{"title":"3. Use cases","slug":"3-use-cases","depth":2,"children":[]},{"title":"4. Change a conversation’s owner","slug":"4-change-a-conversation’s-owner","depth":2,"children":[{"title":"Take over (take)","slug":"take-over-take","depth":3,"children":[]},{"title":"Hand over (pass)","slug":"hand-over-pass","depth":3,"children":[]},{"title":"Release (release)","slug":"release-release","depth":3,"children":[]},{"title":"Errors","slug":"errors","depth":3,"children":[]}]},{"title":"5. Webhooks","slug":"5-webhooks","depth":2,"children":[{"title":"Copies of other partners’ conversations: is_standby","slug":"copies-of-other-partners’-conversations-is_standby","depth":3,"children":[],"tabId":"normalized-mode"},{"title":"Owner change: conversation.control_changed","slug":"owner-change-conversation-control_changed","depth":3,"children":[],"tabId":"normalized-mode"}]},{"title":"6. Sending in another partner’s conversation: error 131070","slug":"6-sending-in-another-partner’s-conversation-error-131070","depth":2,"children":[]},{"title":"FAQ","slug":"faq","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"d-api","siteName":"D-API","title":"Multiple partners on the same number - D-API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/api-oficial/multiplos-parceiros","matchLevel":1},"en":{"href":"/en/api-oficial/multiplos-parceiros","matchLevel":0}}},"lastModified":"2026-11-12T12:25:48.198Z","originalFileLocation":"en/api-oficial/multiplos-parceiros.mdx","locale":"en"},"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=\"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation\u0026#x27;s owner.\">\u003cmeta data-mint-head name=\"application-name\" content=\"D-API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/d-api/36SbMupri6RA-H0W/_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/d-api/36SbMupri6RA-H0W/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/d-api/36SbMupri6RA-H0W/_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/d-api/36SbMupri6RA-H0W/_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/d-api/36SbMupri6RA-H0W/_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/d-api/36SbMupri6RA-H0W/_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/d-api/36SbMupri6RA-H0W/_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/d-api/36SbMupri6RA-H0W/_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/d-api/36SbMupri6RA-H0W/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Multiple partners on the same number - D-API\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation\u0026#x27;s owner.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"D-API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://d-api.mintlify.site/_mintlify/api/og/v2?division=Multiple+partners\u0026amp;title=Multiple+partners+on+the+same+number\u0026amp;description=How+to+use+D-API+alongside+another+platform+on+the+same+Official+API+number%3A+who+answers+each+conversation%2C+standby+mode%2C+fallback%2C+and+how+to+change+a+conversa\u0026amp;theme=6bf39124e553ea1529d3e32e\u0026amp;signature=4f0af42ab222f4ba49f3636f365f0671dc1d8e76d6a25d3e70f2a8855e885869\">\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=\"Multiple partners on the same number - D-API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation\u0026#x27;s owner.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://d-api.mintlify.site/_mintlify/api/og/v2?division=Multiple+partners\u0026amp;title=Multiple+partners+on+the+same+number\u0026amp;description=How+to+use+D-API+alongside+another+platform+on+the+same+Official+API+number%3A+who+answers+each+conversation%2C+standby+mode%2C+fallback%2C+and+how+to+change+a+conversa\u0026amp;theme=6bf39124e553ea1529d3e32e\u0026amp;signature=4f0af42ab222f4ba49f3636f365f0671dc1d8e76d6a25d3e70f2a8855e885869\">\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/d-api/36SbMupri6RA-H0W/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"D-API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00B7CD\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-oficial/multiplos-parceiros.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://docs.d-api.cloud/api-oficial/multiplos-parceiros\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.d-api.cloud/api-oficial/multiplos-parceiros\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.d-api.cloud/#organization\",\"name\":\"D-API\",\"url\":\"https://docs.d-api.cloud\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/d-api/dcX-Hd4-QsKLE866/logo/dapi-horizontal.png?fit=max\u0026auto=format\u0026n=dcX-Hd4-QsKLE866\u0026q=85\u0026s=449901bb5b53e11232d03fd1fa54a4c3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.d-api.cloud#website\",\"name\":\"D-API\",\"url\":\"https://docs.d-api.cloud\",\"publisher\":{\"@id\":\"https://docs.d-api.cloud/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros#webpage\",\"url\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros\",\"name\":\"Multiple partners on the same number\",\"description\":\"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation's owner.\",\"dateModified\":\"2026-11-12T12:25:48.198Z\",\"isPartOf\":{\"@id\":\"https://docs.d-api.cloud#website\"},\"breadcrumb\":{\"@id\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"D-API\",\"item\":\"https://docs.d-api.cloud\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multiple partners on the same number\",\"item\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros#article\",\"headline\":\"Multiple partners on the same number\",\"name\":\"Multiple partners on the same number\",\"description\":\"How to use D-API alongside another platform on the same Official API number: who answers each conversation, standby mode, fallback, and how to change a conversation's owner.\",\"url\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros\",\"mainEntityOfPage\":{\"@id\":\"https://docs.d-api.cloud/en/api-oficial/multiplos-parceiros#webpage\"},\"dateModified\":\"2026-11-12T12:25:48.198Z\",\"publisher\":{\"@id\":\"https://docs.d-api.cloud/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.d-api.cloud#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"D-API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"D-API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/api-oficial/multiplos-parceiros.md","siteName":"D-API","nav":{"global":null,"languages":[{"language":"pt-BR","default":true,"pages":[{"title":"pt-BR","href":"/api-oficial/multiplos-parceiros"}]},{"language":"en","footer":{"links":[{"header":"D-API","items":[{"label":"Dashboard","href":"https://app.d-api.cloud"},{"label":"Support","href":"https://wa.me/5551920018823?text=Hi%2C%20I%20need%20help%20with%20the%20D-API%20documentation"}]}]},"navbar":{"links":[{"href":"https://wa.me/5551920018823?text=Hi%2C%20I%20need%20help%20with%20the%20D-API%20documentation","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.d-api.cloud"}},"tabs":[{"tab":"WhatsApp","pages":[{"title":"WhatsApp","href":"/en/whatsapp/introducao"}]},{"tab":"Official API","groups":[{"group":"SaaS (provider)","pages":[{"title":"Official API for SaaS (provider)","description":"Offer WhatsApp Official API connections inside your own SaaS, using D-API as the provider.","href":"/en/api-oficial/saas"}]},{"group":"Multiple partners","pages":[{"title":"Multiple partners on the same number","href":"/en/api-oficial/multiplos-parceiros"}]}]},{"tab":"SMS","pages":[{"title":"SMS","href":"/en/sms/webhooks/visao-geral"}]},{"tab":"IVR","pages":[{"title":"IVR","href":"/en/ura/ligacoes/stream"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/en/api-reference/introduction"}]}]}]},"basePath":"","title":"Multiple partners on the same number - D-API","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":[],"chunks":[]}