Developers and AI assistants

Connect an AI assistant to Ayo! over MCP, or your own software over a small API. Both work on one business's account through a key the owner makes (or, for Claude, ChatGPT and Claude Code, by the owner signing in), and both follow the same rule as everything else in Ayo!: nothing reaches a list until the owner approves it with a code texted to their phone.

1. Get a key

  1. Sign in, open Settings, and find Connect an AI assistant. Keys are on paid plans.
  2. Name the key, and choose what it may do: ask to send (on by default), and text updates people signed up for (off by default).
  3. Copy the key. It starts with ayo_ and is shown once: Ayo! keeps only a one-way hash of it.

An account can hold up to 10 keys. Revoke one in Settings and anything using it stops at once. Send it on every request as Authorization: Bearer ayo_….

PermissionWhat it allows
readSee the account's lists, contacts, keywords and recent sends. Every key made in Settings has it.
writeMake lists and add contacts (with the business's word on how they agreed).
sendAsk Ayo! to send to a list. It still sends only with the owner's code.
notifyText one person an update they signed up for, without the owner's code each time. Never offers.

2. Connect an AI assistant (MCP)

Ayo! is an MCP server at https://www.textayo.com/mcp: Streamable HTTP, JSON-RPC 2.0, no session to keep. It speaks protocol versions 2025-06-18, 2025-03-26, 2024-11-05. It works in any MCP client that lets you set a request header with your key. In Claude Code:

claude mcp add --transport http ayo https://www.textayo.com/mcp \
  --header "Authorization: Bearer ayo_YOUR_KEY"

Or sign in, no key needed

In Claude, ChatGPT and Claude Code you don't need a key: add Ayo! with the address https://www.textayo.com/mcp and sign in with the code Ayo! texts you. You choose the business and what the app may do, and you can disconnect it in Settings, under Connected apps.

claude mcp add --transport http ayo https://www.textayo.com/mcp

OAuth 2.1 with PKCE (S256), public clients only. Metadata: /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server. Apps register themselves (dynamic client registration) or use a client ID metadata document. Access tokens last an hour; refresh tokens last 30 days from their last use and are replaced on every use. Permissions: read, write and send (never notify, which stays key-only).

The tools:

  • list_contact_lists: Every contact list on this Ayo!
  • list_keywords: The keywords people can text to join a list on this account, and how many have joined through each.
  • recent_broadcasts: Recent broadcasts with their real delivery outcome.
  • send_broadcast: Text one of this account's lists.
  • proposal_status: Where a send stands: waiting for the owner's approval, sent (with the receipt: how many got it and who was skipped and why), blocked (and why), expired or cancelled.

Sending is two calls. The first returns a preview and texts the owner a 6-digit code. The second sends only with that code, which the assistant has to ask the owner for: it can never approve a send itself.

3. Use the API from your software

Base address https://www.textayo.com. JSON in, JSON out.

RequestNeedsDoes
GET /api/ayo/listsreadEvery list, with how many people are on it.
POST /api/ayo/listswriteMake a list: { name, description? }.
GET /api/ayo/contacts?listId=readThe people on one list, and whether each has opted out.
POST /api/ayo/contactswriteAdd people to a list, with permission (below).
POST /api/ayo/sendsendPreview a send to a list; send it with the owner's code.
POST /api/ayo/notifynotifyOne update to one person who signed up for it.
GET /api/ayo/webhooksreadEvery address Ayo! sends events to (never the secrets).
POST /api/ayo/webhookswriteAdd an address: { url, events? }. The signing secret comes back once.
PATCH /api/ayo/webhooks/<id>writePause or turn back on: { paused }; change { events }.
DELETE /api/ayo/webhooks/<id>writeRemove an address.
POST /api/ayo/webhooks/<id>/testwriteSend one webhook.test event now.

Send to a list: preview, then the owner's code

curl -X POST https://www.textayo.com/api/ayo/send \
  -H "Authorization: Bearer ayo_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"listId": "LIST_ID", "message": "Doors open at 7 tonight", "kind": "events"}'

# 202 { "proposalId": "...", "status": "pending_confirmation", "preview": { ... } }
# Nothing is sent. The owner gets a 6-digit code by text. Then, with their code:

curl -X POST https://www.textayo.com/api/ayo/send \
  -H "Authorization: Bearer ayo_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"proposalId": "...", "code": "123456"}'

# 200 { "totalSent": 212, "totalFailed": 0, "excluded": { ... }, "receipt": "Sent to 212 of 230; ..." }

The preview says who would get it after Ayo!'s checks and who is skipped and why. kind is needed only when the business sends more than one kind of text (promotions, events, updates). Messages are up to 1,600 characters. Send {"proposalId": "...", "cancel": true} to drop a preview.

Add contacts: say how they agreed

curl -X POST https://www.textayo.com/api/ayo/contacts \
  -H "Authorization: Bearer ayo_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"listId": "LIST_ID",
       "contacts": [{"phone": "+14045550100", "firstName": "Jane"}],
       "permission": {"confirmed": true, "method": "online_form"}}'

The business confirms it has these people's permission to text them, and how they agreed. Without it nothing is added (422 PERMISSION_REQUIRED). method is one of in_person, online_form, paper, existing_customer or other; other needs a note. A business that sends several kinds of text also lists kinds.

Updates to one person

curl -X POST https://www.textayo.com/api/ayo/notify \
  -H "Authorization: Bearer ayo_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"to": "+14045550100", "text": "Your listing is live", "kind": "updates"}'

Sent at once, without the owner's code, so it is kept narrow: a key with the notify permission, never offers, only to a person who ticked that kind's box and hasn't replied STOP, never during quiet hours, at most 3 a day to one person, and only from the business's own approved number. A refusal says why (409 with a reason).

4. Get events from Ayo! (webhooks)

Add an https address in Settings, or with POST /api/ayo/webhooks, and Ayo! sends it an event as things happen. Each event is a POST with a JSON body {"type", "timestamp", "data"}, signed the way the open Standard Webhooks specification describes, so its libraries can check it.

EventSent when
contact.joinedSomeone joined one of your lists (a sign-up page, a keyword, an import, the API or you adding them), or signed up again on a list they were already on.
message.receivedSomeone texted your business, with what they wrote. A text that is a keyword, STOP or START is handled as that, not sent here (a sign-up it makes comes as contact.joined); asking to stop in their own words comes as both.
contact.opted_outSomeone can no longer get your texts: they replied STOP or asked to stop, you blocked them, or a change to their lists left them on none they can be texted on.
contact.opted_inSomeone can get your texts again: they replied START, or a change to their lists (joining one, you unblocking them, or a list being removed) means they can be texted.
broadcast.sentA send finished, with its receipt: how many got it, and how many were skipped for each reason.

Check that an event came from Ayo!

// Headers: webhook-id, webhook-timestamp (seconds), webhook-signature ("v1,<base64>")
import { createHmac, timingSafeEqual } from "node:crypto";

function fromAyo(rawBody, headers, secret /* "whsec_..." */) {
  const id = headers["webhook-id"], ts = headers["webhook-timestamp"];
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // too old or too new
  const key = Buffer.from(secret.slice("whsec_".length), "base64");
  const want = createHmac("sha256", key).update(`${id}.${ts}.${rawBody}`).digest();
  return headers["webhook-signature"].split(" ").some((sig) => {
    const got = Buffer.from(sig.split(",")[1] ?? "", "base64");
    return got.length === want.length && timingSafeEqual(got, want);
  });
}

Sign over the raw body exactly as received. Answer with any 2xx within 15 seconds; do the work afterwards. Anything else is tried again for about three days (10 tries in all, with growing gaps; longer if you answer with a Retry-After);webhook-id stays the same, so you can drop repeats. Redirects aren't followed. Answering 410 stops the address; so does every retry failing with nothing getting through, and the owner gets a text. Contacts in events carry their phone and name, and message.received carries what they wrote: keep them as safely as Ayo! does.

5. Rules every request follows

A key reaches only its own business's account. Every send runs the same checks as a send from the dashboard, at the moment it goes: consent for that kind of text, opt-outs and the business's do-not-text list, quiet hours where each person lives, state daily limits, content screening, and the plan's credits. See texting rules and security.

StatusMeans
401No key, or a key that was revoked.
402The account's plan doesn't include connections, or it has no credits left this month.
403The key doesn't have the permission this needs.
404That list isn't on this account.
409Not now: a wrong or expired code, or a person or moment the rules don't allow (the reason is in the answer).
422Something in the request is missing or wrong, or nobody on the list can be texted right now.

Not available yet

An SDK, an OpenAPI file and a test mode. If you need one of these, write to hello@textayo.com.