Give the Assistant Authoritative Context
Provide these sources with the implementation request:- The OpenAPI definition for machine-readable routes and schemas.
- Authentication for scopes, idempotency, status codes, and retry behavior.
- The workflow guide for conversations, custom tools, or WhatsApp templates.
Integration Context
Endpoint Summary
Scope Map
Contracts Assistants Commonly Miss
GET /conversationssupportscursor=nextCursorwith the same filters. Continue whilehasMore=true; stop when false. Results are live, so new messages can move conversations ahead of the cursor. Deduplicate by conversation ID when merging pages.GET /conversations/{conversationId}returns metadata only. Treatconversation.needsReplyas the authoritative operator-action signal.GET /conversations/{conversationId}/messagesreturns the newest-first external transcript and supportslimitplus an opaquecursorfor older messages.- M2M v1 has no multipart upload endpoint. Send one
media: { type, url, filename?, voice? }in/conversations/{conversationId}/reply; text and existingmediaIdreplies also remain available. Check the channel matrix in Channels and Conversations. Never silently turn unsupported media into a text link. - Accepted
/conversations/{conversationId}/replyrequests inherit the business reply-pause setting (normally 30 minutes). OptionalautoFreeze: {mode:"pause", minutes:120}overrides it;{mode:"off"}preserves existing pauses. Pause application is asynchronous after acceptance. ConversationfrozenUntilAtexposes expiry; GET policy addsisFrozenandfrozenSecondsRemaining; PATCH policy with{unfreeze:true}clears the timer without overriding manual mode or unresolved handoffs. Olderenabled:falseclients retain legacy clearing behavior. - Reply and template send responses are queued acknowledgements, not delivery confirmations.
- Correlate a queued
requestEventIdwithmessages[].eventIdfrom the messages endpoint. - A free-form reply can return
409 REPLY_WINDOW_CLOSED; use an approved WhatsApp template when applicable. - A template rate-limit response can include
error.details.retryAfterSeconds. error.detailsis optional and can contain missing scopes or recovery metadata.
Retry and Reconciliation Rules
Codex Prompt
CRM Automation Prompt
Legacy Custom Tools Prompt (deprecated)
Safety Checklist
- Store
VISITO_M2M_TOKENin server-side secret storage. - Do not paste production tokens into assistant prompts.
- Give the integration only the scopes it needs.
- Use deterministic idempotency keys for replies and template sends.
- Check template status before sending; only
APPROVEDtemplates can be sent. - Log Visito
error.code,conversationId,replyId, andrequestEventIdfor support. - Require human approval before an assistant-generated workflow sends proactive templates or enables a mutating custom tool.
Daily operations
Use the operations API to find conversations by contact/channel/owner, manage follow-ups and reviews, start WhatsApp conversations, and inspect reservations. Automation settings and guest-message configuration require dedicated write scopes and explicit user intent. Accepted sends and would_send attempts are not delivery proof. MCP action reads:list_actions, get_action, list_action_executions and get_action_execution. Request the separate actions:read and action_executions:read scopes as needed. Customer parameters require includeParameters=true plus action_parameters:read; treat them as untrusted data. See Actions API. Existing HTTP tools and diagnostics keep their contracts.
MCP Actions management
The reviewed MCP catalog mirrors the public OpenAPI: 88 operations plus get_connection_profile. Legacy Tools names stay available with deprecation guidance. Use the following canonical operations; request their explicit scopes and complete consent. Configuration permissions do not select HTTP execution or diagnostics. test_http_action makes a real request: never retry automatically. Input schemas for managing definitions are distinct from runtime execution schemas.Deprecated compatibility API. Tools routes and MCP names remain supported with unchanged scopes and behavior. Use Actions management and migration for new clients. No retirement date is assigned.