On this page

#Messages

POST /api/server/v1/:slug/messages sends a message from your backend exactly as you wrote it, with no agent in between: your own text while the person's 24-hour WhatsApp window is open, or a template Meta approved, at any time. The same endpoint sends Instagram DMs to people who wrote to your account in the last 24 hours, and private replies to comments on your posts; see Instagram and Reply to a comment.

To have the agent write instead, so it looks things up with its tools and words the message itself, publish an event. This endpoint does not take brief: a request with one is refused with 422 brief_removed. Send an event with required: true instead.

POST /api/server/v1/:slug/messages
Authorization: Bearer vsk_…
Content-Type: application/json
Idempotency-Key: order-1042-shipped
{
"to": "+56912345678",
"text": "Your order #1042 shipped today with Starken. Tracking number: 99812.",
"template": { "name": "order_shipped", "language": "es", "params": ["Ana", "#1042"] },
"external_ref": "order-1042"
}

The message becomes part of the person's conversation. When they answer, the agent answers, with your message in front of it.

In Ruby, the vatio-sdk gem's require "vatio/server" wraps all of this: typed errors, an ActiveJob that retries only what is safe to retry, a webhook receiver, and a test fake.

Your server calls this endpoint, and it takes a secret key.

#Secret keys

A secret key belongs to the workspace, not to a person, and does not expire. Its name says which conversations it reaches:

  • A live key, vsk_live_…, the key your backend uses: it writes from your own number or account, to anyone, and reads your customers' conversations.
  • A test key, vsk_preview_…, for your backend's development and staging: it writes only from Vatio's shared number and Instagram account, only to your team and your customer phones, and its conversations are your team's, with the newest version of the agent. It cannot message a customer, which makes it the key for trying messages before you connect your own number (Try it from Vatio's shared number).

Keys from before October 2026 are plain vsk_… and keep working; the inbox shows which of the two each one is as Live or Test, and the MCP's list_api_keys as environment live or preview. Keep the key in VATIO_SERVER_KEY on your server. Create one in the inbox under Settings → API keys: the New key button at the top right makes one of each, a live key and a test key. The inbox and the MCP's list_api_keys and revoke_api_key list and revoke keys; the MCP does not create a secret key, since it is shown only once.

Keep it on your server. It can message your customers.

A key calls only what its scopes allow: sending and listing messages and templates take messages, the Instagram comments take instagram, and reading a conversation takes chats. A key created without naming scopes, as the inbox's New key form makes them, has all three and status.

#What goes out

WhatsApp delivers free-form text only within 24 hours of the person's last message. After that, it only delivers a template that Meta approved. Vatio checks the window, and your request decides what is sent:

The contact wrote…What goes out
in the last 24 hoursYour text, exactly as written (mode: "text"). With no text, your template filled in and sent as a regular message (mode: "text")
more than 24 hours ago, or neverYour template, as is (mode: "template")

With the window closed and no template, the request is refused with 422 outside_window. To always reach someone, send text and a template; Vatio uses the template only when it has to.

A template sent alone to someone who wrote in the last 24 hours goes out as the message the person would have read: its header, body and footer as text, its quick replies (up to three) as reply buttons, a single URL button as a link button, a media header as that image, video or document. It reads as part of the conversation, and Meta's limits on marketing templates do not apply to it. A tap on one of its buttons reaches the agent as the button's title. When the regular message would lose something (a phone or coupon-code button, more than three quick replies, a button title over 20 characters, a carousel or a flow), or the template is an authentication one, it goes out as the template. If the window closes before it goes out, the template goes instead.

Both go out at once, during the workspace's quiet hours too: they are your own words, at an hour you chose.

  • text is for words that must not change, such as an amount or a legal notice. It goes out as one message, with no model in between.

  • template: params fill the body's {{1}}, {{2}}, … in order, and the count must match. GET /templates lists each template's count. A URL button whose link ends in {{1}} takes its value in buttons, by the button's position among the template's buttons (from 0), one entry per such button:

    {
    "template": {
    "name": "offer_available", "language": "es", "params": ["Ana"],
    "buttons": [{ "index": 0, "params": ["ABC123"] }]
    }
    }

    For a button whose link is https://example.com/offers/{{1}}, this one opens https://example.com/offers/ABC123. Quick replies, phone buttons and links with no {{1}} take nothing.

    Anything else a template takes (a text or media header, named parameters, a coupon code, a flow) goes in components, Meta's own send components as they are, in place of params and buttons. Vatio passes them to Meta unchanged:

    {
    "template": {
    "name": "offer_available", "language": "es",
    "components": [
    { "type": "header", "parameters": [{ "type": "image", "image": { "link": "https://example.com/offer.jpg" } }] },
    { "type": "body", "parameters": [{ "type": "text", "parameter_name": "name", "text": "Ana" }] },
    { "type": "button", "sub_type": "url", "index": "0", "parameters": [{ "type": "text", "text": "ABC123" }] }
    ]
    }
    }

    Each template's example in GET /templates is in this form when the template needs it. Vatio checks the body's parameters, the header and the URL buttons against the template before answering; Meta judges the rest when it sends, and a refusal shows up as the message's error.

#Body

Field
torequiredThe contact's number in international format. On Instagram, their @username or Instagram-scoped id
channeloptionalwhatsapp (the default) or instagram; see Instagram
comment_idoptionalAn Instagram comment on your posts: a private reply. Takes the place of to
texttext or templateYour own message, sent as is inside the window. Up to 4,096 characters, 999 on Instagram
templatetext or templateWhatsApp only. { "name", "language", "params": [], "buttons": [{ "index", "params": [] }] }, or { "name", "language", "components": [] } with Meta's own send components. Sent when the window is closed, or when there is no text
identityoptionalA JWT your workspace signed for this person; see Identity
external_refoptionalYour own id. Filter by it with GET /messages?external_ref=

#Responses

A message is recorded by the request and sent by Vatio right after. The request never waits on Meta, so it answers in milliseconds:

  • 202: accepted, status: "queued". Follow it with webhooks or GET /messages/:id.
  • 200 with Idempotent-Replayed: true: an Idempotency-Key that was already used. You get the original message as it stands now; nothing is sent again.
{
"id": 81,
"status": "sent",
"mode": "template",
"channel": "whatsapp",
"environment": "live",
"to": "+56912345678",
"chat_id": 5521,
"external_ref": "order-1042",
"idempotency_key": "order-1042-shipped",
"retry_of_id": null,
"retry_id": null,
"attempts": 1,
"max_attempts": 4,
"retry_at": null,
"brief": null,
"text": "Your order #1042 shipped today with Starken. Tracking number: 99812.",
"template": { "name": "order_shipped", "language": "es", "params": ["Ana", "#1042"] },
"content": "Hi Ana, your order #1042 is on its way…",
"buttons": [],
"chat_message_id": 90412,
"delivery": { "status": "read", "sent_at": "…", "delivered_at": "…", "read_at": "…", "error_code": null, "error_message": null },
"error": null,
"sent_at": "…",
"replied_at": "…",
"created_at": "…"
}
  • mode is text or template for a message your backend sent, and agent for one the agent wrote: from events, or a private reply to an Instagram comment it answered by itself. brief is set only on those, with what the agent was given to write from.
  • status is the message's state: queued, processing, sent, failed, or skipped for one that came from events and that the agent decided not to send. A queued message with retry_at is waiting for Vatio's next attempt.
  • environment is live for a message to a customer, sent with a live key (vsk_live_…), and preview (test) for one to your team on Vatio's shared number, sent with a test key (vsk_preview_…).
  • retry_of_id and retry_id are populated only for attempts created by the earlier resend design. New automatic attempts keep the same message ID.
  • content is what reached the phone: your text, the rendered template, or the agent's words. chat_message_id is that message in the conversation.
  • buttons lists a link the agent's words sent as a button, { type, title, url }; the link is also in content. Empty otherwise.
  • delivery is Meta's word on the first message: sent, delivered, read or failed, with Meta's error code.
  • A failed message carries error.code:
    • human_takeover: someone took the chat first.
    • outside_window: the window closed while it waited.
    • chat_busy: the chat was busy for ten minutes.
    • quiet_hours: a message from events, on a workspace whose quiet hours cover the whole week, so the agent never writes.
    • no_reply, generation_failed: the agent wrote nothing (a message from events).
    • whatsapp_error: Meta refused the send; Meta's message is in error.message and its numeric code, when present, in error.provider_code.
    • whatsapp_number_unhealthy: when its turn came, Meta was refusing every send from the number; error.message says why and how to fix it. See When Meta stops the number sending.
    • opted_out: the person asked not to be written to.
    • whatsapp_paused: the workspace's WhatsApp number is connected but not live.
    • whatsapp_not_connected, instagram_not_connected: the channel was disconnected (or, for a comment reply, comment replies are not on) before it went out.
    • template_not_approved: the template is not approved by Meta (yet).
    • generation_blocked: the model provider refused to write the message (a message from events).

A failed message stays silent: Vatio never sends the person an apology for a message they did not ask for. Once a request is accepted, Vatio retries confirmed failures in every mode, including Meta rejections, delivery failures and, for a message from events, model errors. The same message ID and idempotency key cover all attempts. There are at most four attempts in total: the first send and three retries after roughly one, five and thirty minutes, plus up to thirty seconds of jitter. A scan every five minutes queues due attempts, at most 100 per scan. While Vatio is retrying, status remains queued and retry_at shows when the next attempt is due. A message.failed or message.delivery_failed webhook is sent only when attempts are exhausted or another send would be unsafe. Check attempts, max_attempts and error for the final reason.

An opt-out stops immediately. So does an error from Meta that fails every send from the number, such as 133010 (not registered) or 131042 (payment): another attempt could only fail the same way. The message fails at once, the number's issue opens, and new messages are refused with 409 whatsapp_number_unhealthy until it closes (see Refusals). A send that timed out, returned an unreadable response or lost its worker during the provider call may already have reached Meta. Vatio marks it send_failed and stops rather than risk sending the person a duplicate. Requests rejected before acceptance, such as an invalid recipient or missing template, return a synchronous API error. Automatic retries apply to requests accepted after this change is deployed; older failed requests are not silently requeued.

After a terminal failure, your backend decides whether the message is still relevant and may submit a new request with a new idempotency key. Reusing the old key only replays the outcome of the original request. Vatio's own automatic attempts never require another key from your backend.

#Instagram

Send "channel": "instagram" to write to someone as an Instagram DM from the account connected on the inbox's Instagram page:

POST /api/server/v1/:slug/messages
Authorization: Bearer vsk_…
Idempotency-Key: order-1042-shipped-ig
{
"channel": "instagram",
"to": "@ana.perez",
"text": "Your order #1042 shipped today with Starken. Tracking number: 99812."
}

Instagram lets a business message only someone who wrote to it, and only within 24 hours of their last message. Instagram has no templates, so there is nothing to fall back on:

  • to is the person's @username (matched without regard to case) or their Instagram-scoped id. It has to be someone who already wrote to your account, or the request is refused with 422 unknown_recipient.
  • With the window closed, the request is refused with 422 outside_window, carrying last_inbound_at. A template is refused with 422 templates_not_supported.
  • text works as on WhatsApp, up to 999 characters, Instagram's limit.
  • Events are WhatsApp only: the agent does not write an Instagram DM on your backend's behalf. It answers when the person writes back.
  • The response, the webhooks and GET /messages are the same, with channel: "instagram" and to as the @username. Instagram reports reads but not deliveries, so delivery.status goes from sent to read, and message.read is sent but message.delivered is not.
  • A message Meta refuses fails with instagram_error, with Meta's message in error.message and its code in error.provider_code. With no Instagram account connected the request is refused with 409 instagram_not_connected.

A test key (vsk_preview_…) writes from Vatio's shared Instagram account, and only to a test account verified for that workspace on Try the agent → Instagram (422 not_a_test_account otherwise). DM the shared account from it first: that opens the window.

#Reply to a comment

Someone comments on your Instagram post, reel or live, and your backend answers with a DM: the one message Instagram lets a business send to someone who never wrote to it. It reaches their inbox, or their message requests if they do not follow you, and shows the post it is about. Your backend sends it as text. To have the agent answer every comment by itself instead, by DM or in the post's thread, give it comments: { reply: [...] } with the MCP's update_agent.

  1. Vatio sends each comment to your webhook as instagram.comment, with its id, its text and who wrote it. When Meta's notification arrives without the text or the username, Vatio asks Meta for them before it sends yours. You can also list them with GET /instagram/comments.

  2. Your backend decides which ones to answer and sends a message with comment_id:

    POST /api/server/v1/:slug/messages
    Authorization: Bearer vsk_live_…
    Idempotency-Key: comment-17895695668004550
    {
    "comment_id": "17895695668004550",
    "text": "Hi! Our price list is at example.com/prices. Which size are you looking for?"
    }
  3. When they answer, the conversation goes on as any other Instagram DM, with the agent, and message.replied reaches your webhook.

Instagram's rules for it:

  • One per comment, within 7 days of it (a live's, only while it is live). A second request for the same comment is 409 comment_already_replied; a late one, 422 comment_reply_expired. A reply that failed leaves the comment free to try again.
  • One message. Until the person answers, nothing else reaches them. text goes out as is, up to 999 characters.
  • to is not needed: the reply goes to whoever wrote the comment.
  • vsk_live_… keys only (409 comments_need_live_key): comments are on your own account.

Your account has to grant Vatio access to its comments. An account connected before this needs connecting again on the inbox's Instagram page, which shows whether comments reach Vatio. Until then comments do not reach Vatio and a comment_id is refused with 404 comment_not_found.

#List comments

GET /api/server/v1/:slug/instagram/comments?replyable=true&media_id=&limit=&before=
GET /api/server/v1/:slug/instagram/comments/:id

Newest first, up to 50 a page; page with before = next_before. replyable=true keeps the comments still inside their 7 days and with no reply. Vatio keeps comments for 30 days, and removes a person's comments when their contact is erased. Reads are recorded in the workspace's Activity, at most once per key every 15 minutes. These two endpoints allow 120 reads a minute per key.

{
"comments": [
{
"id": "17895695668004550",
"text": "Price?",
"from": { "id": "17841400000000000", "username": "ana.perez" },
"media": { "id": "17918195224117851", "product_type": "FEED" },
"parent_id": null,
"live": false,
"created_at": "…",
"reply_until": "…",
"replied_message_id": null
}
],
"next_before": null
}

#Verify a phone

To check that someone owns the number they typed, send them a code and compare what they type back. Vatio delivers it; your backend makes the code, keeps it, and decides whether it matches.

  1. On the inbox's WhatsApp page, or with the MCP's create_whatsapp_template (category: "authentication" with Meta's components), create a template in the Authentication category on your own number. Meta writes its words ("123456 is your verification code…") and approves it like any other.

  2. Send the code as template.code, with no text:

    POST /api/server/v1/:slug/messages
    Authorization: Bearer vsk_…
    Idempotency-Key: verify-9f3a
    {
    "to": "+56912345678",
    "template": { "name": "verify", "language": "es", "code": "482913" }
    }
  3. Wait for message.delivered on your webhook, or message.failed or message.delivery_failed if it did not arrive, and ask the person for the code they received. Five wrong attempts and a short expiry are yours to enforce.

A code goes out as its template whether or not the 24-hour window is open, and it is sent even while a person is answering that contact's conversation. A contact who opted out is still refused (409 opted_out).

A code is never retried automatically: one that fails ends failed at once, with message.failed, and your backend sends a new code if it still needs one. The code is held encrypted until the message is sent or fails, and then erased. It is not in the response, the webhook payloads, the inbox or what the agent reads: template shows "code": "••••••" and the conversation •••••• is your verification code…. Give each code its own Idempotency-Key: the same key with a different code is a 409 idempotency_conflict, so a retry of the same code is safe and a new code is never swallowed. code is 1 to 15 letters or digits.

Meta charges for authentication messages like any other category; see What Meta charges.

#Idempotency

Send Idempotency-Key (or idempotency_key in the body) and retry as much as you like: the same Idempotency-Key, from a secret key of the same kind (vsk_live_… or vsk_preview_…), always returns the same message. A key sent with a different body is refused with 409 idempotency_conflict. Derive it from your own event, such as order-1042-shipped, so a retry from a job queue cannot message anyone twice. An identity signed again for the same person, with a new exp, is still the same request.

#Identity

On WhatsApp, the person is anonymous unless you say otherwise. Send identity, a JWT your workspace signed with the same key as the widget's (sub, aud = the workspace slug, exp), and the conversation is signed in: when the person answers, private tools run for that sub. Vatio checks the signature; it never vouches for anyone. Give it an exp that covers how long they may take to answer, such as 48 hours.

A conversation already signed in as someone else is not handed over: 409 identity_conflict.

#Webhooks

Vatio POSTs what happened to each message to your server, so you never poll: message.sent, message.failed, message.delivered, message.read, message.delivery_failed and message.replied, each with the message as GET /messages/:id returns it. See Webhooks for the payloads, the signature, retries and the endpoints.

#Lists and templates

MethodPath
GET/messages/:idOne message
GET/messages?external_ref=&status=&error_code=&error_contains=&since=&until=&limit=&before=Newest first, up to 50; page with before = the next_before of the last page
GET/templatesThe templates this key's number can send: name, language, status, body, parameter_count, parameter_format (positional or named), buttons (each one's index, type, text and url or phone_number), components as Meta has them, and an example object to send as template: params and buttons when that is all it takes, components when it takes more (an authentication template's carries a code)

status=failed includes messages that exhausted their attempts and older messages Meta accepted but later marked undelivered. error_code matches either the message error, the stored Meta send code, or Meta's delivery code; error_contains searches their error messages. since and until accept ISO dates or timestamps and filter by the original message's creation time. Older Meta refusals may have no numeric delivery code; use error_contains to select those by Meta's text.

The MCP's list_failed_messages reviews terminal failures without printing contacts or message bodies (ids, timings and the error only), with the same since, until, error_code and error_contains: what a live key sent, or with test: true what a test key sent, each with your external_ref:

{
"workspace": "acme",
"since": "2026-10-19",
"error_contains": "Business eligibility payment issue"
}

Create templates with the MCP's create_whatsapp_template. Until you connect your own number it puts them on Vatio's test number, where a test key (vsk_preview_…) can send them, and moves them to your number when you connect it. Once you connect your number, WhatsApp in the inbox lists them too, with each one's body, status and the reason Meta gave when it refused one, and you can create them there or in Meta. Meta approves each one on each number. Vatio reads its own copy of them. If you name one on your own number that it does not know yet, the request is refused with template_not_found, and Vatio fetches the list from Meta in the background: retry in a minute.

#Read a conversation

GET /api/server/v1/:slug/chats/:id/messages?before=&limit=
Authorization: Bearer vsk_…

One conversation the key reaches (a customer's for a live key, your team's for a test key), as both sides saw it: what a Claude Code routine reads first, with the chat id it was started with. The newest messages come last, up to 100 (limit, at most 200); pass before = oldest_id to get the page before, and stop when has_more is false.

{
"chat": { "id": 349, "channel": "whatsapp", "environment": "live",
"contact": { "name": "Ivan", "phone_number": "+56912345678" } },
"messages": [
{ "id": 9875, "role": "user", "content": "¿Pueden cambiar el banner?", "buttons": [],
"forwarded": "forwarded", "occurred_at": "2026-10-11T16:02:11Z", "attachments": [] },
{ "id": 9876, "role": "user", "content": "Implementa lo que me pide Sofía", "buttons": [],
"forwarded": null, "occurred_at": "2026-10-11T16:02:40Z", "attachments": [] }
],
"oldest_id": 9801,
"has_more": true
}

role is user for the person on WhatsApp and assistant for everything sent to them: the agent, a person from the inbox (human_author_name) or your backend. forwarded is forwarded or frequently_forwarded when the message came from another chat. buttons lists the links an agent's message sent as buttons, each also in content. A voice note's content is its transcript; images and files are in attachments, as signed URLs, with the text Vatio read in a PDF or a video as description. A PDF also carries reading: status (read, truncated, unreadable, or unread while it is still being read), chars given to the agent, total_chars read before the cut, truncated (characters or reading, when the reading stopped before the end), truncated_at, pages when they could be counted, and error with error_message when it could not be read (see PDFs). Tool calls and discarded drafts are not part of it. Every read is recorded in the workspace's Activity, and a key reads at most 120 times a minute.

#Refusals

Errors carry { "error": { "code", "message" }, "request_id" }.

Statuscode
401invalid_keyMissing, wrong or revoked key
403workspace_forbiddenThe key belongs to another workspace
404not_foundNo such chat among the ones this key reaches (a customer's for vsk_live_…, your team's for vsk_preview_…)
409opted_outThe contact asked not to be written to
409human_takeoverA person is handling the conversation
409whatsapp_not_connected, whatsapp_pausedNo number, or Live is off on it
409whatsapp_number_unhealthyMeta refuses every send from your number, for example 133010 (not registered). error.message says since when, what Meta said and the fix; error.issue has them as fields. See below
409instagram_not_connectedchannel: "instagram", with no Instagram account connected
409use_live_keyA vsk_preview_… key, on a workspace with its own number connected
409idempotency_conflict, identity_conflictSee Idempotency and Identity
422outside_windowWindow closed and no template; carries last_inbound_at
422template_not_found, template_not_approved, template_params, template_buttons, template_components, template_requiredThe template cannot be sent as given. template_buttons: a URL button ending in {{1}} with no value, or a value for a button that takes none. template_components: components that are not a list of Meta's send components, sent with params or buttons, or missing the header the template has; or a template that takes a header, named parameters or a coupon code, sent without components
422invalid_code, code_required, code_with_content, template_not_authenticationA verification code that is malformed, missing from an authentication template, sent with text, or sent to a template that is not an authentication one
422invalid_identity, identity_not_configuredThe token does not verify, or the deployment has no public key (set_auth)
422not_a_test_phoneA vsk_preview_… key, to a number that does not talk to this workspace on Vatio's shared number: neither someone on the team with their WhatsApp verified nor one of its customer phones. See Try it from Vatio's shared number
422unknown_recipient, templates_not_supported, not_a_test_accountInstagram: someone who never wrote to your account, a template, or a vsk_preview_… key to an account that is not a verified test account
422invalid_channelchannel is not whatsapp or instagram, or a comment_id with channel: "whatsapp"
404comment_not_foundNo such comment on your Instagram account; see Reply to a comment
409comment_already_replied, comments_need_live_keyThe comment has its reply already, or a vsk_preview_… key (Comments)
422comment_reply_expired, comment_recipient_mismatchThe comment is more than 7 days old, or to names someone other than its author
422brief_removedThe request has brief. To have the agent write, publish an event with required: true
422content_required, text_too_long, invalid_recipientNo text and no template, text over the channel's limit, or to that is not a phone number in international format
429rate_limitedMore than 60 messages, 120 conversation reads, or 120 Instagram comment reads, a minute on one key

whatsapp_number_unhealthy answers every message to your number while Meta refuses every send from it, instead of a 202 that would only fail later:

{
"error": {
"code": "whatsapp_number_unhealthy",
"message": "The WhatsApp number +1 555-010-8455 cannot send: since 2026-10-28T16:46:12Z, Meta refuses every send from it. Meta: (#133010) Account not registered. Meta says the number is not registered on the WhatsApp Cloud API, … Until then Vatio refuses new messages from this number instead of queueing them to fail.",
"issue": {
"since": "2026-10-28T16:46:12Z",
"code": "133010",
"kind": "not_registered",
"message": "(#133010) Account not registered",
"fix": "Meta says the number is not registered on the WhatsApp Cloud API, …"
}
},
"request_id": "…"
}

It stops when a check passes: the MCP's update_whatsapp with repair: true (and pin for 133010) or Verify on the inbox's WhatsApp page. Your webhooks hear channel.issue when it starts and channel.recovered when it ends.

#Try it from Vatio's shared number

A test key (vsk_preview_…) writes from Vatio's shared number, and only to a phone that talks to this workspace there; the conversations it opens are your team's, with the newest version of the agent:

  • the owner or a developer of the workspace with their WhatsApp verified, or a supervisor while the workspace has no number of its own live; never a viewer, a role kept only by members who had it before (The team on WhatsApp; the owner's MCP list_team shows who has a verified number, in whatsapp). If their phone talks to no workspace yet, the message routes it to this one; if it talks to another of their workspaces, the call is refused until they switch with /new;
  • one of the workspace's customer phones, added on Conversations → Try the agent → WhatsApp with the code shown there.

Any other number answers 422 not_a_test_phone. Outside the 24-hour window it sends the templates you created with the MCP's create_whatsapp_template, by the same name you send them by from your own number.

The test number is for a workspace with no number of its own. Once you connect yours, your templates move to it and a test key is refused with 409 use_live_key: your backend sends from your number, with a live key (vsk_live_…).

#Try it from your phone

  1. Verify your WhatsApp, under Account in the inbox or on Conversations → Try the agent → WhatsApp, as in Talk to your agent on the shared number.

  2. Create a test key (vsk_preview_…) in the inbox under Settings → API keys: New key makes a live key and a test key.

  3. Write anything from your phone to Vatio's shared number (on several teams, pick this workspace's agent from the list it answers with). That opens the 24-hour window, so text goes out without a template.

  4. Send a message:

    Terminal window
    curl https://vatio.ai/api/server/v1/acme/messages \
    -H "Authorization: Bearer $VATIO_SERVER_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: try-1" \
    -d '{"to": "+56912345678", "text": "Your order #1042 shipped today. Tracking number: 99812."}'

It answers 202 with the message's id, and the text reaches your phone seconds later. GET /messages/:id shows what went out, and the conversation in the inbox shows it as one your system wrote first. Answer it from your phone: the agent answers, with your message in front of it. To see the agent write instead, publish an event to the same number with the same secret key.

Last updated:

Latest release: 0.144.0 · Changelog · The whole contract as Markdown: /docs/docs.md