whatsapi.sh
Send WhatsApp messages from your own numbers, read and answer chats, and send sign-in codes.
Sollte ich dies verwenden
Qualität und Sicherheit
Befunde (1)
- LOWin get_webhook
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"whatsapi": {
"url": "https://api.whatsapi.sh/mcp"
}
}
}Remote-Endpunkte
https://api.whatsapi.sh/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (26)
🔴send_message(to, from, text, linkPreview, skipQueue, ...)
Send a text message to a phone number over WhatsApp. Counts as one message against the account's monthly quota. **With pacing on, messages you start are queued, including messages to known contacts.** Only a reply to someone who messaged this number in the last 24 hours goes out now. The queued answer carries `status: "queued"` and `scheduledAt`, an estimated send time. Messages leave one at a time, 15–25 minutes apart by default, measured from the previous message's actual release. An offline or restricted number pauses the queue; messages that have not left wait and resume with the same spacing. `message.sent` arrives on the account's webhook when a queued message leaves, with WhatsApp's message id. Group messages skip the queue. Use `skipQueue: true` only for a message the recipient expects now, or disable pacing with update_number and space sends yourself. A first message to someone new also uses the number's daily new-conversation budget, reported as `newConversationsRemaining`. Replies and groups do not use that budget. Delivery and read receipts arrive later on the account's webhook, not in this answer.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4096,
"description": "The message body."
},
"linkPreview": {
"description": "Render a preview card for the first link in the text. Default: on.",
"type": "boolean"
},
"skipQueue": {
"description": "Send immediately instead of waiting in this number's queue. Only for a message the recipient expects right now, such as a login code or a confirmation they requested. This bypasses the configured spacing, so using it for outreach can create bursts and increase the risk of a ban. Default: off.",
"type": "boolean"
},
"humanize": {
"description": "Whether to come online, read the recipient's last message and show a typing indicator before sending. On by default, which adds a few seconds. false skips those steps, not the send queue. Configure each part per number with update_number.",
"type": "boolean"
},
"idempotencyKey": {
"description": "Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.",
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"to",
"text"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴send_media(to, from, type, url, base64, ...)
Send media over WhatsApp from a public URL or base64 data. `type` chooses the format: `image` and `video` support a caption; `document` uses `fileName`; ogg/opus `audio` becomes a voice note. Other audio formats become playable attachments. Files are limited to 16 MB. Prefer `url` for large files. Counts as one message. With pacing on, media to one person waits unless they messaged this number in the last 24 hours. The answer carries `status: "queued"` and `scheduledAt`. Known contacts still wait. The file is fetched when the message's turn comes, so a `url` must remain reachable until then.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"image",
"video",
"audio",
"document"
],
"description": "Which kind of media bubble to send."
},
"url": {
"description": "Public https URL of the file. It is the better option. We stream the download and forward the bytes, so the size of the file never rides in your request.",
"type": "string",
"format": "uri"
},
"base64": {
"description": "The file as base64, bare or as a `data:<mime>;base64,…` URI. Base64 inflates a request by a third, so prefer `url` for anything but small files.",
"type": "string",
"minLength": 1
},
"mimeType": {
"description": "Overrides the detected content type, e.g. `image/webp`.",
"type": "string",
"minLength": 3
},
"caption": {
"description": "Text shown under the media. Images and videos only. WhatsApp has no caption field for documents or audio.",
"type": "string",
"maxLength": 1024
},
"fileName": {
"description": "Documents: the filename WhatsApp shows on the bubble.",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"seconds": {
"description": "Voice notes: duration, so the bubble shows the right length.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 600
},
"skipQueue": {
"description": "Send immediately instead of waiting in this number's queue. Only for a message the recipient expects right now, such as a login code or a confirmation they requested. This bypasses the configured spacing, so using it for outreach can create bursts and increase the risk of a ban. Default: off.",
"type": "boolean"
},
"humanize": {
"description": "Whether to come online, read the recipient's last message and show a typing indicator before sending. On by default, which adds a few seconds. false skips those steps, not the send queue. Configure each part per number with update_number.",
"type": "boolean"
},
"idempotencyKey": {
"description": "Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.",
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"to",
"type"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴send_batch(to, from, text, skipQueue, humanize, ...)
Send the same text to up to 25 recipients in one call. Each recipient has its own result and costs one message. If the connection, quota or rate limit stops the run, remaining recipients are `skipped`; try them after that issue is resolved. **With pacing on, every batch message waits the full configured gap.** This includes known contacts and replies. Accepted messages return `queued` with their own `scheduledAt`, then leave one at a time, 15–25 minutes apart by default. The gap is measured from actual release, so an overdue queue cannot leave in a burst. If the number disconnects or is restricted, messages that have not left stay queued until it reconnects. Watch `message.sent` for WhatsApp's ids and `GET /v1/queue` for what is waiting. `skipQueue: true` or disabling pacing bypasses that spacing, so you must space those sends yourself. Paid plans only.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"minItems": 1,
"maxItems": 25,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"description": "Recipients, up to 25. Each gets its own message; no duplicates."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4096,
"description": "The message body, the same for everyone."
},
"skipQueue": {
"description": "Send immediately instead of waiting in this number's queue. Only for a message the recipient expects right now, such as a login code or a confirmation they requested. This bypasses the configured spacing, so using it for outreach can create bursts and increase the risk of a ban. Default: off.",
"type": "boolean"
},
"humanize": {
"description": "Whether to come online, read the recipient's last message and show a typing indicator before sending. On by default, which adds a few seconds. false skips those steps, not the send queue. Configure each part per number with update_number.",
"type": "boolean"
},
"idempotencyKey": {
"description": "Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.",
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"to",
"text"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴send_location(to, from, latitude, longitude, name, ...)
Send a map pin over WhatsApp. Counts as one message. With pacing on, a message to one person waits unless they messaged this number in the last 24 hours.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"name": {
"description": "Label shown on the pin.",
"type": "string",
"maxLength": 200
},
"skipQueue": {
"description": "Send immediately instead of waiting in this number's queue. Only for a message the recipient expects right now, such as a login code or a confirmation they requested. This bypasses the configured spacing, so using it for outreach can create bursts and increase the risk of a ban. Default: off.",
"type": "boolean"
},
"humanize": {
"description": "Whether to come online, read the recipient's last message and show a typing indicator before sending. On by default, which adds a few seconds. false skips those steps, not the send queue. Configure each part per number with update_number.",
"type": "boolean"
},
"idempotencyKey": {
"description": "Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.",
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"to",
"latitude",
"longitude"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴send_contact(to, from, name, vcard, skipQueue, ...)
Send a contact card (vCard) over WhatsApp so the recipient can save the number with one tap. Counts as one message. With pacing on, a message to one person waits unless they messaged this number in the last 24 hours.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name on the card."
},
"vcard": {
"type": "string",
"minLength": 1,
"description": "The vCard payload, e.g. `BEGIN:VCARD\\nVERSION:3.0\\n…\\nEND:VCARD`."
},
"skipQueue": {
"description": "Send immediately instead of waiting in this number's queue. Only for a message the recipient expects right now, such as a login code or a confirmation they requested. This bypasses the configured spacing, so using it for outreach can create bursts and increase the risk of a ban. Default: off.",
"type": "boolean"
},
"humanize": {
"description": "Whether to come online, read the recipient's last message and show a typing indicator before sending. On by default, which adds a few seconds. false skips those steps, not the send queue. Configure each part per number with update_number.",
"type": "boolean"
},
"idempotencyKey": {
"description": "Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.",
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"to",
"name",
"vcard"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴send_otp(to, from, template, expiresInSeconds)
Generate a 6-digit code, send it over WhatsApp and return it. Returning the code is deliberate: verify it yourself, or hand it back to check_otp and keep nothing. Codes expire in 5 minutes by default and one number can only be sent a new code once a minute. Counts as one message.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"template": {
"description": "Message body. Must contain `{code}`; `{minutes}` expands to the expiry. Default: “{code} is your verification code. It expires in {minutes} minutes.”",
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"expiresInSeconds": {
"description": "How long the code stays valid. Default 300 (5 minutes).",
"type": "integer",
"minimum": 60,
"maximum": 3600
}
},
"required": [
"to"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴check_otp(to, code, idempotencyKey)
Verify a code sent with send_otp and consume it, so it can never be used twice. A wrong or expired code answers 400 OTP_INVALID. It is deliberately an error, not a `verified: false`, so a missing check at the caller can never read as success. Five wrong guesses kill the code. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"code": {
"type": "string",
"minLength": 4,
"maxLength": 10,
"description": "The code the user typed."
},
"idempotencyKey": {
"description": "Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.",
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"to",
"code"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢check_number(phone, from)
Ask WhatsApp whether a phone number has an account, and get its profile picture when it does. Brazilian mobiles are checked with and without the extra 9 and the answer reports the form that actually matched. If WhatsApp cannot be reached the answer assumes yes and sets `verified: false`. An outage must not block sends to real people. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"phone": {
"type": "string",
"minLength": 6,
"description": "The phone number to look up, e.g. +5511988887777."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
}
},
"required": [
"phone"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢list_numbers
Every WhatsApp number on the account with its connection status. Start here when you do not know which number to send from, or to check whether one needs re-pairing. Free.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟡create_number(name, historySync, age, idempotencyKey)
Create a new WhatsApp number slot on the account and return it. This is step one of two: the slot starts `disconnected` and cannot send until pair_number links a real WhatsApp account to it. How many can exist at once is what the plan sells. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "A label you choose, e.g. “Support”. Only you ever see it."
},
"historySync": {
"description": "Ask WhatsApp for older chats when the number pairs. Off by default. WhatsApp sends the most recent chats either way, and the number keeps them like any other message (see historyPerChat).",
"type": "boolean"
},
"age": {
"description": "How long this WhatsApp line has been in real use. We cannot see it, so we ask. It sets how many NEW conversations the number may start per day: `new` (registered days ago) starts at 5/day and climbs, `established` (in use over a month) starts at the 20/day ceiling. Defaults to `new`, the safe answer. Overstating it only costs you the number.",
"type": "string",
"enum": [
"new",
"weeks",
"established"
]
},
"idempotencyKey": {
"description": "Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours.",
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"name"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢number_status(numberId)
One number's current state: `connected` (ready to send), `pairing` (waiting for a scan), `disconnected` (session dropped; pair it again) or `banned` (WhatsApp restricted the number; check WhatsApp on the phone before confirming recovery). Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"numberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Id of the number, from list_numbers."
}
},
"required": [
"numberId"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴update_number(numberId, name, age, newConversationsPerDay, historyPerChat, ...)
Rename a number, correct the age its owner declared, or change how it sends. `pacing` is the send queue. On by default: messages to one person wait unless they reply to a message received in the last 24 hours. Known contacts still wait, and every batch message uses the full gap. Queued messages leave one at a time, 15–25 minutes apart unless you change the gap. An offline or restricted number pauses the queue. Messages that have not left resume with the configured spacing when it reconnects. `humanize` controls the steps before sending: come online, read the last message and show the typing indicator. This adds a few seconds and does not bypass the queue. `newConversationsPerDay` sets your own daily limit on new conversations in place of the automatic one. Automatic grows with the line's age, 5 → 10 → 20 a day, and it is what we recommend. Above that, WhatsApp is more likely to ban the number, and that risk is yours. `null` goes back to automatic, and a ban does the same. `historyPerChat` is how many of the latest messages of each chat we keep for this number, so get_chat_history can read them back. It is 100 unless you change it, and 0 keeps none from then on. Everything is optional and merges into what is already there. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"numberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Id of the number, from list_numbers."
},
"name": {
"description": "The label you chose.",
"type": "string",
"minLength": 1,
"maxLength": 80
},
"age": {
"description": "Correct how long this WhatsApp line has been in real use. It sets how many NEW conversations the number may start per day, unless newConversationsPerDay sets your own. Overstating it only costs you the number.",
"type": "string",
"enum": [
"new",
"weeks",
"established"
]
},
"newConversationsPerDay": {
"description": "Your own daily limit on NEW conversations, 1–1000, in place of the automatic one (5 → 10 → 20 a day as the line ages, which is what we recommend). Above that, WhatsApp is more likely to ban the number. null goes back to automatic; a ban does the same.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 1000
},
{
"type": "null"
}
]
},
"historyPerChat": {
"description": "How many of the latest messages of each chat we keep for this number, 0–1000 (100 unless you change it), so get_chat_history can read them back. 0 keeps none from then on.",
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"pacing": {
"description": "How this number spaces queued messages. Messages to known contacts still wait unless they reply to a message received in the last 24 hours. Every batch message uses the full gap.",
"type": "object",
"properties": {
"enabled": {
"description": "Queue individual messages unless they reply to a message received in the last 24 hours. On by default. Every batch message waits the full configured gap, including replies and known contacts. Turning this off makes sends immediate; space them yourself to avoid bursts.",
"type": "boolean"
},
"minMinutes": {
"description": "Shortest gap between queued messages released by this number, in minutes. Default 15.",
"type": "integer",
"minimum": 1,
"maximum": 720
},
"maxMinutes": {
"description": "Longest configured gap between queued messages, in minutes. Default 25. Each gap is picked at random between the shortest and longest. An offline number or a slow send can make the actual wait longer.",
"type": "integer",
"minimum": 1,
"maximum": 720
}
},
"additionalProperties": false
},
"humanize": {
"description": "Which parts of the human act this number performs on every send. Each one is a pattern WhatsApp can read: a session that is never online, never reads and answers a long message instantly is describing itself as software.",
"type": "object",
"properties": {
"enabled": {
"description": "Send like a person at all. On by default.",
"type": "boolean"
},
"typing": {
"description": "Show “typing…” for as long as the message would take to type, before sending it.",
"type": "boolean"
},
"presence": {
"description": "Come online before sending, go offline after.",
"type": "boolean"
},
"markRead": {
"description": "Put blue ticks on what the recipient last wrote before answering it. Turn this off if read receipts on your own chats are not wanted.",
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"numberId"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢list_queued_messages(numberId, limit)
Every message waiting in a number's send queue, soonest first. Messages to one person wait unless they reply to a message received in the last 24 hours. Known contacts still wait, and every batch message waits the full gap. Accepted messages are charged then released one at a time, 15–25 minutes apart by default, measured from the previous message's actual release. `scheduledAt` is an estimate. `paused` means the number is not connected; messages that have not left stay queued and resume with the configured spacing when it reconnects. `message.sent` arrives when one leaves. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"numberId": {
"description": "Only this number's queue. Omit for every number on the account.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"limit": {
"description": "How many to return, soonest first. Default 200.",
"type": "integer",
"minimum": 1,
"maximum": 200
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴cancel_queued_message(id)
Remove a waiting message before its send begins. The answer says whether its message quota was returned. Any new-conversation budget it reserved is released too. A send that has already begun cannot be cancelled. The id is the one the send call returned. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Id of the queued message, from the send call's answer."
}
},
"required": [
"id"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢typing(to, from, state, recording)
Show (or clear) the “typing…” indicator in a chat. Free: it is not a message. WhatsApp clears it on its own after a few seconds, so call it again for a long reply.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"state": {
"description": "`composing` shows the indicator, `paused` clears it. Default: composing.",
"type": "string",
"enum": [
"composing",
"paused"
]
},
"recording": {
"description": "Show “recording audio…” instead of “typing…”.",
"type": "boolean"
}
},
"required": [
"to"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴mark_read(to, from, messageIds)
Put blue ticks on messages your number received in a chat. Free. Message ids come from the inbound webhook.
Eingabe-Schema
{
"type": "object",
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Recipient: a phone number in international format (+5511988887777) or a WhatsApp address ([email protected], an @lid contact, or a @g.us group)."
},
"from": {
"description": "Which of your WhatsApp numbers sends this: its id or its phone number. Optional: with a single connected number it is resolved for you.",
"type": "string",
"minLength": 1
},
"messageIds": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"description": "Ids of the received messages to acknowledge."
}
},
"required": [
"to",
"messageIds"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢list_chats(number, limit)
The chats a number kept messages from, most recent first: the people and groups it received messages from or sent messages to. Each `chat` is written the way the message.created webhook writes it, so it matches the chats your server already knows. Read one with get_chat_history. A chat is listed while any of its messages are kept, so the list follows the number's historyPerChat (see update_number); 0 keeps none, and lists none. A contact whose number WhatsApp hides comes back as its phone once your number has seen it, and as its …@lid address until then. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"number": {
"description": "Which of your numbers: its id or its phone. Optional when you have only one.",
"type": "string",
"minLength": 1
},
"limit": {
"description": "How many to return, most recent first. Up to 500; 50 when left out.",
"type": "integer",
"minimum": 1,
"maximum": 500
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_chat_history(chat, number, limit)
The latest messages of one chat, newest first: what your number received, what it sent from the phone or through us, and what WhatsApp sent when the phone was linked. Each message has the shape the message.created webhook delivers, so the same code reads both, and a webhook your server missed can be read back here. We keep the latest 100 messages of each chat unless you change the number's historyPerChat with update_number; 0 keeps none. Media comes as its details, never the file. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"chat": {
"type": "string",
"minLength": 1,
"description": "The chat: a phone number in international format (+5511988887777), or the address a webhook gave you for a group or for a contact whose number is hidden (…@g.us, …@lid)."
},
"number": {
"description": "Which of your numbers kept the chat: its id or its phone. Optional when you have only one.",
"type": "string",
"minLength": 1
},
"limit": {
"description": "How many to return, newest first. Up to 100; 50 when left out.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"chat"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_usage
Messages sent this month against the plan quota, today against the daily fair-use cap, the leftover credit balance, and the per-key breakdown. Read this before a bulk send. Free.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_webhook
The endpoint events are being POSTed to, which ones it is subscribed to, and whether it is still healthy. `null` when none is registered. `disabledReason: "failures"` means we stopped delivering after repeated failed attempts. Fix the endpoint and set it again (or fire a test) to switch it back on. Free.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴set_webhook(url, events, rotateSecret)
Point whatsapi.sh at an https URL and start receiving events there. The answer carries the signing secret ONCE, on first registration: keep it. Every delivery is signed with it in the `x-whatsapi-signature` header (`t=<unix>,v1=<hmac-sha256 of "<t>.<body>">`), and that signature is how you know a request is really from us. Calling this again updates the URL or the subscription and keeps the same secret unless you ask to rotate it. Saving also re-enables an endpoint we had disabled. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "Where to POST events, e.g. https://api.yourapp.com/webhooks/whatsapp."
},
"events": {
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"message.created",
"message.sent",
"message.failed",
"message.status",
"number.connected",
"number.disconnected",
"number.logged_out",
"number.history_synced"
]
},
"description": "Which events to receive: message.created, message.sent, message.failed, message.status, number.connected, number.disconnected, number.logged_out, number.history_synced. Defaults to all of them."
},
"rotateSecret": {
"description": "Mint a new signing secret and return it. The old one stops working.",
"type": "boolean"
}
},
"required": [
"url"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟡test_webhook
Send a `ping` event to your registered endpoint right now and wait for the answer, so you can verify the URL and your signature check without waiting for a real message. The result is the actual outcome: `ok: false` carries the HTTP status your server answered, or why we could not reach it. A successful ping also revives an endpoint we had auto-disabled. Free.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🟢get_supabase_hook
The hook Supabase Auth calls to send a phone code: its URL, the number codes leave from, the message template, which API key the codes are metered under, and `statusUrl`, which says whether a code would go out right now. `null` when none is set. Free.
Eingabe-Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴set_supabase_hook(numberId, template, rotateSecret)
Create or update the hook that lets a Supabase project send its phone sign-in and verification codes over WhatsApp instead of SMS. Supabase keeps making and checking the code; we deliver it. On Supabase Cloud, open Authentication → Auth Hooks, add a Send SMS hook of type HTTPS, and paste the answer's `record.url` and `secret`. If you host Supabase yourself, put `record.url` in `GOTRUE_HOOK_SEND_SMS_URI` and `secret` in `GOTRUE_HOOK_SEND_SMS_SECRETS`, then set `GOTRUE_HOOK_SEND_SMS_ENABLED: "true"`. The secret comes back ONCE, on the first save or when you rotate it; after a rotation the old one keeps working for 24 hours. Codes are metered under the API key that saves the hook. Each code is a normal message: it counts toward your quota, and the first code to someone the number has never talked to uses one of its new conversations for the day. Free to call.
Eingabe-Schema
{
"type": "object",
"properties": {
"numberId": {
"description": "The number codes are sent from. `null` uses your one connected number. Leave it out to keep the current choice.",
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"template": {
"description": "The message, with `{code}` where the code goes, e.g. \"Your Acme code is {code}\". `null` restores the default. Leave it out to keep the current one.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1000
},
{
"type": "null"
}
]
},
"rotateSecret": {
"description": "Mint a new secret and return it. The old one keeps working for 24 hours, while you update Supabase.",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴pair_number(numberId, recoveryConfirmed, mode, phone)
Start (or resume) linking a WhatsApp account to one of your numbers. `qr` returns a QR code to scan from WhatsApp → Linked devices; `code` returns an 8-character linking code to type there instead, and needs the phone number being linked. Call it again every few seconds while someone scans: WhatsApp swaps the QR every 20 seconds, so show the one from the latest answer, and `state` turns `"connected"` when the scan lands. `state: "pairing"` with no code yet means it is still being made. Each linking session makes codes for `expiresIn` seconds; once that reaches 0, call again to start a new one. A restricted number needs `recoveryConfirmed: true`: set it only after checking that WhatsApp works on the phone. Temporary restrictions may clear after about an hour or take up to 24 hours; follow the notice on the phone, not a fixed timer. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"numberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Id of the number to pair, from list_numbers."
},
"recoveryConfirmed": {
"description": "Confirm that WhatsApp works on the phone before reconnecting a restricted number. Required only while its status is banned. Never confirm automatically.",
"type": "boolean"
},
"mode": {
"description": "`qr` (default) or `code` for the type-in linking code.",
"type": "string",
"enum": [
"qr",
"code"
]
},
"phone": {
"description": "Required with `mode: \"code\"`: the phone number being linked.",
"type": "string",
"minLength": 8
}
},
"required": [
"numberId"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}🔴cancel_pairing(numberId)
Stop an unfinished pairing attempt without logging the phone out or deleting the number. A number that is already connected stays connected. Call pair_number to try again. Free.
Eingabe-Schema
{
"type": "object",
"properties": {
"numberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Id of the number, from list_numbers."
}
},
"required": [
"numberId"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}Community
Nachweis