late-sdk 0.0.875 → 0.0.876
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +118 -3
- data/docs/AddBusinessAgentAllowlistEntryRequest.md +18 -0
- data/docs/BusinessAgentAllowlistEntry.md +20 -0
- data/docs/BusinessAgentApi.md +3949 -0
- data/docs/BusinessAgentApiKeyConfig.md +22 -0
- data/docs/BusinessAgentApiKeyParamsInner.md +22 -0
- data/docs/BusinessAgentBudget.md +24 -0
- data/docs/BusinessAgentBusinessInformation.md +28 -0
- data/docs/BusinessAgentBusinessInformationContactInfo.md +22 -0
- data/docs/BusinessAgentConnector.md +40 -0
- data/docs/BusinessAgentConnectorAllOfConnectionStatus.md +20 -0
- data/docs/BusinessAgentConnectorInput.md +32 -0
- data/docs/BusinessAgentConnectorInputAuthConfig.md +20 -0
- data/docs/BusinessAgentConnectorInputUserAuthInjectionConfig.md +22 -0
- data/docs/BusinessAgentConnectorTool.md +30 -0
- data/docs/BusinessAgentConnectorToolInput.md +28 -0
- data/docs/BusinessAgentEventStatus.md +28 -0
- data/docs/BusinessAgentFaq.md +26 -0
- data/docs/BusinessAgentFaqInput.md +22 -0
- data/docs/BusinessAgentKnowledgeFile.md +20 -0
- data/docs/BusinessAgentOAuthClientCredentials.md +26 -0
- data/docs/BusinessAgentSettings.md +30 -0
- data/docs/BusinessAgentSettingsFollowup.md +22 -0
- data/docs/BusinessAgentSettingsHandoff.md +22 -0
- data/docs/BusinessAgentSettingsRollout.md +18 -0
- data/docs/BusinessAgentSkill.md +30 -0
- data/docs/BusinessAgentSkillInput.md +22 -0
- data/docs/BusinessAgentStatus.md +32 -0
- data/docs/BusinessAgentStatusManualStepsInner.md +22 -0
- data/docs/BusinessAgentStatusUnverifiedStepsInner.md +22 -0
- data/docs/BusinessAgentTestMessageResponse.md +32 -0
- data/docs/BusinessAgentUiSkill.md +32 -0
- data/docs/BusinessAgentUiSkillInput.md +26 -0
- data/docs/BusinessAgentWebsite.md +40 -0
- data/docs/BusinessAgentWebsiteInput.md +28 -0
- data/docs/ConnectApi.md +1 -68
- data/docs/ConnectWhatsAppEmbeddedSignupRequest.md +4 -4
- data/docs/GetBusinessAgentBudget200Response.md +18 -0
- data/docs/GetBusinessAgentConnectorLogs200Response.md +20 -0
- data/docs/InlineObject.md +2 -2
- data/docs/InlineObject1.md +1 -1
- data/docs/InlineObject2.md +1 -5
- data/docs/InlineObject3.md +5 -11
- data/docs/InlineObject4.md +28 -0
- data/docs/{InlineObject3Details.md → InlineObject4Details.md} +2 -2
- data/docs/ListBusinessAgentAllowlist200Response.md +18 -0
- data/docs/ListBusinessAgentConnectorTools200Response.md +18 -0
- data/docs/ListBusinessAgentConnectors200Response.md +18 -0
- data/docs/ListBusinessAgentFaqs200Response.md +18 -0
- data/docs/ListBusinessAgentFiles200Response.md +18 -0
- data/docs/ListBusinessAgentSettings200Response.md +18 -0
- data/docs/ListBusinessAgentSkills200Response.md +18 -0
- data/docs/ListBusinessAgentUiSkills200Response.md +20 -0
- data/docs/ListBusinessAgentWebsites200Response.md +18 -0
- data/docs/MessagesApi.md +1 -1
- data/docs/OnboardBusinessAgent201Response.md +18 -0
- data/docs/RunBusinessAgentConnectorTool200Response.md +20 -0
- data/docs/RunBusinessAgentConnectorToolRequest.md +18 -0
- data/docs/SendBusinessAgentEvent202Response.md +20 -0
- data/docs/SendBusinessAgentEventRequest.md +24 -0
- data/docs/SendBusinessAgentTestMessageRequest.md +20 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequest.md +51 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf.md +20 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf1.md +20 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf2.md +24 -0
- data/docs/StartBusinessAgentEvalRun202Response.md +20 -0
- data/docs/StartBusinessAgentEvalRunRequest.md +18 -0
- data/docs/UpdateBusinessAgentSettingsRequest.md +26 -0
- data/docs/UpdateBusinessAgentSettingsRequestFollowup.md +22 -0
- data/docs/UpdateBusinessAgentSettingsRequestHandoff.md +22 -0
- data/docs/UpdateBusinessAgentSettingsRequestRollout.md +18 -0
- data/docs/UploadBusinessAgentFileRequest.md +20 -0
- data/lib/zernio-sdk/api/business_agent_api.rb +3934 -0
- data/lib/zernio-sdk/api/connect_api.rb +2 -59
- data/lib/zernio-sdk/api/messages_api.rb +2 -2
- data/lib/zernio-sdk/models/add_business_agent_allowlist_entry_request.rb +164 -0
- data/lib/zernio-sdk/models/business_agent_allowlist_entry.rb +174 -0
- data/lib/zernio-sdk/models/business_agent_api_key_config.rb +172 -0
- data/lib/zernio-sdk/models/business_agent_api_key_params_inner.rb +199 -0
- data/lib/zernio-sdk/models/business_agent_budget.rb +263 -0
- data/lib/zernio-sdk/models/business_agent_business_information.rb +193 -0
- data/lib/zernio-sdk/models/business_agent_business_information_contact_info.rb +165 -0
- data/lib/zernio-sdk/models/business_agent_connector.rb +352 -0
- data/lib/zernio-sdk/models/business_agent_connector_all_of_connection_status.rb +157 -0
- data/lib/zernio-sdk/models/business_agent_connector_input.rb +288 -0
- data/lib/zernio-sdk/models/business_agent_connector_input_auth_config.rb +156 -0
- data/lib/zernio-sdk/models/business_agent_connector_input_user_auth_injection_config.rb +199 -0
- data/lib/zernio-sdk/models/business_agent_connector_tool.rb +284 -0
- data/lib/zernio-sdk/models/business_agent_connector_tool_input.rb +251 -0
- data/lib/zernio-sdk/models/business_agent_event_status.rb +284 -0
- data/lib/zernio-sdk/models/business_agent_faq.rb +264 -0
- data/lib/zernio-sdk/models/business_agent_faq_input.rb +221 -0
- data/lib/zernio-sdk/models/business_agent_knowledge_file.rb +190 -0
- data/lib/zernio-sdk/models/business_agent_o_auth_client_credentials.rb +236 -0
- data/lib/zernio-sdk/models/business_agent_settings.rb +292 -0
- data/lib/zernio-sdk/models/business_agent_settings_followup.rb +199 -0
- data/lib/zernio-sdk/models/business_agent_settings_handoff.rb +200 -0
- data/lib/zernio-sdk/models/business_agent_settings_rollout.rb +165 -0
- data/lib/zernio-sdk/models/business_agent_skill.rb +339 -0
- data/lib/zernio-sdk/models/business_agent_skill_input.rb +243 -0
- data/lib/zernio-sdk/models/business_agent_status.rb +315 -0
- data/lib/zernio-sdk/models/business_agent_status_manual_steps_inner.rb +240 -0
- data/lib/zernio-sdk/models/business_agent_status_unverified_steps_inner.rb +240 -0
- data/lib/zernio-sdk/models/business_agent_test_message_response.rb +267 -0
- data/lib/zernio-sdk/models/business_agent_ui_skill.rb +315 -0
- data/lib/zernio-sdk/models/business_agent_ui_skill_input.rb +262 -0
- data/lib/zernio-sdk/models/business_agent_website.rb +302 -0
- data/lib/zernio-sdk/models/business_agent_website_input.rb +221 -0
- data/lib/zernio-sdk/models/connect_whats_app_embedded_signup_request.rb +3 -4
- data/lib/zernio-sdk/models/get_business_agent_budget200_response.rb +166 -0
- data/lib/zernio-sdk/models/get_business_agent_connector_logs200_response.rb +160 -0
- data/lib/zernio-sdk/models/inline_object.rb +24 -7
- data/lib/zernio-sdk/models/inline_object2.rb +4 -69
- data/lib/zernio-sdk/models/inline_object3.rb +18 -80
- data/lib/zernio-sdk/models/inline_object4.rb +274 -0
- data/lib/zernio-sdk/models/{inline_object3_details.rb → inline_object4_details.rb} +3 -3
- data/lib/zernio-sdk/models/list_business_agent_allowlist200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_connector_tools200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_connectors200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_faqs200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_files200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_settings200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_skills200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_ui_skills200_response.rb +177 -0
- data/lib/zernio-sdk/models/list_business_agent_websites200_response.rb +166 -0
- data/lib/zernio-sdk/models/onboard_business_agent201_response.rb +164 -0
- data/lib/zernio-sdk/models/run_business_agent_connector_tool200_response.rb +156 -0
- data/lib/zernio-sdk/models/run_business_agent_connector_tool_request.rb +165 -0
- data/lib/zernio-sdk/models/send_business_agent_event202_response.rb +173 -0
- data/lib/zernio-sdk/models/send_business_agent_event_request.rb +271 -0
- data/lib/zernio-sdk/models/send_business_agent_test_message_request.rb +182 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request.rb +105 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of.rb +214 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of1.rb +214 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of2.rb +252 -0
- data/lib/zernio-sdk/models/{get_whats_app_sdk_config200_response.rb → start_business_agent_eval_run202_response.rb} +34 -63
- data/lib/zernio-sdk/models/start_business_agent_eval_run_request.rb +184 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request.rb +220 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request_followup.rb +235 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request_handoff.rb +235 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request_rollout.rb +164 -0
- data/lib/zernio-sdk/models/upload_business_agent_file_request.rb +175 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +64 -2
- data/openapi.yaml +1718 -55
- data/spec/api/business_agent_api_spec.rb +736 -0
- data/spec/api/connect_api_spec.rb +1 -12
- data/spec/api/messages_api_spec.rb +1 -1
- data/spec/models/add_business_agent_allowlist_entry_request_spec.rb +36 -0
- data/spec/models/business_agent_allowlist_entry_spec.rb +42 -0
- data/spec/models/{get_whats_app_sdk_config200_response_spec.rb → business_agent_api_key_config_spec.rb} +9 -9
- data/spec/models/business_agent_api_key_params_inner_spec.rb +48 -0
- data/spec/models/business_agent_budget_spec.rb +62 -0
- data/spec/models/business_agent_business_information_contact_info_spec.rb +48 -0
- data/spec/models/business_agent_business_information_spec.rb +66 -0
- data/spec/models/business_agent_connector_all_of_connection_status_spec.rb +42 -0
- data/spec/models/business_agent_connector_input_auth_config_spec.rb +42 -0
- data/spec/models/business_agent_connector_input_spec.rb +82 -0
- data/spec/models/business_agent_connector_input_user_auth_injection_config_spec.rb +48 -0
- data/spec/models/business_agent_connector_spec.rb +106 -0
- data/spec/models/business_agent_connector_tool_input_spec.rb +66 -0
- data/spec/models/business_agent_connector_tool_spec.rb +72 -0
- data/spec/models/business_agent_event_status_spec.rb +70 -0
- data/spec/models/business_agent_faq_input_spec.rb +48 -0
- data/spec/models/business_agent_faq_spec.rb +60 -0
- data/spec/models/business_agent_knowledge_file_spec.rb +42 -0
- data/spec/models/business_agent_o_auth_client_credentials_spec.rb +60 -0
- data/spec/models/business_agent_settings_followup_spec.rb +52 -0
- data/spec/models/business_agent_settings_handoff_spec.rb +52 -0
- data/spec/models/business_agent_settings_rollout_spec.rb +36 -0
- data/spec/models/business_agent_settings_spec.rb +76 -0
- data/spec/models/business_agent_skill_input_spec.rb +48 -0
- data/spec/models/business_agent_skill_spec.rb +76 -0
- data/spec/models/business_agent_status_manual_steps_inner_spec.rb +52 -0
- data/spec/models/business_agent_status_spec.rb +78 -0
- data/spec/models/business_agent_status_unverified_steps_inner_spec.rb +52 -0
- data/spec/models/business_agent_test_message_response_spec.rb +78 -0
- data/spec/models/business_agent_ui_skill_input_spec.rb +68 -0
- data/spec/models/business_agent_ui_skill_spec.rb +86 -0
- data/spec/models/business_agent_website_input_spec.rb +66 -0
- data/spec/models/business_agent_website_spec.rb +102 -0
- data/spec/models/get_business_agent_budget200_response_spec.rb +36 -0
- data/spec/models/get_business_agent_connector_logs200_response_spec.rb +42 -0
- data/spec/models/inline_object2_spec.rb +0 -20
- data/spec/models/inline_object3_spec.rb +4 -22
- data/spec/models/{inline_object3_details_spec.rb → inline_object4_details_spec.rb} +6 -6
- data/spec/models/inline_object4_spec.rb +74 -0
- data/spec/models/inline_object_spec.rb +1 -1
- data/spec/models/list_business_agent_allowlist200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_connector_tools200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_connectors200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_faqs200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_files200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_settings200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_skills200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_ui_skills200_response_spec.rb +42 -0
- data/spec/models/list_business_agent_websites200_response_spec.rb +36 -0
- data/spec/models/onboard_business_agent201_response_spec.rb +36 -0
- data/spec/models/run_business_agent_connector_tool200_response_spec.rb +42 -0
- data/spec/models/run_business_agent_connector_tool_request_spec.rb +36 -0
- data/spec/models/send_business_agent_event202_response_spec.rb +42 -0
- data/spec/models/send_business_agent_event_request_spec.rb +54 -0
- data/spec/models/send_business_agent_test_message_request_spec.rb +42 -0
- data/spec/models/set_business_agent_connector_credentials_request_one_of1_spec.rb +46 -0
- data/spec/models/set_business_agent_connector_credentials_request_one_of2_spec.rb +58 -0
- data/spec/models/set_business_agent_connector_credentials_request_one_of_spec.rb +46 -0
- data/spec/models/set_business_agent_connector_credentials_request_spec.rb +32 -0
- data/spec/models/start_business_agent_eval_run202_response_spec.rb +42 -0
- data/spec/models/start_business_agent_eval_run_request_spec.rb +36 -0
- data/spec/models/update_business_agent_settings_request_followup_spec.rb +52 -0
- data/spec/models/update_business_agent_settings_request_handoff_spec.rb +52 -0
- data/spec/models/update_business_agent_settings_request_rollout_spec.rb +36 -0
- data/spec/models/update_business_agent_settings_request_spec.rb +64 -0
- data/spec/models/upload_business_agent_file_request_spec.rb +42 -0
- data/zernio-sdk-0.0.876.gem +0 -0
- metadata +258 -10
- data/docs/GetWhatsAppSdkConfig200Response.md +0 -22
- data/zernio-sdk-0.0.875.gem +0 -0
data/openapi.yaml
CHANGED
|
@@ -438,6 +438,24 @@ tags:
|
|
|
438
438
|
get it (including the install code snippet), rename + adjust matching/cookie/data-use settings, share
|
|
439
439
|
it with ad accounts, and read aggregated event stats. Currently Meta-only.
|
|
440
440
|
Requires the Ads add-on.
|
|
441
|
+
- name: Business Agent
|
|
442
|
+
description: |
|
|
443
|
+
Provision and operate Meta Business Agent, Meta's own AI agent, on a connected WhatsApp number
|
|
444
|
+
without the merchant opening Business Manager. Check eligibility and setup state, create the agent,
|
|
445
|
+
turn it on or off, feed it knowledge (business information, FAQs, websites, files), give it skills
|
|
446
|
+
and UI skills, wire connectors and tools to your own APIs, cap usage with budgets, test it in Meta's
|
|
447
|
+
sandbox, send it business events, and run evaluations.
|
|
448
|
+
|
|
449
|
+
Two steps stay manual by Meta's design and have no API: the merchant accepts the Meta Business Agent
|
|
450
|
+
terms in WhatsApp Manager (until then every call answers `business_agent_terms_not_accepted`), and a
|
|
451
|
+
payment method is attached to the Business Agent billable account in Billing Hub (without it the agent
|
|
452
|
+
is on but Meta delivers no messages; allowlisted-only testing is exempt). `GET .../business-agent`
|
|
453
|
+
reports both.
|
|
454
|
+
|
|
455
|
+
While the agent answers a conversation your inbox receives it on the standby path and a reply from
|
|
456
|
+
Zernio takes control back. Every call needs the WhatsApp social account id, the Inbox add-on, and a
|
|
457
|
+
number managed through the Cloud API (a coexistence number that still runs the in-app Business AI is
|
|
458
|
+
not eligible).
|
|
441
459
|
- name: Webhooks
|
|
442
460
|
description: |
|
|
443
461
|
Configure webhooks for real-time notifications. Webhooks can be created from the dashboard (Settings → Webhooks) or via this API.
|
|
@@ -534,6 +552,22 @@ components:
|
|
|
534
552
|
Automatically generated when initiating OAuth without a browser session.
|
|
535
553
|
Valid for 15 minutes. Used to authenticate Facebook page selection API calls.
|
|
536
554
|
parameters:
|
|
555
|
+
BusinessAgentAccountId:
|
|
556
|
+
name: accountId
|
|
557
|
+
in: path
|
|
558
|
+
required: true
|
|
559
|
+
schema: { type: string }
|
|
560
|
+
description: 'WhatsApp social account id (the number must be managed through the Cloud API).'
|
|
561
|
+
BusinessAgentConnectorId:
|
|
562
|
+
name: connectorId
|
|
563
|
+
in: path
|
|
564
|
+
required: true
|
|
565
|
+
schema: { type: string }
|
|
566
|
+
BusinessAgentToolId:
|
|
567
|
+
name: toolId
|
|
568
|
+
in: path
|
|
569
|
+
required: true
|
|
570
|
+
schema: { type: string }
|
|
537
571
|
PageParam:
|
|
538
572
|
name: page
|
|
539
573
|
in: query
|
|
@@ -557,6 +591,25 @@ components:
|
|
|
557
591
|
description: Same Idempotency-Key still processing; retry after a short backoff
|
|
558
592
|
IdempotencyKeyReused:
|
|
559
593
|
description: Idempotency-Key reused with a different request
|
|
594
|
+
BusinessAgentForbidden:
|
|
595
|
+
description: 'Inbox add-on required, the WhatsApp token lacks the Business Agent permissions (code reconnect_required), or the merchant has not accepted the Meta Business Agent terms in WhatsApp Manager (code business_agent_terms_not_accepted).'
|
|
596
|
+
content:
|
|
597
|
+
application/json:
|
|
598
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
599
|
+
BusinessAgentNotFound:
|
|
600
|
+
description: 'Account not found, or no agent exists on the number yet or the referenced item does not exist (code business_agent_not_found).'
|
|
601
|
+
content:
|
|
602
|
+
application/json:
|
|
603
|
+
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
604
|
+
BusinessAgentDeleted:
|
|
605
|
+
description: Deleted
|
|
606
|
+
content:
|
|
607
|
+
application/json:
|
|
608
|
+
schema:
|
|
609
|
+
type: object
|
|
610
|
+
required: [success]
|
|
611
|
+
properties:
|
|
612
|
+
success: { type: boolean }
|
|
560
613
|
BadRequest:
|
|
561
614
|
description: Invalid request
|
|
562
615
|
content:
|
|
@@ -9577,6 +9630,289 @@ components:
|
|
|
9577
9630
|
publishedAt: { type: [string, "null"], format: date-time, description: 'When the article was (or is scheduled to be) published; null for drafts.' }
|
|
9578
9631
|
createdAt: { type: [string, "null"], format: date-time }
|
|
9579
9632
|
updatedAt: { type: [string, "null"], format: date-time }
|
|
9633
|
+
BusinessAgentSettings:
|
|
9634
|
+
type: object
|
|
9635
|
+
description: 'Meta Business Agent settings for one WhatsApp number, as Meta returns them.'
|
|
9636
|
+
required: [agent_id, channel, rollout]
|
|
9637
|
+
properties:
|
|
9638
|
+
agent_id: { type: string }
|
|
9639
|
+
channel: { type: string, example: whatsapp }
|
|
9640
|
+
rollout:
|
|
9641
|
+
type: object
|
|
9642
|
+
required: [enabled]
|
|
9643
|
+
properties:
|
|
9644
|
+
enabled: { type: boolean, description: 'Whether the agent answers live conversations.' }
|
|
9645
|
+
handoff:
|
|
9646
|
+
type: [object, "null"]
|
|
9647
|
+
properties:
|
|
9648
|
+
enabled: { type: boolean, description: 'Whether the agent releases the thread after sending its handoff message.' }
|
|
9649
|
+
message: { type: string }
|
|
9650
|
+
message_selection: { type: string, enum: [DEFAULT, AGENT, CUSTOM] }
|
|
9651
|
+
followup:
|
|
9652
|
+
type: [object, "null"]
|
|
9653
|
+
properties:
|
|
9654
|
+
enabled: { type: boolean }
|
|
9655
|
+
followup_interval_in_seconds: { type: integer, enum: [0, 300, 900, 1800, 3600, 7200, 28800, 86400] }
|
|
9656
|
+
message: { type: string }
|
|
9657
|
+
ai_audience:
|
|
9658
|
+
type: [string, "null"]
|
|
9659
|
+
enum: [EVERYONE, ALLOWLISTED_ONLY, null]
|
|
9660
|
+
description: 'EVERYONE answers all consumers; ALLOWLISTED_ONLY answers only the allowlist and needs no payment method.'
|
|
9661
|
+
never_say_phrases:
|
|
9662
|
+
type: array
|
|
9663
|
+
items: { type: string }
|
|
9664
|
+
description: 'Exact phrases the agent must never say.'
|
|
9665
|
+
BusinessAgentStatus:
|
|
9666
|
+
type: object
|
|
9667
|
+
description: 'Where the merchant is in the Meta Business Agent setup for this number.'
|
|
9668
|
+
required: [eligible, termsAccepted, onboarded, enabled, agentId, settings, manualSteps, unverifiedSteps]
|
|
9669
|
+
properties:
|
|
9670
|
+
eligible:
|
|
9671
|
+
type: [boolean, "null"]
|
|
9672
|
+
description: 'Whether the number can run the agent; null when the terms are not accepted yet (Meta refuses the check).'
|
|
9673
|
+
termsAccepted: { type: boolean, description: 'False when Meta rejects calls because the merchant has not accepted the terms in WhatsApp Manager.' }
|
|
9674
|
+
onboarded: { type: boolean, description: 'An agent exists on the number (onboard was called).' }
|
|
9675
|
+
enabled: { type: boolean, description: 'The agent answers live conversations.' }
|
|
9676
|
+
agentId: { type: [string, "null"] }
|
|
9677
|
+
settings:
|
|
9678
|
+
oneOf:
|
|
9679
|
+
- $ref: '#/components/schemas/BusinessAgentSettings'
|
|
9680
|
+
- type: "null"
|
|
9681
|
+
manualSteps:
|
|
9682
|
+
type: array
|
|
9683
|
+
description: 'Steps Meta keeps outside the API that Zernio can verify are still pending.'
|
|
9684
|
+
items:
|
|
9685
|
+
type: object
|
|
9686
|
+
required: [step, url, description]
|
|
9687
|
+
properties:
|
|
9688
|
+
step: { type: string, enum: [accept_terms] }
|
|
9689
|
+
url: { type: string, format: uri }
|
|
9690
|
+
description: { type: string }
|
|
9691
|
+
unverifiedSteps:
|
|
9692
|
+
type: array
|
|
9693
|
+
description: 'Steps Meta keeps outside the API and exposes no state for, listed once an agent exists. Informational: Zernio cannot tell whether the merchant already did them.'
|
|
9694
|
+
items:
|
|
9695
|
+
type: object
|
|
9696
|
+
required: [step, url, description]
|
|
9697
|
+
properties:
|
|
9698
|
+
step: { type: string, enum: [attach_payment_method] }
|
|
9699
|
+
url: { type: string, format: uri }
|
|
9700
|
+
description: { type: string }
|
|
9701
|
+
BusinessAgentAllowlistEntry:
|
|
9702
|
+
type: object
|
|
9703
|
+
required: [id]
|
|
9704
|
+
properties:
|
|
9705
|
+
id: { type: string }
|
|
9706
|
+
consumer_phone_number: { type: string, description: 'E.164 phone number.' }
|
|
9707
|
+
BusinessAgentBusinessInformation:
|
|
9708
|
+
type: object
|
|
9709
|
+
description: 'Free-text facts the agent answers from; PUT replaces the whole object.'
|
|
9710
|
+
properties:
|
|
9711
|
+
payment_method: { type: string }
|
|
9712
|
+
return_policy: { type: string }
|
|
9713
|
+
purchase_info: { type: string }
|
|
9714
|
+
delivery_and_shipping: { type: string }
|
|
9715
|
+
business_description: { type: string }
|
|
9716
|
+
contact_info:
|
|
9717
|
+
type: [object, "null"]
|
|
9718
|
+
properties:
|
|
9719
|
+
email: { type: string }
|
|
9720
|
+
hours_of_operation: { type: string }
|
|
9721
|
+
address: { type: string }
|
|
9722
|
+
BusinessAgentFaqInput:
|
|
9723
|
+
type: object
|
|
9724
|
+
required: [question, answer]
|
|
9725
|
+
properties:
|
|
9726
|
+
question: { type: string, maxLength: 1000, description: 'Phrase it the way a customer would ask it; one topic per entry.' }
|
|
9727
|
+
answer: { type: string, maxLength: 8000, description: 'Self-contained; the agent retrieves entries independently.' }
|
|
9728
|
+
metadata: { type: object, additionalProperties: { type: string } }
|
|
9729
|
+
BusinessAgentFaq:
|
|
9730
|
+
allOf:
|
|
9731
|
+
- $ref: '#/components/schemas/BusinessAgentFaqInput'
|
|
9732
|
+
- type: object
|
|
9733
|
+
required: [id]
|
|
9734
|
+
properties:
|
|
9735
|
+
id: { type: string }
|
|
9736
|
+
created_at: { type: integer, description: 'Unix seconds.' }
|
|
9737
|
+
BusinessAgentWebsiteInput:
|
|
9738
|
+
type: object
|
|
9739
|
+
required: [url]
|
|
9740
|
+
properties:
|
|
9741
|
+
url: { type: string, format: uri }
|
|
9742
|
+
included_sub_domains: { type: array, items: { type: string } }
|
|
9743
|
+
included_url_patterns: { type: array, items: { type: string }, description: 'Only URLs containing one of these substrings are ingested.' }
|
|
9744
|
+
excluded_sub_domains: { type: array, items: { type: string } }
|
|
9745
|
+
excluded_url_patterns: { type: array, items: { type: string } }
|
|
9746
|
+
single_urls: { type: array, items: { type: string, format: uri }, description: 'Crawl only these exact pages instead of the whole site.' }
|
|
9747
|
+
BusinessAgentWebsite:
|
|
9748
|
+
allOf:
|
|
9749
|
+
- $ref: '#/components/schemas/BusinessAgentWebsiteInput'
|
|
9750
|
+
- type: object
|
|
9751
|
+
required: [id]
|
|
9752
|
+
properties:
|
|
9753
|
+
id: { type: string }
|
|
9754
|
+
crawl_status: { type: string, description: 'not_started, pending, in_progress, completed, completed_no_data or failed (see crawl_error).' }
|
|
9755
|
+
crawl_error: { type: string }
|
|
9756
|
+
pages_crawled: { type: integer }
|
|
9757
|
+
last_crawled_at: { type: integer, description: 'Unix seconds.' }
|
|
9758
|
+
created_at: { type: integer, description: 'Unix seconds.' }
|
|
9759
|
+
BusinessAgentKnowledgeFile:
|
|
9760
|
+
type: object
|
|
9761
|
+
required: [id, file_name]
|
|
9762
|
+
properties:
|
|
9763
|
+
id: { type: string }
|
|
9764
|
+
file_name: { type: string }
|
|
9765
|
+
BusinessAgentSkillInput:
|
|
9766
|
+
type: object
|
|
9767
|
+
required: [skill]
|
|
9768
|
+
properties:
|
|
9769
|
+
title: { type: string, maxLength: 64, pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$', description: 'Lowercase letters, digits and hyphens, e.g. greeting-skill.' }
|
|
9770
|
+
description: { type: string, maxLength: 1024, description: 'When the agent should apply the skill.' }
|
|
9771
|
+
skill: { type: string, maxLength: 20000, description: 'The instructions themselves. Avoid two skills that both claim priority for the same situation.' }
|
|
9772
|
+
BusinessAgentSkill:
|
|
9773
|
+
allOf:
|
|
9774
|
+
- $ref: '#/components/schemas/BusinessAgentSkillInput'
|
|
9775
|
+
- type: object
|
|
9776
|
+
required: [id]
|
|
9777
|
+
properties:
|
|
9778
|
+
id: { type: string }
|
|
9779
|
+
channel: { type: string }
|
|
9780
|
+
created_at: { type: integer, description: 'Unix seconds.' }
|
|
9781
|
+
status:
|
|
9782
|
+
type: string
|
|
9783
|
+
enum: [active, pending_review, blocked]
|
|
9784
|
+
description: 'pending_review right after a write; blocked means Meta content review rejected it and the agent never applies it.'
|
|
9785
|
+
BusinessAgentUiSkillInput:
|
|
9786
|
+
type: object
|
|
9787
|
+
required: [component_type, status, instruction]
|
|
9788
|
+
properties:
|
|
9789
|
+
title: { type: string }
|
|
9790
|
+
component_type:
|
|
9791
|
+
type: string
|
|
9792
|
+
enum: [carousel_quick_reply, carousel_url, cta_url, flow, image, interactive_list, interactive_reply_buttons, location, location_request]
|
|
9793
|
+
status: { type: string, enum: [enabled, disabled] }
|
|
9794
|
+
instruction: { type: string, description: 'When to send the component and everything needed to fill its fields.' }
|
|
9795
|
+
flow_id: { type: integer, description: 'Required for component_type flow, rejected otherwise.' }
|
|
9796
|
+
BusinessAgentUiSkill:
|
|
9797
|
+
allOf:
|
|
9798
|
+
- $ref: '#/components/schemas/BusinessAgentUiSkillInput'
|
|
9799
|
+
- type: object
|
|
9800
|
+
required: [id]
|
|
9801
|
+
properties:
|
|
9802
|
+
id: { type: string }
|
|
9803
|
+
created_at: { type: integer, description: 'Unix seconds.' }
|
|
9804
|
+
updated_at: { type: integer, description: 'Unix seconds.' }
|
|
9805
|
+
BusinessAgentApiKeyConfig:
|
|
9806
|
+
type: object
|
|
9807
|
+
description: 'Where the connector injects the API key on each call.'
|
|
9808
|
+
properties:
|
|
9809
|
+
headers: { $ref: '#/components/schemas/BusinessAgentApiKeyParams' }
|
|
9810
|
+
query_params: { $ref: '#/components/schemas/BusinessAgentApiKeyParams' }
|
|
9811
|
+
body_params: { $ref: '#/components/schemas/BusinessAgentApiKeyParams' }
|
|
9812
|
+
BusinessAgentApiKeyParams:
|
|
9813
|
+
type: array
|
|
9814
|
+
items:
|
|
9815
|
+
type: object
|
|
9816
|
+
required: [field_name, value]
|
|
9817
|
+
properties:
|
|
9818
|
+
field_name: { type: string }
|
|
9819
|
+
value: { type: string }
|
|
9820
|
+
prefix: { type: string }
|
|
9821
|
+
BusinessAgentOAuthClientCredentials:
|
|
9822
|
+
type: object
|
|
9823
|
+
required: [token_url, client_id, client_secret]
|
|
9824
|
+
properties:
|
|
9825
|
+
token_url: { type: string, format: uri }
|
|
9826
|
+
scopes_to_request: { type: array, items: { type: string } }
|
|
9827
|
+
token_request_content_type: { type: string, example: application/x-www-form-urlencoded }
|
|
9828
|
+
client_id: { type: string }
|
|
9829
|
+
client_secret: { type: string }
|
|
9830
|
+
BusinessAgentConnectorInput:
|
|
9831
|
+
type: object
|
|
9832
|
+
required: [name, base_url, auth_type]
|
|
9833
|
+
properties:
|
|
9834
|
+
name: { type: string, description: 'Unique per number.' }
|
|
9835
|
+
description: { type: string, description: 'Tell the agent what the service provides.' }
|
|
9836
|
+
base_url: { type: string, format: uri, description: 'Public HTTPS URL reachable from Meta.' }
|
|
9837
|
+
connector_protocol: { type: string, example: HTTP }
|
|
9838
|
+
auth_type: { type: string, enum: [OAUTH2_CLIENT_CREDENTIALS, API_KEY, NONE] }
|
|
9839
|
+
auth_config:
|
|
9840
|
+
type: object
|
|
9841
|
+
properties:
|
|
9842
|
+
oauth2_client_credentials: { $ref: '#/components/schemas/BusinessAgentOAuthClientCredentials' }
|
|
9843
|
+
api_key: { $ref: '#/components/schemas/BusinessAgentApiKeyConfig' }
|
|
9844
|
+
user_auth_injection_config:
|
|
9845
|
+
type: object
|
|
9846
|
+
required: [location, field_name]
|
|
9847
|
+
properties:
|
|
9848
|
+
location: { type: string, example: headers }
|
|
9849
|
+
field_name: { type: string }
|
|
9850
|
+
prefix: { type: string }
|
|
9851
|
+
requires_certificate: { type: boolean }
|
|
9852
|
+
BusinessAgentConnector:
|
|
9853
|
+
allOf:
|
|
9854
|
+
- $ref: '#/components/schemas/BusinessAgentConnectorInput'
|
|
9855
|
+
- type: object
|
|
9856
|
+
required: [id]
|
|
9857
|
+
properties:
|
|
9858
|
+
id: { type: string }
|
|
9859
|
+
mcp_tool_sync: { type: object, additionalProperties: true }
|
|
9860
|
+
mtls_config: { type: object, additionalProperties: true }
|
|
9861
|
+
connection_status:
|
|
9862
|
+
type: object
|
|
9863
|
+
properties:
|
|
9864
|
+
status: { type: string, description: 'ACTIVE, PENDING_OAUTH, EXPIRED or ERROR.' }
|
|
9865
|
+
error_message: { type: string }
|
|
9866
|
+
BusinessAgentConnectorToolInput:
|
|
9867
|
+
type: object
|
|
9868
|
+
required: [name, description, request_definition]
|
|
9869
|
+
properties:
|
|
9870
|
+
name: { type: string }
|
|
9871
|
+
description: { type: string, description: 'When and how the agent should use the operation.' }
|
|
9872
|
+
request_definition:
|
|
9873
|
+
type: object
|
|
9874
|
+
additionalProperties: true
|
|
9875
|
+
description: 'Meta request definition: method, path, path_parameters, query_parameters, headers and a typed body schema (content_type, params, required).'
|
|
9876
|
+
user_auth_required: { type: boolean }
|
|
9877
|
+
user_auth_action_config: { type: object, additionalProperties: true }
|
|
9878
|
+
transformation_spec: { type: object, additionalProperties: true }
|
|
9879
|
+
BusinessAgentConnectorTool:
|
|
9880
|
+
allOf:
|
|
9881
|
+
- $ref: '#/components/schemas/BusinessAgentConnectorToolInput'
|
|
9882
|
+
- type: object
|
|
9883
|
+
required: [id]
|
|
9884
|
+
properties:
|
|
9885
|
+
id: { type: string }
|
|
9886
|
+
BusinessAgentBudget:
|
|
9887
|
+
type: object
|
|
9888
|
+
required: [unit_type, time_window, max_budget]
|
|
9889
|
+
properties:
|
|
9890
|
+
budget_id: { type: string, description: 'Pass it back to edit an existing budget; omit to add one.' }
|
|
9891
|
+
unit_type: { type: string, enum: [token, ai_turn], description: 'Tokens count across the Business Manager, AI turns per conversation.' }
|
|
9892
|
+
time_window: { type: string, enum: [one_day, seven_days, fourteen_days, thirty_days], description: 'Rolling window in the WABA timezone.' }
|
|
9893
|
+
max_budget: { type: integer, minimum: 1 }
|
|
9894
|
+
BusinessAgentTestMessageResponse:
|
|
9895
|
+
type: object
|
|
9896
|
+
required: [message_id, agent_response, conversation_id]
|
|
9897
|
+
properties:
|
|
9898
|
+
message_id: { type: string }
|
|
9899
|
+
agent_response: { type: string }
|
|
9900
|
+
conversation_id: { type: string, description: 'Pass it back as conversationId to continue the thread.' }
|
|
9901
|
+
timestamp: { type: integer, description: 'Unix seconds.' }
|
|
9902
|
+
handoff_reason: { type: string }
|
|
9903
|
+
no_response_reason: { type: string }
|
|
9904
|
+
quick_replies: { type: array, items: { type: string } }
|
|
9905
|
+
product_variant_ids: { type: array, items: { type: string } }
|
|
9906
|
+
BusinessAgentEventStatus:
|
|
9907
|
+
type: object
|
|
9908
|
+
required: [status, event_type, created_at, updated_at]
|
|
9909
|
+
properties:
|
|
9910
|
+
status: { type: string, enum: [request_received, processing, sent, failed, skipped, success] }
|
|
9911
|
+
event_type: { type: string }
|
|
9912
|
+
error_message: { type: string }
|
|
9913
|
+
skipped_reason: { type: string }
|
|
9914
|
+
created_at: { type: string, format: date-time }
|
|
9915
|
+
updated_at: { type: string, format: date-time }
|
|
9580
9916
|
TrackingTag:
|
|
9581
9917
|
type: object
|
|
9582
9918
|
description: |
|
|
@@ -22396,62 +22732,13 @@ paths:
|
|
|
22396
22732
|
application/json:
|
|
22397
22733
|
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
22398
22734
|
|
|
22399
|
-
/v1/connect/whatsapp/sdk-config:
|
|
22400
|
-
get:
|
|
22401
|
-
x-resource-group: "accounts"
|
|
22402
|
-
operationId: getWhatsAppSdkConfig
|
|
22403
|
-
tags: [Connect]
|
|
22404
|
-
summary: Get Embedded Signup SDK config
|
|
22405
|
-
description: |
|
|
22406
|
-
The public values needed to run Meta's Embedded Signup inside your own page with the
|
|
22407
|
-
Facebook JavaScript SDK instead of the redirect flow: pass `appId` and `graphApiVersion`
|
|
22408
|
-
to `FB.init`, and `configId` as `config_id` to `FB.login`. The popup then reports the
|
|
22409
|
-
WhatsApp Business Account and phone number the user picked through the
|
|
22410
|
-
`WA_EMBEDDED_SIGNUP` message event, and you finish the connection with
|
|
22411
|
-
`POST /v1/connect/whatsapp/embedded-signup`. Because the number comes back from the popup,
|
|
22412
|
-
the user never sees a second number picker.
|
|
22413
|
-
|
|
22414
|
-
Available on request: `FB.login` only opens on HTTPS domains listed in the Zernio Meta app, so
|
|
22415
|
-
send the domains that will host the popup to support before going live.
|
|
22416
|
-
security:
|
|
22417
|
-
- bearerAuth: []
|
|
22418
|
-
responses:
|
|
22419
|
-
'200':
|
|
22420
|
-
description: SDK configuration
|
|
22421
|
-
content:
|
|
22422
|
-
application/json:
|
|
22423
|
-
schema:
|
|
22424
|
-
type: object
|
|
22425
|
-
required: [appId, configId, graphApiVersion]
|
|
22426
|
-
properties:
|
|
22427
|
-
appId: { type: string, description: 'Meta app id for FB.init' }
|
|
22428
|
-
configId: { type: string, description: 'Embedded Signup configuration id for the config_id option of FB.login' }
|
|
22429
|
-
graphApiVersion: { type: string, description: 'Graph API version to pass to FB.init (for example v22.0)', example: v22.0 }
|
|
22430
|
-
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
22431
|
-
|
|
22432
22735
|
/v1/connect/whatsapp/embedded-signup:
|
|
22433
22736
|
post:
|
|
22434
22737
|
x-resource-group: "accounts"
|
|
22435
22738
|
operationId: connectWhatsAppEmbeddedSignup
|
|
22436
22739
|
tags: [Connect]
|
|
22437
22740
|
summary: Connect WhatsApp from Embedded Signup
|
|
22438
|
-
description:
|
|
22439
|
-
Finish a WhatsApp connection started with Meta's Embedded Signup in your own page (Facebook
|
|
22440
|
-
JavaScript SDK). The code never passes through a `redirect_url`, so `POST /v1/connect/{platform}`
|
|
22441
|
-
cannot accept it.
|
|
22442
|
-
|
|
22443
|
-
The flow: call `GET /v1/connect/whatsapp/sdk-config`, run `FB.login` with that `configId`,
|
|
22444
|
-
`response_type: 'code'`, `override_default_response_type: true` and
|
|
22445
|
-
`extras: { sessionInfoVersion: '3' }`, read `waba_id` and `phone_number_id` from the
|
|
22446
|
-
`WA_EMBEDDED_SIGNUP` message event Meta posts to your window, then send the `code` from the
|
|
22447
|
-
login response here together with those ids.
|
|
22448
|
-
|
|
22449
|
-
Always forward `wabaId` and `phoneNumberId`: Zernio connects exactly that number and no picker is
|
|
22450
|
-
shown. Without them Zernio falls back to the first number of the first WhatsApp Business Account the
|
|
22451
|
-
token can reach, which may not be the one the user picked.
|
|
22452
|
-
|
|
22453
|
-
The Zernio Meta app must list the domain that hosts the popup before `FB.login` will open there.
|
|
22454
|
-
Available on request: send the domains to support.
|
|
22741
|
+
description: 'Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.'
|
|
22455
22742
|
requestBody:
|
|
22456
22743
|
required: true
|
|
22457
22744
|
content:
|
|
@@ -22460,11 +22747,11 @@ paths:
|
|
|
22460
22747
|
type: object
|
|
22461
22748
|
required: [code, profileId]
|
|
22462
22749
|
properties:
|
|
22463
|
-
code: { type: string, description: 'Authorization code from the
|
|
22750
|
+
code: { type: string, description: 'Authorization code from the WA_EMBEDDED_SIGNUP postMessage' }
|
|
22464
22751
|
profileId: { type: string }
|
|
22465
|
-
wabaId: { type: string, description: '
|
|
22466
|
-
phoneNumberId: { type: string
|
|
22467
|
-
isCoexistence: { type: boolean, description: '
|
|
22752
|
+
wabaId: { type: string, description: 'WhatsApp Business Account id, when the SDK reported one' }
|
|
22753
|
+
phoneNumberId: { type: string }
|
|
22754
|
+
isCoexistence: { type: boolean, description: 'Number is also live in the WhatsApp Business app' }
|
|
22468
22755
|
expectedPhoneNumber: { type: string, description: 'Rejects the connect when Meta returns a different number' }
|
|
22469
22756
|
responses:
|
|
22470
22757
|
'200': { description: Number connected }
|
|
@@ -28976,7 +29263,7 @@ paths:
|
|
|
28976
29263
|
WhatsApp only, on numbers with Meta Business Agent enabled. Wraps Meta's thread control:
|
|
28977
29264
|
- `release`: hand the conversation back to the agent so it resumes answering. You must currently hold control (sending any message takes it implicitly).
|
|
28978
29265
|
- `take`: take control before sending anything, so the agent stops replying while an operator reads the thread. Meta accepts this only from the business configured as the number's escalation partner; other apps take control by sending a message.
|
|
28979
|
-
- `pass`: transfer control to the number's configured escalation partner, or to the agent with `target: ai_agent`.
|
|
29266
|
+
- `pass`: transfer control to the number's configured escalation partner, or to the agent with `target: ai_agent`. Meta's Cloud API currently rejects it ("Pass action is not supported", verified 2026-09-08); use `release` to hand a thread back to the agent.
|
|
28980
29267
|
|
|
28981
29268
|
The conversation's `threadControl` follows the result; a `conversation.control_changed` webhook fires when Meta later reports the change.
|
|
28982
29269
|
tags: [Messages]
|
|
@@ -50456,6 +50743,1382 @@ paths:
|
|
|
50456
50743
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50457
50744
|
'403': { description: "Ads access required, or the token lacks the ads permissions." }
|
|
50458
50745
|
|
|
50746
|
+
/v1/accounts/{accountId}/business-agent:
|
|
50747
|
+
get:
|
|
50748
|
+
x-resource-group: "messages"
|
|
50749
|
+
operationId: getBusinessAgentStatus
|
|
50750
|
+
tags: [Business Agent]
|
|
50751
|
+
summary: Get agent setup status
|
|
50752
|
+
description: |
|
|
50753
|
+
One read that says where the merchant is: whether the number is eligible, whether the
|
|
50754
|
+
Meta Business Agent terms are accepted, whether an agent exists, whether it is on, and its
|
|
50755
|
+
settings. `manualSteps` lists what Zernio can verify is still pending (accepting the terms
|
|
50756
|
+
in WhatsApp Manager); `unverifiedSteps` lists what Meta exposes no state for (the payment
|
|
50757
|
+
method in Billing Hub). Never fails for those pre-setup states; it reports them as flags.
|
|
50758
|
+
security: [{ bearerAuth: [] }]
|
|
50759
|
+
parameters:
|
|
50760
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50761
|
+
responses:
|
|
50762
|
+
'200':
|
|
50763
|
+
description: Setup status
|
|
50764
|
+
content:
|
|
50765
|
+
application/json:
|
|
50766
|
+
schema: { $ref: '#/components/schemas/BusinessAgentStatus' }
|
|
50767
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50768
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50769
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50770
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50771
|
+
/v1/accounts/{accountId}/business-agent/onboard:
|
|
50772
|
+
post:
|
|
50773
|
+
x-resource-group: "messages"
|
|
50774
|
+
operationId: onboardBusinessAgent
|
|
50775
|
+
tags: [Business Agent]
|
|
50776
|
+
summary: Create the agent
|
|
50777
|
+
description: |
|
|
50778
|
+
Creates the Meta Business Agent on the number and schedules Meta's data preparation.
|
|
50779
|
+
Requires the terms to be accepted; eligibility is checked first and an ineligible
|
|
50780
|
+
number answers 403 `business_agent_not_eligible`. Not idempotent: call it once, then
|
|
50781
|
+
configure knowledge and skills, then enable it through the settings. Configuration
|
|
50782
|
+
calls made in the first minute can still answer `business_agent_not_found` while Meta
|
|
50783
|
+
prepares the workspace.
|
|
50784
|
+
security: [{ bearerAuth: [] }]
|
|
50785
|
+
parameters:
|
|
50786
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50787
|
+
responses:
|
|
50788
|
+
'201':
|
|
50789
|
+
description: Agent created
|
|
50790
|
+
content:
|
|
50791
|
+
application/json:
|
|
50792
|
+
schema:
|
|
50793
|
+
type: object
|
|
50794
|
+
required: [agentId]
|
|
50795
|
+
properties:
|
|
50796
|
+
agentId: { type: string }
|
|
50797
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50798
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50799
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50800
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50801
|
+
'409': { description: 'Meta rejected the state change (code business_agent_conflict).' }
|
|
50802
|
+
/v1/accounts/{accountId}/business-agent/settings:
|
|
50803
|
+
get:
|
|
50804
|
+
x-resource-group: "messages"
|
|
50805
|
+
operationId: listBusinessAgentSettings
|
|
50806
|
+
tags: [Business Agent]
|
|
50807
|
+
summary: List agent settings
|
|
50808
|
+
description: 'Settings of every agent configured on the number (normally one). Pass `agentId` to read one.'
|
|
50809
|
+
security: [{ bearerAuth: [] }]
|
|
50810
|
+
parameters:
|
|
50811
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50812
|
+
- { name: agentId, in: query, required: false, schema: { type: string } }
|
|
50813
|
+
responses:
|
|
50814
|
+
'200':
|
|
50815
|
+
description: Settings
|
|
50816
|
+
content:
|
|
50817
|
+
application/json:
|
|
50818
|
+
schema:
|
|
50819
|
+
type: object
|
|
50820
|
+
required: [settings]
|
|
50821
|
+
properties:
|
|
50822
|
+
settings:
|
|
50823
|
+
type: array
|
|
50824
|
+
items: { $ref: '#/components/schemas/BusinessAgentSettings' }
|
|
50825
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50826
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50827
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50828
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50829
|
+
patch:
|
|
50830
|
+
x-resource-group: "messages"
|
|
50831
|
+
operationId: updateBusinessAgentSettings
|
|
50832
|
+
tags: [Business Agent]
|
|
50833
|
+
summary: Update agent settings
|
|
50834
|
+
description: |
|
|
50835
|
+
Partial update: fields you omit keep their value. `rollout.enabled: true` turns the agent
|
|
50836
|
+
on for new conversations; `false` stops it on every thread. Turning it on for `EVERYONE`
|
|
50837
|
+
needs a payment method on the Business Agent billable account (Meta accepts the call but
|
|
50838
|
+
delivers nothing without one); `ALLOWLISTED_ONLY` does not, which is how you test with a
|
|
50839
|
+
few numbers before billing. `never_say_phrases` replaces the whole list.
|
|
50840
|
+
security: [{ bearerAuth: [] }]
|
|
50841
|
+
parameters:
|
|
50842
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50843
|
+
- { name: agentId, in: query, required: false, schema: { type: string } }
|
|
50844
|
+
requestBody:
|
|
50845
|
+
required: true
|
|
50846
|
+
content:
|
|
50847
|
+
application/json:
|
|
50848
|
+
schema:
|
|
50849
|
+
type: object
|
|
50850
|
+
properties:
|
|
50851
|
+
rollout:
|
|
50852
|
+
type: object
|
|
50853
|
+
required: [enabled]
|
|
50854
|
+
properties:
|
|
50855
|
+
enabled: { type: boolean }
|
|
50856
|
+
handoff:
|
|
50857
|
+
type: object
|
|
50858
|
+
required: [enabled]
|
|
50859
|
+
properties:
|
|
50860
|
+
enabled: { type: boolean }
|
|
50861
|
+
message: { type: string, maxLength: 1024 }
|
|
50862
|
+
message_selection: { type: string, enum: [DEFAULT, AGENT, CUSTOM] }
|
|
50863
|
+
followup:
|
|
50864
|
+
type: object
|
|
50865
|
+
required: [enabled]
|
|
50866
|
+
properties:
|
|
50867
|
+
enabled: { type: boolean }
|
|
50868
|
+
followup_interval_in_seconds: { type: integer, enum: [0, 300, 900, 1800, 3600, 7200, 28800, 86400] }
|
|
50869
|
+
message: { type: string, maxLength: 1024 }
|
|
50870
|
+
ai_audience: { type: string, enum: [EVERYONE, ALLOWLISTED_ONLY] }
|
|
50871
|
+
never_say_phrases:
|
|
50872
|
+
type: array
|
|
50873
|
+
items: { type: string }
|
|
50874
|
+
description: 'Exact phrases the agent must never say; the full replacement list.'
|
|
50875
|
+
responses:
|
|
50876
|
+
'200':
|
|
50877
|
+
description: Updated settings
|
|
50878
|
+
content:
|
|
50879
|
+
application/json:
|
|
50880
|
+
schema: { $ref: '#/components/schemas/BusinessAgentSettings' }
|
|
50881
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50882
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50883
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50884
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50885
|
+
/v1/accounts/{accountId}/business-agent/allowlist:
|
|
50886
|
+
get:
|
|
50887
|
+
x-resource-group: "messages"
|
|
50888
|
+
operationId: listBusinessAgentAllowlist
|
|
50889
|
+
tags: [Business Agent]
|
|
50890
|
+
summary: List allowlisted consumers
|
|
50891
|
+
description: 'Consumers the agent answers while `ai_audience` is ALLOWLISTED_ONLY.'
|
|
50892
|
+
security: [{ bearerAuth: [] }]
|
|
50893
|
+
parameters:
|
|
50894
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50895
|
+
responses:
|
|
50896
|
+
'200':
|
|
50897
|
+
description: Allowlist
|
|
50898
|
+
content:
|
|
50899
|
+
application/json:
|
|
50900
|
+
schema:
|
|
50901
|
+
type: object
|
|
50902
|
+
required: [entries]
|
|
50903
|
+
properties:
|
|
50904
|
+
entries:
|
|
50905
|
+
type: array
|
|
50906
|
+
items: { $ref: '#/components/schemas/BusinessAgentAllowlistEntry' }
|
|
50907
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50908
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50909
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50910
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50911
|
+
post:
|
|
50912
|
+
x-resource-group: "messages"
|
|
50913
|
+
operationId: addBusinessAgentAllowlistEntry
|
|
50914
|
+
tags: [Business Agent]
|
|
50915
|
+
summary: Allowlist a consumer
|
|
50916
|
+
description: 'One E.164 number per call. Not idempotent.'
|
|
50917
|
+
security: [{ bearerAuth: [] }]
|
|
50918
|
+
parameters:
|
|
50919
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50920
|
+
requestBody:
|
|
50921
|
+
required: true
|
|
50922
|
+
content:
|
|
50923
|
+
application/json:
|
|
50924
|
+
schema:
|
|
50925
|
+
type: object
|
|
50926
|
+
required: [consumer_phone_number]
|
|
50927
|
+
properties:
|
|
50928
|
+
consumer_phone_number: { type: string, example: '+34600000000' }
|
|
50929
|
+
responses:
|
|
50930
|
+
'201':
|
|
50931
|
+
description: Entry added
|
|
50932
|
+
content:
|
|
50933
|
+
application/json:
|
|
50934
|
+
schema: { $ref: '#/components/schemas/BusinessAgentAllowlistEntry' }
|
|
50935
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50936
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50937
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50938
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50939
|
+
/v1/accounts/{accountId}/business-agent/allowlist/{entryId}:
|
|
50940
|
+
delete:
|
|
50941
|
+
x-resource-group: "messages"
|
|
50942
|
+
operationId: removeBusinessAgentAllowlistEntry
|
|
50943
|
+
tags: [Business Agent]
|
|
50944
|
+
summary: Remove an allowlisted consumer
|
|
50945
|
+
security: [{ bearerAuth: [] }]
|
|
50946
|
+
parameters:
|
|
50947
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50948
|
+
- { name: entryId, in: path, required: true, schema: { type: string } }
|
|
50949
|
+
responses:
|
|
50950
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
50951
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50952
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50953
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50954
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50955
|
+
/v1/accounts/{accountId}/business-agent/business-information:
|
|
50956
|
+
get:
|
|
50957
|
+
x-resource-group: "messages"
|
|
50958
|
+
operationId: getBusinessAgentBusinessInformation
|
|
50959
|
+
tags: [Business Agent]
|
|
50960
|
+
summary: Get business information
|
|
50961
|
+
description: 'Payment methods, return policy, how to buy, shipping, description and contact details the agent answers from. Empty values until configured.'
|
|
50962
|
+
security: [{ bearerAuth: [] }]
|
|
50963
|
+
parameters:
|
|
50964
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50965
|
+
responses:
|
|
50966
|
+
'200':
|
|
50967
|
+
description: Business information
|
|
50968
|
+
content:
|
|
50969
|
+
application/json:
|
|
50970
|
+
schema: { $ref: '#/components/schemas/BusinessAgentBusinessInformation' }
|
|
50971
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50972
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50973
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50974
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50975
|
+
put:
|
|
50976
|
+
x-resource-group: "messages"
|
|
50977
|
+
operationId: replaceBusinessAgentBusinessInformation
|
|
50978
|
+
tags: [Business Agent]
|
|
50979
|
+
summary: Replace business information
|
|
50980
|
+
description: 'Full replacement: every field you send overwrites the stored value; fields you omit are cleared.'
|
|
50981
|
+
security: [{ bearerAuth: [] }]
|
|
50982
|
+
parameters:
|
|
50983
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
50984
|
+
requestBody:
|
|
50985
|
+
required: true
|
|
50986
|
+
content:
|
|
50987
|
+
application/json:
|
|
50988
|
+
schema: { $ref: '#/components/schemas/BusinessAgentBusinessInformation' }
|
|
50989
|
+
responses:
|
|
50990
|
+
'200':
|
|
50991
|
+
description: Stored business information
|
|
50992
|
+
content:
|
|
50993
|
+
application/json:
|
|
50994
|
+
schema: { $ref: '#/components/schemas/BusinessAgentBusinessInformation' }
|
|
50995
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
50996
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
50997
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
50998
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50999
|
+
delete:
|
|
51000
|
+
x-resource-group: "messages"
|
|
51001
|
+
operationId: resetBusinessAgentBusinessInformation
|
|
51002
|
+
tags: [Business Agent]
|
|
51003
|
+
summary: Reset business information
|
|
51004
|
+
security: [{ bearerAuth: [] }]
|
|
51005
|
+
parameters:
|
|
51006
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51007
|
+
responses:
|
|
51008
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51009
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51010
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51011
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51012
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51013
|
+
/v1/accounts/{accountId}/business-agent/faqs:
|
|
51014
|
+
get:
|
|
51015
|
+
x-resource-group: "messages"
|
|
51016
|
+
operationId: listBusinessAgentFaqs
|
|
51017
|
+
tags: [Business Agent]
|
|
51018
|
+
summary: List FAQs
|
|
51019
|
+
security: [{ bearerAuth: [] }]
|
|
51020
|
+
parameters:
|
|
51021
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51022
|
+
responses:
|
|
51023
|
+
'200':
|
|
51024
|
+
description: FAQs
|
|
51025
|
+
content:
|
|
51026
|
+
application/json:
|
|
51027
|
+
schema:
|
|
51028
|
+
type: object
|
|
51029
|
+
required: [faqs]
|
|
51030
|
+
properties:
|
|
51031
|
+
faqs:
|
|
51032
|
+
type: array
|
|
51033
|
+
items: { $ref: '#/components/schemas/BusinessAgentFaq' }
|
|
51034
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51035
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51036
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51037
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51038
|
+
post:
|
|
51039
|
+
x-resource-group: "messages"
|
|
51040
|
+
operationId: createBusinessAgentFaq
|
|
51041
|
+
tags: [Business Agent]
|
|
51042
|
+
summary: Create a FAQ
|
|
51043
|
+
description: 'One specific question per entry; beyond a few hundred entries retrieval quality drops. Not idempotent.'
|
|
51044
|
+
security: [{ bearerAuth: [] }]
|
|
51045
|
+
parameters:
|
|
51046
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51047
|
+
requestBody:
|
|
51048
|
+
required: true
|
|
51049
|
+
content:
|
|
51050
|
+
application/json:
|
|
51051
|
+
schema: { $ref: '#/components/schemas/BusinessAgentFaqInput' }
|
|
51052
|
+
responses:
|
|
51053
|
+
'201':
|
|
51054
|
+
description: FAQ created
|
|
51055
|
+
content:
|
|
51056
|
+
application/json:
|
|
51057
|
+
schema: { $ref: '#/components/schemas/BusinessAgentFaq' }
|
|
51058
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51059
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51060
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51061
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51062
|
+
'409': { description: 'Meta rejected the entry (code business_agent_conflict).' }
|
|
51063
|
+
/v1/accounts/{accountId}/business-agent/faqs/{faqId}:
|
|
51064
|
+
get:
|
|
51065
|
+
x-resource-group: "messages"
|
|
51066
|
+
operationId: getBusinessAgentFaq
|
|
51067
|
+
tags: [Business Agent]
|
|
51068
|
+
summary: Get a FAQ
|
|
51069
|
+
security: [{ bearerAuth: [] }]
|
|
51070
|
+
parameters:
|
|
51071
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51072
|
+
- { name: faqId, in: path, required: true, schema: { type: string } }
|
|
51073
|
+
responses:
|
|
51074
|
+
'200':
|
|
51075
|
+
description: FAQ
|
|
51076
|
+
content:
|
|
51077
|
+
application/json:
|
|
51078
|
+
schema: { $ref: '#/components/schemas/BusinessAgentFaq' }
|
|
51079
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51080
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51081
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51082
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51083
|
+
put:
|
|
51084
|
+
x-resource-group: "messages"
|
|
51085
|
+
operationId: updateBusinessAgentFaq
|
|
51086
|
+
tags: [Business Agent]
|
|
51087
|
+
summary: Update a FAQ
|
|
51088
|
+
security: [{ bearerAuth: [] }]
|
|
51089
|
+
parameters:
|
|
51090
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51091
|
+
- { name: faqId, in: path, required: true, schema: { type: string } }
|
|
51092
|
+
requestBody:
|
|
51093
|
+
required: true
|
|
51094
|
+
content:
|
|
51095
|
+
application/json:
|
|
51096
|
+
schema: { $ref: '#/components/schemas/BusinessAgentFaqInput' }
|
|
51097
|
+
responses:
|
|
51098
|
+
'200':
|
|
51099
|
+
description: FAQ updated
|
|
51100
|
+
content:
|
|
51101
|
+
application/json:
|
|
51102
|
+
schema: { $ref: '#/components/schemas/BusinessAgentFaq' }
|
|
51103
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51104
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51105
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51106
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51107
|
+
delete:
|
|
51108
|
+
x-resource-group: "messages"
|
|
51109
|
+
operationId: deleteBusinessAgentFaq
|
|
51110
|
+
tags: [Business Agent]
|
|
51111
|
+
summary: Delete a FAQ
|
|
51112
|
+
security: [{ bearerAuth: [] }]
|
|
51113
|
+
parameters:
|
|
51114
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51115
|
+
- { name: faqId, in: path, required: true, schema: { type: string } }
|
|
51116
|
+
responses:
|
|
51117
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51118
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51119
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51120
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51121
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51122
|
+
/v1/accounts/{accountId}/business-agent/websites:
|
|
51123
|
+
get:
|
|
51124
|
+
x-resource-group: "messages"
|
|
51125
|
+
operationId: listBusinessAgentWebsites
|
|
51126
|
+
tags: [Business Agent]
|
|
51127
|
+
summary: List crawled websites
|
|
51128
|
+
security: [{ bearerAuth: [] }]
|
|
51129
|
+
parameters:
|
|
51130
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51131
|
+
responses:
|
|
51132
|
+
'200':
|
|
51133
|
+
description: Websites
|
|
51134
|
+
content:
|
|
51135
|
+
application/json:
|
|
51136
|
+
schema:
|
|
51137
|
+
type: object
|
|
51138
|
+
required: [websites]
|
|
51139
|
+
properties:
|
|
51140
|
+
websites:
|
|
51141
|
+
type: array
|
|
51142
|
+
items: { $ref: '#/components/schemas/BusinessAgentWebsite' }
|
|
51143
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51144
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51145
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51146
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51147
|
+
post:
|
|
51148
|
+
x-resource-group: "messages"
|
|
51149
|
+
operationId: addBusinessAgentWebsite
|
|
51150
|
+
tags: [Business Agent]
|
|
51151
|
+
summary: Add a website to crawl
|
|
51152
|
+
description: 'Meta crawls the site into the agent knowledge and recrawls it periodically; check `crawl_status` and `crawl_error` on read. Not idempotent.'
|
|
51153
|
+
security: [{ bearerAuth: [] }]
|
|
51154
|
+
parameters:
|
|
51155
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51156
|
+
requestBody:
|
|
51157
|
+
required: true
|
|
51158
|
+
content:
|
|
51159
|
+
application/json:
|
|
51160
|
+
schema: { $ref: '#/components/schemas/BusinessAgentWebsiteInput' }
|
|
51161
|
+
responses:
|
|
51162
|
+
'201':
|
|
51163
|
+
description: Website added
|
|
51164
|
+
content:
|
|
51165
|
+
application/json:
|
|
51166
|
+
schema: { $ref: '#/components/schemas/BusinessAgentWebsite' }
|
|
51167
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51168
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51169
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51170
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51171
|
+
/v1/accounts/{accountId}/business-agent/websites/{websiteId}:
|
|
51172
|
+
get:
|
|
51173
|
+
x-resource-group: "messages"
|
|
51174
|
+
operationId: getBusinessAgentWebsite
|
|
51175
|
+
tags: [Business Agent]
|
|
51176
|
+
summary: Get a crawled website
|
|
51177
|
+
security: [{ bearerAuth: [] }]
|
|
51178
|
+
parameters:
|
|
51179
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51180
|
+
- { name: websiteId, in: path, required: true, schema: { type: string } }
|
|
51181
|
+
responses:
|
|
51182
|
+
'200':
|
|
51183
|
+
description: Website
|
|
51184
|
+
content:
|
|
51185
|
+
application/json:
|
|
51186
|
+
schema: { $ref: '#/components/schemas/BusinessAgentWebsite' }
|
|
51187
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51188
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51189
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51190
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51191
|
+
put:
|
|
51192
|
+
x-resource-group: "messages"
|
|
51193
|
+
operationId: updateBusinessAgentWebsite
|
|
51194
|
+
tags: [Business Agent]
|
|
51195
|
+
summary: Update a crawled website
|
|
51196
|
+
security: [{ bearerAuth: [] }]
|
|
51197
|
+
parameters:
|
|
51198
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51199
|
+
- { name: websiteId, in: path, required: true, schema: { type: string } }
|
|
51200
|
+
requestBody:
|
|
51201
|
+
required: true
|
|
51202
|
+
content:
|
|
51203
|
+
application/json:
|
|
51204
|
+
schema: { $ref: '#/components/schemas/BusinessAgentWebsiteInput' }
|
|
51205
|
+
responses:
|
|
51206
|
+
'200':
|
|
51207
|
+
description: Website updated
|
|
51208
|
+
content:
|
|
51209
|
+
application/json:
|
|
51210
|
+
schema: { $ref: '#/components/schemas/BusinessAgentWebsite' }
|
|
51211
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51212
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51213
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51214
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51215
|
+
delete:
|
|
51216
|
+
x-resource-group: "messages"
|
|
51217
|
+
operationId: deleteBusinessAgentWebsite
|
|
51218
|
+
tags: [Business Agent]
|
|
51219
|
+
summary: Remove a crawled website
|
|
51220
|
+
security: [{ bearerAuth: [] }]
|
|
51221
|
+
parameters:
|
|
51222
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51223
|
+
- { name: websiteId, in: path, required: true, schema: { type: string } }
|
|
51224
|
+
responses:
|
|
51225
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51226
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51227
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51228
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51229
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51230
|
+
/v1/accounts/{accountId}/business-agent/files:
|
|
51231
|
+
get:
|
|
51232
|
+
x-resource-group: "messages"
|
|
51233
|
+
operationId: listBusinessAgentFiles
|
|
51234
|
+
tags: [Business Agent]
|
|
51235
|
+
summary: List knowledge files
|
|
51236
|
+
security: [{ bearerAuth: [] }]
|
|
51237
|
+
parameters:
|
|
51238
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51239
|
+
responses:
|
|
51240
|
+
'200':
|
|
51241
|
+
description: Files
|
|
51242
|
+
content:
|
|
51243
|
+
application/json:
|
|
51244
|
+
schema:
|
|
51245
|
+
type: object
|
|
51246
|
+
required: [files]
|
|
51247
|
+
properties:
|
|
51248
|
+
files:
|
|
51249
|
+
type: array
|
|
51250
|
+
items: { $ref: '#/components/schemas/BusinessAgentKnowledgeFile' }
|
|
51251
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51252
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51253
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51254
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51255
|
+
post:
|
|
51256
|
+
x-resource-group: "messages"
|
|
51257
|
+
operationId: uploadBusinessAgentFile
|
|
51258
|
+
tags: [Business Agent]
|
|
51259
|
+
summary: Upload a knowledge file
|
|
51260
|
+
description: |
|
|
51261
|
+
Accepted types: pdf, doc, docx, png, jpg, jpeg, plus csv and xlsx when Meta enabled
|
|
51262
|
+
extraction on the asset. Meta's limit is 100 MB. Two ways to send the file:
|
|
51263
|
+
- JSON `{ url, fileName }`: Zernio downloads the file (public https URL, no redirects,
|
|
51264
|
+
capped at 100 MB) and forwards it. Use this for anything above a few megabytes.
|
|
51265
|
+
- multipart form-data with a `file` part (and an optional `fileName`): bounded by the
|
|
51266
|
+
request body limit of about 4.5 MB; larger uploads must use the `url` form.
|
|
51267
|
+
Not idempotent.
|
|
51268
|
+
security: [{ bearerAuth: [] }]
|
|
51269
|
+
parameters:
|
|
51270
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51271
|
+
requestBody:
|
|
51272
|
+
required: true
|
|
51273
|
+
content:
|
|
51274
|
+
application/json:
|
|
51275
|
+
schema:
|
|
51276
|
+
type: object
|
|
51277
|
+
required: [url]
|
|
51278
|
+
properties:
|
|
51279
|
+
url: { type: string, format: uri, description: 'Publicly downloadable file URL.' }
|
|
51280
|
+
fileName: { type: string, description: 'Defaults to the last path segment of the URL.' }
|
|
51281
|
+
multipart/form-data:
|
|
51282
|
+
schema:
|
|
51283
|
+
type: object
|
|
51284
|
+
required: [file]
|
|
51285
|
+
properties:
|
|
51286
|
+
file: { type: string, format: binary }
|
|
51287
|
+
fileName: { type: string }
|
|
51288
|
+
responses:
|
|
51289
|
+
'201':
|
|
51290
|
+
description: File uploaded
|
|
51291
|
+
content:
|
|
51292
|
+
application/json:
|
|
51293
|
+
schema: { $ref: '#/components/schemas/BusinessAgentKnowledgeFile' }
|
|
51294
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51295
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51296
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51297
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51298
|
+
'413': { description: 'File larger than 100 MB (code payload_too_large). A multipart body above the request limit is rejected by the host before the route runs.' }
|
|
51299
|
+
/v1/accounts/{accountId}/business-agent/files/{fileId}:
|
|
51300
|
+
get:
|
|
51301
|
+
x-resource-group: "messages"
|
|
51302
|
+
operationId: getBusinessAgentFile
|
|
51303
|
+
tags: [Business Agent]
|
|
51304
|
+
summary: Get a knowledge file
|
|
51305
|
+
security: [{ bearerAuth: [] }]
|
|
51306
|
+
parameters:
|
|
51307
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51308
|
+
- { name: fileId, in: path, required: true, schema: { type: string } }
|
|
51309
|
+
responses:
|
|
51310
|
+
'200':
|
|
51311
|
+
description: File
|
|
51312
|
+
content:
|
|
51313
|
+
application/json:
|
|
51314
|
+
schema: { $ref: '#/components/schemas/BusinessAgentKnowledgeFile' }
|
|
51315
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51316
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51317
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51318
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51319
|
+
delete:
|
|
51320
|
+
x-resource-group: "messages"
|
|
51321
|
+
operationId: deleteBusinessAgentFile
|
|
51322
|
+
tags: [Business Agent]
|
|
51323
|
+
summary: Delete a knowledge file
|
|
51324
|
+
security: [{ bearerAuth: [] }]
|
|
51325
|
+
parameters:
|
|
51326
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51327
|
+
- { name: fileId, in: path, required: true, schema: { type: string } }
|
|
51328
|
+
responses:
|
|
51329
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51330
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51331
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51332
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51333
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51334
|
+
/v1/accounts/{accountId}/business-agent/skills:
|
|
51335
|
+
get:
|
|
51336
|
+
x-resource-group: "messages"
|
|
51337
|
+
operationId: listBusinessAgentSkills
|
|
51338
|
+
tags: [Business Agent]
|
|
51339
|
+
summary: List skills
|
|
51340
|
+
security: [{ bearerAuth: [] }]
|
|
51341
|
+
parameters:
|
|
51342
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51343
|
+
responses:
|
|
51344
|
+
'200':
|
|
51345
|
+
description: Skills
|
|
51346
|
+
content:
|
|
51347
|
+
application/json:
|
|
51348
|
+
schema:
|
|
51349
|
+
type: object
|
|
51350
|
+
required: [skills]
|
|
51351
|
+
properties:
|
|
51352
|
+
skills:
|
|
51353
|
+
type: array
|
|
51354
|
+
items: { $ref: '#/components/schemas/BusinessAgentSkill' }
|
|
51355
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51356
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51357
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51358
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51359
|
+
post:
|
|
51360
|
+
x-resource-group: "messages"
|
|
51361
|
+
operationId: createBusinessAgentSkill
|
|
51362
|
+
tags: [Business Agent]
|
|
51363
|
+
summary: Create a skill
|
|
51364
|
+
description: 'Behavioral instructions in the brand voice. Reads back `pending_review` until Meta content review passes it. Not idempotent.'
|
|
51365
|
+
security: [{ bearerAuth: [] }]
|
|
51366
|
+
parameters:
|
|
51367
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51368
|
+
requestBody:
|
|
51369
|
+
required: true
|
|
51370
|
+
content:
|
|
51371
|
+
application/json:
|
|
51372
|
+
schema: { $ref: '#/components/schemas/BusinessAgentSkillInput' }
|
|
51373
|
+
responses:
|
|
51374
|
+
'201':
|
|
51375
|
+
description: Skill created
|
|
51376
|
+
content:
|
|
51377
|
+
application/json:
|
|
51378
|
+
schema: { $ref: '#/components/schemas/BusinessAgentSkill' }
|
|
51379
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51380
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51381
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51382
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51383
|
+
/v1/accounts/{accountId}/business-agent/skills/{skillId}:
|
|
51384
|
+
get:
|
|
51385
|
+
x-resource-group: "messages"
|
|
51386
|
+
operationId: getBusinessAgentSkill
|
|
51387
|
+
tags: [Business Agent]
|
|
51388
|
+
summary: Get a skill
|
|
51389
|
+
security: [{ bearerAuth: [] }]
|
|
51390
|
+
parameters:
|
|
51391
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51392
|
+
- { name: skillId, in: path, required: true, schema: { type: string } }
|
|
51393
|
+
responses:
|
|
51394
|
+
'200':
|
|
51395
|
+
description: Skill
|
|
51396
|
+
content:
|
|
51397
|
+
application/json:
|
|
51398
|
+
schema: { $ref: '#/components/schemas/BusinessAgentSkill' }
|
|
51399
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51400
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51401
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51402
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51403
|
+
put:
|
|
51404
|
+
x-resource-group: "messages"
|
|
51405
|
+
operationId: updateBusinessAgentSkill
|
|
51406
|
+
tags: [Business Agent]
|
|
51407
|
+
summary: Update a skill
|
|
51408
|
+
security: [{ bearerAuth: [] }]
|
|
51409
|
+
parameters:
|
|
51410
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51411
|
+
- { name: skillId, in: path, required: true, schema: { type: string } }
|
|
51412
|
+
requestBody:
|
|
51413
|
+
required: true
|
|
51414
|
+
content:
|
|
51415
|
+
application/json:
|
|
51416
|
+
schema: { $ref: '#/components/schemas/BusinessAgentSkillInput' }
|
|
51417
|
+
responses:
|
|
51418
|
+
'200':
|
|
51419
|
+
description: Skill updated
|
|
51420
|
+
content:
|
|
51421
|
+
application/json:
|
|
51422
|
+
schema: { $ref: '#/components/schemas/BusinessAgentSkill' }
|
|
51423
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51424
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51425
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51426
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51427
|
+
delete:
|
|
51428
|
+
x-resource-group: "messages"
|
|
51429
|
+
operationId: deleteBusinessAgentSkill
|
|
51430
|
+
tags: [Business Agent]
|
|
51431
|
+
summary: Delete a skill
|
|
51432
|
+
security: [{ bearerAuth: [] }]
|
|
51433
|
+
parameters:
|
|
51434
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51435
|
+
- { name: skillId, in: path, required: true, schema: { type: string } }
|
|
51436
|
+
responses:
|
|
51437
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51438
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51439
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51440
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51441
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51442
|
+
/v1/accounts/{accountId}/business-agent/ui-skills:
|
|
51443
|
+
get:
|
|
51444
|
+
x-resource-group: "messages"
|
|
51445
|
+
operationId: listBusinessAgentUiSkills
|
|
51446
|
+
tags: [Business Agent]
|
|
51447
|
+
summary: List UI skills
|
|
51448
|
+
description: 'Cursor paged; follow `paging.cursors.after` until `paging.next` is absent.'
|
|
51449
|
+
security: [{ bearerAuth: [] }]
|
|
51450
|
+
parameters:
|
|
51451
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51452
|
+
- { name: before, in: query, required: false, schema: { type: string } }
|
|
51453
|
+
- { name: after, in: query, required: false, schema: { type: string } }
|
|
51454
|
+
- { name: limit, in: query, required: false, schema: { type: integer, minimum: 1, maximum: 100 } }
|
|
51455
|
+
responses:
|
|
51456
|
+
'200':
|
|
51457
|
+
description: UI skills
|
|
51458
|
+
content:
|
|
51459
|
+
application/json:
|
|
51460
|
+
schema:
|
|
51461
|
+
type: object
|
|
51462
|
+
required: [uiSkills]
|
|
51463
|
+
properties:
|
|
51464
|
+
uiSkills:
|
|
51465
|
+
type: array
|
|
51466
|
+
items: { $ref: '#/components/schemas/BusinessAgentUiSkill' }
|
|
51467
|
+
paging: { type: object, additionalProperties: true }
|
|
51468
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51469
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51470
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51471
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51472
|
+
post:
|
|
51473
|
+
x-resource-group: "messages"
|
|
51474
|
+
operationId: createBusinessAgentUiSkill
|
|
51475
|
+
tags: [Business Agent]
|
|
51476
|
+
summary: Create a UI skill
|
|
51477
|
+
description: 'Tells the agent when to send a rich component (CTA URL button, image, carousel, list, reply buttons, location, Flow) and what to put in it. Not idempotent.'
|
|
51478
|
+
security: [{ bearerAuth: [] }]
|
|
51479
|
+
parameters:
|
|
51480
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51481
|
+
requestBody:
|
|
51482
|
+
required: true
|
|
51483
|
+
content:
|
|
51484
|
+
application/json:
|
|
51485
|
+
schema: { $ref: '#/components/schemas/BusinessAgentUiSkillInput' }
|
|
51486
|
+
responses:
|
|
51487
|
+
'201':
|
|
51488
|
+
description: UI skill created
|
|
51489
|
+
content:
|
|
51490
|
+
application/json:
|
|
51491
|
+
schema: { $ref: '#/components/schemas/BusinessAgentUiSkill' }
|
|
51492
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51493
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51494
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51495
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51496
|
+
/v1/accounts/{accountId}/business-agent/ui-skills/{uiSkillId}:
|
|
51497
|
+
get:
|
|
51498
|
+
x-resource-group: "messages"
|
|
51499
|
+
operationId: getBusinessAgentUiSkill
|
|
51500
|
+
tags: [Business Agent]
|
|
51501
|
+
summary: Get a UI skill
|
|
51502
|
+
security: [{ bearerAuth: [] }]
|
|
51503
|
+
parameters:
|
|
51504
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51505
|
+
- { name: uiSkillId, in: path, required: true, schema: { type: string } }
|
|
51506
|
+
responses:
|
|
51507
|
+
'200':
|
|
51508
|
+
description: UI skill
|
|
51509
|
+
content:
|
|
51510
|
+
application/json:
|
|
51511
|
+
schema: { $ref: '#/components/schemas/BusinessAgentUiSkill' }
|
|
51512
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51513
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51514
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51515
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51516
|
+
put:
|
|
51517
|
+
x-resource-group: "messages"
|
|
51518
|
+
operationId: updateBusinessAgentUiSkill
|
|
51519
|
+
tags: [Business Agent]
|
|
51520
|
+
summary: Update a UI skill
|
|
51521
|
+
security: [{ bearerAuth: [] }]
|
|
51522
|
+
parameters:
|
|
51523
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51524
|
+
- { name: uiSkillId, in: path, required: true, schema: { type: string } }
|
|
51525
|
+
requestBody:
|
|
51526
|
+
required: true
|
|
51527
|
+
content:
|
|
51528
|
+
application/json:
|
|
51529
|
+
schema: { $ref: '#/components/schemas/BusinessAgentUiSkillInput' }
|
|
51530
|
+
responses:
|
|
51531
|
+
'200':
|
|
51532
|
+
description: UI skill updated
|
|
51533
|
+
content:
|
|
51534
|
+
application/json:
|
|
51535
|
+
schema: { $ref: '#/components/schemas/BusinessAgentUiSkill' }
|
|
51536
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51537
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51538
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51539
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51540
|
+
delete:
|
|
51541
|
+
x-resource-group: "messages"
|
|
51542
|
+
operationId: deleteBusinessAgentUiSkill
|
|
51543
|
+
tags: [Business Agent]
|
|
51544
|
+
summary: Delete a UI skill
|
|
51545
|
+
security: [{ bearerAuth: [] }]
|
|
51546
|
+
parameters:
|
|
51547
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51548
|
+
- { name: uiSkillId, in: path, required: true, schema: { type: string } }
|
|
51549
|
+
responses:
|
|
51550
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51551
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51552
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51553
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51554
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51555
|
+
/v1/accounts/{accountId}/business-agent/connectors:
|
|
51556
|
+
get:
|
|
51557
|
+
x-resource-group: "messages"
|
|
51558
|
+
operationId: listBusinessAgentConnectors
|
|
51559
|
+
tags: [Business Agent]
|
|
51560
|
+
summary: List connectors
|
|
51561
|
+
description: 'External APIs the agent may call. `connection_status` says whether Meta can currently reach each one.'
|
|
51562
|
+
security: [{ bearerAuth: [] }]
|
|
51563
|
+
parameters:
|
|
51564
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51565
|
+
responses:
|
|
51566
|
+
'200':
|
|
51567
|
+
description: Connectors
|
|
51568
|
+
content:
|
|
51569
|
+
application/json:
|
|
51570
|
+
schema:
|
|
51571
|
+
type: object
|
|
51572
|
+
required: [connectors]
|
|
51573
|
+
properties:
|
|
51574
|
+
connectors:
|
|
51575
|
+
type: array
|
|
51576
|
+
items: { $ref: '#/components/schemas/BusinessAgentConnector' }
|
|
51577
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51578
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51579
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51580
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51581
|
+
post:
|
|
51582
|
+
x-resource-group: "messages"
|
|
51583
|
+
operationId: createBusinessAgentConnector
|
|
51584
|
+
tags: [Business Agent]
|
|
51585
|
+
summary: Create a connector
|
|
51586
|
+
description: 'Base URL plus how to authenticate (OAuth client credentials, API key or none). Names are unique per number. Not idempotent.'
|
|
51587
|
+
security: [{ bearerAuth: [] }]
|
|
51588
|
+
parameters:
|
|
51589
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51590
|
+
requestBody:
|
|
51591
|
+
required: true
|
|
51592
|
+
content:
|
|
51593
|
+
application/json:
|
|
51594
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnectorInput' }
|
|
51595
|
+
responses:
|
|
51596
|
+
'201':
|
|
51597
|
+
description: Connector created
|
|
51598
|
+
content:
|
|
51599
|
+
application/json:
|
|
51600
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnector' }
|
|
51601
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51602
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51603
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51604
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51605
|
+
'409': { description: 'A connector with that name already exists (code business_agent_conflict).' }
|
|
51606
|
+
/v1/accounts/{accountId}/business-agent/connectors/{connectorId}:
|
|
51607
|
+
get:
|
|
51608
|
+
x-resource-group: "messages"
|
|
51609
|
+
operationId: getBusinessAgentConnector
|
|
51610
|
+
tags: [Business Agent]
|
|
51611
|
+
summary: Get a connector
|
|
51612
|
+
security: [{ bearerAuth: [] }]
|
|
51613
|
+
parameters:
|
|
51614
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51615
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51616
|
+
responses:
|
|
51617
|
+
'200':
|
|
51618
|
+
description: Connector
|
|
51619
|
+
content:
|
|
51620
|
+
application/json:
|
|
51621
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnector' }
|
|
51622
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51623
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51624
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51625
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51626
|
+
put:
|
|
51627
|
+
x-resource-group: "messages"
|
|
51628
|
+
operationId: updateBusinessAgentConnector
|
|
51629
|
+
tags: [Business Agent]
|
|
51630
|
+
summary: Update a connector
|
|
51631
|
+
security: [{ bearerAuth: [] }]
|
|
51632
|
+
parameters:
|
|
51633
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51634
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51635
|
+
requestBody:
|
|
51636
|
+
required: true
|
|
51637
|
+
content:
|
|
51638
|
+
application/json:
|
|
51639
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnectorInput' }
|
|
51640
|
+
responses:
|
|
51641
|
+
'200':
|
|
51642
|
+
description: Connector updated
|
|
51643
|
+
content:
|
|
51644
|
+
application/json:
|
|
51645
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnector' }
|
|
51646
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51647
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51648
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51649
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51650
|
+
delete:
|
|
51651
|
+
x-resource-group: "messages"
|
|
51652
|
+
operationId: deleteBusinessAgentConnector
|
|
51653
|
+
tags: [Business Agent]
|
|
51654
|
+
summary: Delete a connector
|
|
51655
|
+
security: [{ bearerAuth: [] }]
|
|
51656
|
+
parameters:
|
|
51657
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51658
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51659
|
+
responses:
|
|
51660
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51661
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51662
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51663
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51664
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51665
|
+
/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/credentials:
|
|
51666
|
+
post:
|
|
51667
|
+
x-resource-group: "messages"
|
|
51668
|
+
operationId: setBusinessAgentConnectorCredentials
|
|
51669
|
+
tags: [Business Agent]
|
|
51670
|
+
summary: Set connector credentials
|
|
51671
|
+
description: |
|
|
51672
|
+
Set or rotate the connector's credentials in place: `kind: api_key`, `kind: oauth`
|
|
51673
|
+
(client credentials) or `kind: certificate` (mTLS client certificate). Meta has no call
|
|
51674
|
+
that removes a credential layer; change the connector's `auth_type` or delete it instead.
|
|
51675
|
+
security: [{ bearerAuth: [] }]
|
|
51676
|
+
parameters:
|
|
51677
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51678
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51679
|
+
requestBody:
|
|
51680
|
+
required: true
|
|
51681
|
+
content:
|
|
51682
|
+
application/json:
|
|
51683
|
+
schema:
|
|
51684
|
+
oneOf:
|
|
51685
|
+
- type: object
|
|
51686
|
+
required: [kind, api_key_config]
|
|
51687
|
+
properties:
|
|
51688
|
+
kind: { type: string, enum: [api_key] }
|
|
51689
|
+
api_key_config: { $ref: '#/components/schemas/BusinessAgentApiKeyConfig' }
|
|
51690
|
+
- type: object
|
|
51691
|
+
required: [kind, oauth_config]
|
|
51692
|
+
properties:
|
|
51693
|
+
kind: { type: string, enum: [oauth] }
|
|
51694
|
+
oauth_config: { $ref: '#/components/schemas/BusinessAgentOAuthClientCredentials' }
|
|
51695
|
+
- type: object
|
|
51696
|
+
required: [kind, client_certificate, client_key]
|
|
51697
|
+
properties:
|
|
51698
|
+
kind: { type: string, enum: [certificate] }
|
|
51699
|
+
client_certificate: { type: string, description: 'PEM.' }
|
|
51700
|
+
client_key: { type: string, description: 'PEM.' }
|
|
51701
|
+
ca_certificate: { type: string, description: 'PEM.' }
|
|
51702
|
+
responses:
|
|
51703
|
+
'200':
|
|
51704
|
+
description: Connector with the new credential metadata
|
|
51705
|
+
content:
|
|
51706
|
+
application/json:
|
|
51707
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnector' }
|
|
51708
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51709
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51710
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51711
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51712
|
+
/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/refresh-tools:
|
|
51713
|
+
post:
|
|
51714
|
+
x-resource-group: "messages"
|
|
51715
|
+
operationId: refreshBusinessAgentConnectorTools
|
|
51716
|
+
tags: [Business Agent]
|
|
51717
|
+
summary: Refresh MCP connector tools
|
|
51718
|
+
description: 'Re-discovers the tools of an MCP connector. A failed discovery keeps the previous tool set and reports an ERROR sync status inside a 200.'
|
|
51719
|
+
security: [{ bearerAuth: [] }]
|
|
51720
|
+
parameters:
|
|
51721
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51722
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51723
|
+
responses:
|
|
51724
|
+
'200':
|
|
51725
|
+
description: Connector with updated tool sync metadata
|
|
51726
|
+
content:
|
|
51727
|
+
application/json:
|
|
51728
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnector' }
|
|
51729
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51730
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51731
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51732
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51733
|
+
/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/logs:
|
|
51734
|
+
get:
|
|
51735
|
+
x-resource-group: "messages"
|
|
51736
|
+
operationId: getBusinessAgentConnectorLogs
|
|
51737
|
+
tags: [Business Agent]
|
|
51738
|
+
summary: Get connector failure logs
|
|
51739
|
+
description: 'Third-party failures over the last 7 days (window at most 7 days, default the last 24 hours). Each entry carries `failure_code_name` and `error_message`.'
|
|
51740
|
+
security: [{ bearerAuth: [] }]
|
|
51741
|
+
parameters:
|
|
51742
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51743
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51744
|
+
- { name: startTime, in: query, required: false, schema: { type: integer }, description: 'Unix seconds.' }
|
|
51745
|
+
- { name: endTime, in: query, required: false, schema: { type: integer }, description: 'Unix seconds.' }
|
|
51746
|
+
- { name: limit, in: query, required: false, schema: { type: integer, minimum: 1, maximum: 1000 } }
|
|
51747
|
+
- { name: toolId, in: query, required: false, schema: { type: string } }
|
|
51748
|
+
- { name: includeStats, in: query, required: false, schema: { type: boolean }, description: 'Add success rate and latency percentiles.' }
|
|
51749
|
+
- { name: summaryOnly, in: query, required: false, schema: { type: boolean }, description: 'Aggregate failure patterns instead of entries.' }
|
|
51750
|
+
- { name: topN, in: query, required: false, schema: { type: integer, minimum: 1, maximum: 50 } }
|
|
51751
|
+
responses:
|
|
51752
|
+
'200':
|
|
51753
|
+
description: Logs
|
|
51754
|
+
content:
|
|
51755
|
+
application/json:
|
|
51756
|
+
schema:
|
|
51757
|
+
type: object
|
|
51758
|
+
properties:
|
|
51759
|
+
data: { type: array, items: { type: object, additionalProperties: true } }
|
|
51760
|
+
stats: { type: object, additionalProperties: true }
|
|
51761
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51762
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51763
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51764
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51765
|
+
/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools:
|
|
51766
|
+
get:
|
|
51767
|
+
x-resource-group: "messages"
|
|
51768
|
+
operationId: listBusinessAgentConnectorTools
|
|
51769
|
+
tags: [Business Agent]
|
|
51770
|
+
summary: List connector tools
|
|
51771
|
+
security: [{ bearerAuth: [] }]
|
|
51772
|
+
parameters:
|
|
51773
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51774
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51775
|
+
responses:
|
|
51776
|
+
'200':
|
|
51777
|
+
description: Tools
|
|
51778
|
+
content:
|
|
51779
|
+
application/json:
|
|
51780
|
+
schema:
|
|
51781
|
+
type: object
|
|
51782
|
+
required: [tools]
|
|
51783
|
+
properties:
|
|
51784
|
+
tools:
|
|
51785
|
+
type: array
|
|
51786
|
+
items: { $ref: '#/components/schemas/BusinessAgentConnectorTool' }
|
|
51787
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51788
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51789
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51790
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51791
|
+
post:
|
|
51792
|
+
x-resource-group: "messages"
|
|
51793
|
+
operationId: createBusinessAgentConnectorTool
|
|
51794
|
+
tags: [Business Agent]
|
|
51795
|
+
summary: Create a connector tool
|
|
51796
|
+
description: 'One operation on the connector, with the request definition Meta uses to build the outbound call from the conversation. Type the body params explicitly. Not idempotent.'
|
|
51797
|
+
security: [{ bearerAuth: [] }]
|
|
51798
|
+
parameters:
|
|
51799
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51800
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51801
|
+
requestBody:
|
|
51802
|
+
required: true
|
|
51803
|
+
content:
|
|
51804
|
+
application/json:
|
|
51805
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnectorToolInput' }
|
|
51806
|
+
responses:
|
|
51807
|
+
'201':
|
|
51808
|
+
description: Tool created
|
|
51809
|
+
content:
|
|
51810
|
+
application/json:
|
|
51811
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnectorTool' }
|
|
51812
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51813
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51814
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51815
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51816
|
+
/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools/{toolId}:
|
|
51817
|
+
get:
|
|
51818
|
+
x-resource-group: "messages"
|
|
51819
|
+
operationId: getBusinessAgentConnectorTool
|
|
51820
|
+
tags: [Business Agent]
|
|
51821
|
+
summary: Get a connector tool
|
|
51822
|
+
security: [{ bearerAuth: [] }]
|
|
51823
|
+
parameters:
|
|
51824
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51825
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51826
|
+
- $ref: '#/components/parameters/BusinessAgentToolId'
|
|
51827
|
+
responses:
|
|
51828
|
+
'200':
|
|
51829
|
+
description: Tool
|
|
51830
|
+
content:
|
|
51831
|
+
application/json:
|
|
51832
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnectorTool' }
|
|
51833
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51834
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51835
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51836
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51837
|
+
put:
|
|
51838
|
+
x-resource-group: "messages"
|
|
51839
|
+
operationId: updateBusinessAgentConnectorTool
|
|
51840
|
+
tags: [Business Agent]
|
|
51841
|
+
summary: Update a connector tool
|
|
51842
|
+
security: [{ bearerAuth: [] }]
|
|
51843
|
+
parameters:
|
|
51844
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51845
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51846
|
+
- $ref: '#/components/parameters/BusinessAgentToolId'
|
|
51847
|
+
requestBody:
|
|
51848
|
+
required: true
|
|
51849
|
+
content:
|
|
51850
|
+
application/json:
|
|
51851
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnectorToolInput' }
|
|
51852
|
+
responses:
|
|
51853
|
+
'200':
|
|
51854
|
+
description: Tool updated
|
|
51855
|
+
content:
|
|
51856
|
+
application/json:
|
|
51857
|
+
schema: { $ref: '#/components/schemas/BusinessAgentConnectorTool' }
|
|
51858
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51859
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51860
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51861
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51862
|
+
delete:
|
|
51863
|
+
x-resource-group: "messages"
|
|
51864
|
+
operationId: deleteBusinessAgentConnectorTool
|
|
51865
|
+
tags: [Business Agent]
|
|
51866
|
+
summary: Delete a connector tool
|
|
51867
|
+
security: [{ bearerAuth: [] }]
|
|
51868
|
+
parameters:
|
|
51869
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51870
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51871
|
+
- $ref: '#/components/parameters/BusinessAgentToolId'
|
|
51872
|
+
responses:
|
|
51873
|
+
'200': { $ref: '#/components/responses/BusinessAgentDeleted' }
|
|
51874
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51875
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51876
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51877
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51878
|
+
/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools/{toolId}/run:
|
|
51879
|
+
post:
|
|
51880
|
+
x-resource-group: "messages"
|
|
51881
|
+
operationId: runBusinessAgentConnectorTool
|
|
51882
|
+
tags: [Business Agent]
|
|
51883
|
+
summary: Run a connector tool once
|
|
51884
|
+
description: 'Executes the tool against the merchant API and returns the raw upstream result, to check a connector before the agent relies on it.'
|
|
51885
|
+
security: [{ bearerAuth: [] }]
|
|
51886
|
+
parameters:
|
|
51887
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51888
|
+
- $ref: '#/components/parameters/BusinessAgentConnectorId'
|
|
51889
|
+
- $ref: '#/components/parameters/BusinessAgentToolId'
|
|
51890
|
+
requestBody:
|
|
51891
|
+
required: true
|
|
51892
|
+
content:
|
|
51893
|
+
application/json:
|
|
51894
|
+
schema:
|
|
51895
|
+
type: object
|
|
51896
|
+
required: [input]
|
|
51897
|
+
properties:
|
|
51898
|
+
input: { type: string, description: 'JSON string with the tool arguments.' }
|
|
51899
|
+
responses:
|
|
51900
|
+
'200':
|
|
51901
|
+
description: Tool result
|
|
51902
|
+
content:
|
|
51903
|
+
application/json:
|
|
51904
|
+
schema:
|
|
51905
|
+
type: object
|
|
51906
|
+
properties:
|
|
51907
|
+
output: { type: string }
|
|
51908
|
+
status: { type: string }
|
|
51909
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51910
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51911
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51912
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51913
|
+
/v1/accounts/{accountId}/business-agent/budget:
|
|
51914
|
+
get:
|
|
51915
|
+
x-resource-group: "messages"
|
|
51916
|
+
operationId: getBusinessAgentBudget
|
|
51917
|
+
tags: [Business Agent]
|
|
51918
|
+
summary: Get usage budgets
|
|
51919
|
+
description: 'Caps over rolling windows for the Business Manager that owns the number. An empty list means unlimited.'
|
|
51920
|
+
security: [{ bearerAuth: [] }]
|
|
51921
|
+
parameters:
|
|
51922
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51923
|
+
responses:
|
|
51924
|
+
'200':
|
|
51925
|
+
description: Budgets
|
|
51926
|
+
content:
|
|
51927
|
+
application/json:
|
|
51928
|
+
schema:
|
|
51929
|
+
type: object
|
|
51930
|
+
required: [budgets]
|
|
51931
|
+
properties:
|
|
51932
|
+
budgets:
|
|
51933
|
+
type: array
|
|
51934
|
+
items: { $ref: '#/components/schemas/BusinessAgentBudget' }
|
|
51935
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51936
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51937
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51938
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51939
|
+
put:
|
|
51940
|
+
x-resource-group: "messages"
|
|
51941
|
+
operationId: replaceBusinessAgentBudget
|
|
51942
|
+
tags: [Business Agent]
|
|
51943
|
+
summary: Replace usage budgets
|
|
51944
|
+
description: 'The full desired set: budgets left out are removed, an empty list returns to unlimited. Pass `budget_id` to edit one in place. When a cap is hit the agent finishes its turn, stops answering and hands the thread to a human until the window rolls over.'
|
|
51945
|
+
security: [{ bearerAuth: [] }]
|
|
51946
|
+
parameters:
|
|
51947
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51948
|
+
requestBody:
|
|
51949
|
+
required: true
|
|
51950
|
+
content:
|
|
51951
|
+
application/json:
|
|
51952
|
+
schema:
|
|
51953
|
+
type: object
|
|
51954
|
+
required: [budgets]
|
|
51955
|
+
properties:
|
|
51956
|
+
budgets:
|
|
51957
|
+
type: array
|
|
51958
|
+
items: { $ref: '#/components/schemas/BusinessAgentBudget' }
|
|
51959
|
+
responses:
|
|
51960
|
+
'200':
|
|
51961
|
+
description: Budgets after the update
|
|
51962
|
+
content:
|
|
51963
|
+
application/json:
|
|
51964
|
+
schema:
|
|
51965
|
+
type: object
|
|
51966
|
+
required: [budgets]
|
|
51967
|
+
properties:
|
|
51968
|
+
budgets:
|
|
51969
|
+
type: array
|
|
51970
|
+
items: { $ref: '#/components/schemas/BusinessAgentBudget' }
|
|
51971
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
51972
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
51973
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
51974
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
51975
|
+
/v1/accounts/{accountId}/business-agent/test-messages:
|
|
51976
|
+
post:
|
|
51977
|
+
x-resource-group: "messages"
|
|
51978
|
+
operationId: sendBusinessAgentTestMessage
|
|
51979
|
+
tags: [Business Agent]
|
|
51980
|
+
summary: Send a test message
|
|
51981
|
+
description: 'Runs the message through the full agent pipeline in Meta sandbox with no WhatsApp user and no token billing. Pass back `conversationId` to continue a thread. Meta rate-limits it per number per hour.'
|
|
51982
|
+
security: [{ bearerAuth: [] }]
|
|
51983
|
+
parameters:
|
|
51984
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
51985
|
+
requestBody:
|
|
51986
|
+
required: true
|
|
51987
|
+
content:
|
|
51988
|
+
application/json:
|
|
51989
|
+
schema:
|
|
51990
|
+
type: object
|
|
51991
|
+
required: [message]
|
|
51992
|
+
properties:
|
|
51993
|
+
message: { type: string, maxLength: 4096 }
|
|
51994
|
+
conversationId: { type: string }
|
|
51995
|
+
responses:
|
|
51996
|
+
'200':
|
|
51997
|
+
description: Agent reply
|
|
51998
|
+
content:
|
|
51999
|
+
application/json:
|
|
52000
|
+
schema: { $ref: '#/components/schemas/BusinessAgentTestMessageResponse' }
|
|
52001
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
52002
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
52003
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
52004
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
52005
|
+
'429': { description: 'Meta hourly test-message limit reached (code rate_limited, Retry-After when known).' }
|
|
52006
|
+
/v1/accounts/{accountId}/business-agent/events:
|
|
52007
|
+
post:
|
|
52008
|
+
x-resource-group: "messages"
|
|
52009
|
+
operationId: sendBusinessAgentEvent
|
|
52010
|
+
tags: [Business Agent]
|
|
52011
|
+
summary: Send a business event
|
|
52012
|
+
description: 'Tell the agent something happened in your systems (order shipped, document verified) so it messages the consumer about it. The consumer must already have a conversation with the number. Answers 202 with the event id; poll it for the outcome.'
|
|
52013
|
+
security: [{ bearerAuth: [] }]
|
|
52014
|
+
parameters:
|
|
52015
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
52016
|
+
requestBody:
|
|
52017
|
+
required: true
|
|
52018
|
+
content:
|
|
52019
|
+
application/json:
|
|
52020
|
+
schema:
|
|
52021
|
+
type: object
|
|
52022
|
+
required: [to, type, description, payload]
|
|
52023
|
+
properties:
|
|
52024
|
+
to: { type: string, description: 'Consumer E.164 phone number.', example: '+34600000000' }
|
|
52025
|
+
type: { type: string, maxLength: 256, example: order_shipped }
|
|
52026
|
+
description: { type: string, maxLength: 1024 }
|
|
52027
|
+
payload: { type: string, maxLength: 4096, description: 'JSON string passed to the agent verbatim.' }
|
|
52028
|
+
responses:
|
|
52029
|
+
'202':
|
|
52030
|
+
description: Event accepted
|
|
52031
|
+
content:
|
|
52032
|
+
application/json:
|
|
52033
|
+
schema:
|
|
52034
|
+
type: object
|
|
52035
|
+
required: [status]
|
|
52036
|
+
properties:
|
|
52037
|
+
status: { type: string, example: accepted }
|
|
52038
|
+
agent_event_id: { type: string }
|
|
52039
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
52040
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
52041
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
52042
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
52043
|
+
/v1/accounts/{accountId}/business-agent/events/{eventId}:
|
|
52044
|
+
get:
|
|
52045
|
+
x-resource-group: "messages"
|
|
52046
|
+
operationId: getBusinessAgentEvent
|
|
52047
|
+
tags: [Business Agent]
|
|
52048
|
+
summary: Get a business event status
|
|
52049
|
+
security: [{ bearerAuth: [] }]
|
|
52050
|
+
parameters:
|
|
52051
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
52052
|
+
- { name: eventId, in: path, required: true, schema: { type: string } }
|
|
52053
|
+
responses:
|
|
52054
|
+
'200':
|
|
52055
|
+
description: Event status
|
|
52056
|
+
content:
|
|
52057
|
+
application/json:
|
|
52058
|
+
schema: { $ref: '#/components/schemas/BusinessAgentEventStatus' }
|
|
52059
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
52060
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
52061
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
52062
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
52063
|
+
/v1/accounts/{accountId}/business-agent/evals:
|
|
52064
|
+
get:
|
|
52065
|
+
x-resource-group: "messages"
|
|
52066
|
+
operationId: readBusinessAgentEvals
|
|
52067
|
+
tags: [Business Agent]
|
|
52068
|
+
summary: Read evaluation data
|
|
52069
|
+
description: |
|
|
52070
|
+
Without query parameters, lists the evaluation scenarios (`eval_cases`). With `jobId`,
|
|
52071
|
+
polls a run started with POST. With `summaryIds`, returns the aggregated insight reports.
|
|
52072
|
+
With `evalIds`, returns per-conversation evaluation details. One of the three at a time.
|
|
52073
|
+
security: [{ bearerAuth: [] }]
|
|
52074
|
+
parameters:
|
|
52075
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
52076
|
+
- { name: jobId, in: query, required: false, schema: { type: string } }
|
|
52077
|
+
- { name: summaryIds, in: query, required: false, schema: { type: string }, description: 'Comma-separated summary ids.' }
|
|
52078
|
+
- { name: evalIds, in: query, required: false, schema: { type: string }, description: 'Comma-separated evaluation ids.' }
|
|
52079
|
+
responses:
|
|
52080
|
+
'200':
|
|
52081
|
+
description: Evaluation data as Meta returns it for the selected read
|
|
52082
|
+
content:
|
|
52083
|
+
application/json:
|
|
52084
|
+
schema: { type: object, additionalProperties: true }
|
|
52085
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
52086
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
52087
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
52088
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
52089
|
+
post:
|
|
52090
|
+
x-resource-group: "messages"
|
|
52091
|
+
operationId: startBusinessAgentEvalRun
|
|
52092
|
+
tags: [Business Agent]
|
|
52093
|
+
summary: Start an evaluation run
|
|
52094
|
+
description: 'Simulates the given scenarios against the agent and scores them. Answers 202 with a `job_id` to poll with GET.'
|
|
52095
|
+
security: [{ bearerAuth: [] }]
|
|
52096
|
+
parameters:
|
|
52097
|
+
- $ref: '#/components/parameters/BusinessAgentAccountId'
|
|
52098
|
+
requestBody:
|
|
52099
|
+
required: true
|
|
52100
|
+
content:
|
|
52101
|
+
application/json:
|
|
52102
|
+
schema:
|
|
52103
|
+
type: object
|
|
52104
|
+
required: [evalCaseIds]
|
|
52105
|
+
properties:
|
|
52106
|
+
evalCaseIds: { type: array, items: { type: string }, minItems: 1, maxItems: 100 }
|
|
52107
|
+
responses:
|
|
52108
|
+
'202':
|
|
52109
|
+
description: Run started
|
|
52110
|
+
content:
|
|
52111
|
+
application/json:
|
|
52112
|
+
schema:
|
|
52113
|
+
type: object
|
|
52114
|
+
required: [job_id, status]
|
|
52115
|
+
properties:
|
|
52116
|
+
job_id: { type: string }
|
|
52117
|
+
status: { type: string, example: RUNNING }
|
|
52118
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
52119
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
52120
|
+
'403': { $ref: '#/components/responses/BusinessAgentForbidden' }
|
|
52121
|
+
'404': { $ref: '#/components/responses/BusinessAgentNotFound' }
|
|
50459
52122
|
/v1/accounts/{accountId}/tracking-tags:
|
|
50460
52123
|
get:
|
|
50461
52124
|
x-resource-group: "ads"
|