Skip to content

Running WhatsApp unattended

Everything a workflow needs to send and receive WhatsApp messages with nobody watching: what WhatSync guarantees, every answer you can get, and the limits.

The short version

  • Give every message one idempotency key, and keep it for every retry of that message. Keys never expire.
  • A timeout is not a failure. Send the same request again with the same key, or look the send up. Never switch to a new key when you are not sure.
  • Every answer that is not a 200 says in error.code whether anything was sent. Only two codes ask for a new key.
  • Webhook events can arrive twice. Skip an event id you have already handled.
  • A personal number sends at most 200 messages a day through the API on Max and 5 a minute. Reply to people who wrote first. For outreach, use the WhatsApp Business API with templates.
  • Tell a person when a send is refused or uncertain, when the number disconnects, and when a workflow fails.

The safe send workflow does the first three for you.

Idempotency keys: what is guaranteed

Every send takes a key: the Idempotency-Key header, or idempotencyKey in the JSON body (the body wins if you send both). 8 to 128 characters: letters, digits, dot, colon, underscore, hyphen.

You sendWhatSync does
A key it has not seenSends the message and records the result under that key.
The same key with the same messageSends nothing new. It answers with the first send's intent_id and its status now.
The same key with a different recipient or textSends nothing. 422 tool_error: "this idempotencyKey was already used for a different message".
A new key with the same text to the same person or group within an hourSends nothing. 422 tool_error: the same text twice within an hour looks like spam to WhatsApp. This also holds while an earlier send of that text is still uncertain.

How long a key is kept

Keys do not expire. WhatSync keeps the record of every send, so a retry next week or next year still answers with the first result.

What a key belongs to

A key is tied to the API key that used it and to the WhatsApp number that sends. The same idempotency key sent with a different API key is a different send. So keep one API key per integration, and do not swap API keys in the middle of a retry.

Which key to use

  • Replying to a webhook event: the event id (evt_...). One event, one reply.
  • A scheduled message: something fixed for that message, such as reminder-<appointment id>-<date>. Running the job twice then sends once.
  • Several messages for one event: add a suffix, evt_....1, evt_....2.
  • Never a new random value on a retry. That is how double sends happen.

Group messages, files, polls and other actions work the same way. They answer with an operation_id instead of an intent_id, and get_operation looks them up.

Timeouts: when no answer comes back

WhatSync waits up to 20 seconds for WhatsApp to accept a message. Set your own timeout to 30 seconds, so WhatSync normally answers first.

If your request times out before you get an intent_id, you do not need one. Send the identical request again with the same key. That request is the lookup:

Answer to the repeatMeaningNext step
200 with status acceptedThe first request went through. One message was sent.Done.
200 with a new sendThe first request never reached WhatSync. It is sent now.Done.
409 outcome_unknown with error.intent_idThe first request is still sending, or WhatSync could not confirm it.Call get_send_status with that id every few seconds.
No answer againThe network is still down.Repeat with the same key after 5, 15, 30 and 60 seconds, then tell a person.
409 outcome_unknown
HTTP/1.1 409 Conflict

{
  "error": {
    "code": "outcome_unknown",
    "message": "The action may have been accepted. Inspect get_operation or get_send_status; do not retry with a new key.",
    "intent_id": "5633a358-91a2-5701-a22e-e485b35b9eb8"
  }
}

If get_send_status keeps answering unknown, WhatSync asked WhatsApp to send and never learned the result. Do not resend automatically. A person opens the chat and looks. A new key would not help either: the same text to that person is refused for an hour while the first send is uncertain.

Send and delivery statuses

A send has two separate fields. status is what happened to your request. delivery_status is what happened on the way to the other phone.

statusMeaning
acceptedWhatsApp took the message. This is the success answer.
sendingIn progress right now. Look again in a few seconds.
failedNothing was sent. error says why.
unknownWhatSync could not learn whether WhatsApp took it. Never resend automatically.
pending, expired, cancelledOnly for messages that wait for a person's approval in an AI app. Nothing was sent.

Delivery on the WhatsApp Business API

Meta reports each step, and get_send_status returns the newest one with its time:

delivery_statusMeaning
nullNo receipt yet. Normal for the first seconds.
sentMeta sent it on.
deliveredIt reached the recipient's phone.
readThe recipient opened it. Only if they have read receipts on.
failedMeta could not deliver it. delivery_errors has Meta's code and text, and next_action says what to fix.
get_send_status, Business API
{
  "intent_id": "2f8135fc-5e0f-591b-acf0-4626cb8618f0",
  "status": "accepted",
  "recipient_phone": "15550000011",
  "channel": "business",
  "provider_message_id": "wamid.HBgLMTU1NTAwMDAwMTE...",
  "delivery_status": "delivered",
  "delivery_status_at": "2026-11-27T15:39:21.000Z",
  "delivery_errors": [],
  "next_action": null,
  "error": null,
  "note": "A provider receipt confirmed delivery."
}

You can also subscribe to the message.status webhook event and get each change pushed to you. A missing receipt is not a reason to resend.

Delivery on a personal number

A linked personal number gets no per-message receipts through WhatSync: there is no sent, read or failed, and no message.status events. status: accepted is the confirmation that WhatsApp took the message. delivery_status then changes from null to delivered once WhatSync has saved its own copy of the sent message in the chat. Treat that as "it is in the chat", not as proof the other phone received it.

Every answer and what to do

Errors always have the same shape. Retry-After is also sent as a header.

An error answer
HTTP/1.1 429 Too Many Requests
Retry-After: 30

{
  "error": {
    "code": "new_people_limit",
    "message": "WhatSync sent nothing: this number messaged someone it never chatted with less than 30 seconds ago. ... Send again after Retry-After with a new idempotency key.",
    "sent": false,
    "reason": "new_people_limit",
    "draft_link": "https://wa.me/15550000078?text=Hello%2C%20your%20parcel%20arrived",
    "message_text": "Hello, your parcel arrived",
    "retry_after": 30
  }
}
HTTPerror.codeWas anything sent?What to do
200(none)Yes: status accepted.Done. On the Business API, check delivery.
429rate_limitedNo.Wait Retry-After seconds. Send again with the same key.
429new_people_limitNo.Wait Retry-After seconds. Send again with a new key. error.draft_link lets a person send it by hand now.
429daily_limit_reachedNo.The day's sends are used up. Retry-After counts to 00:00 UTC. Then send again with a new key.
409outcome_unknownMaybe.Never a new key. get_send_status with error.intent_id, or get_operation with error.operation_id.
409sending_offNo.The owner switched sending off. Stop and tell a person. It is in the dashboard under Settings, Sending.
409whatsapp_not_connectedNo.The number needs linking again. Stop and tell a person.
422from_number_requiredNo.The account has several numbers. Add fromNumber to the body.
422tool_errorNo.Read error.message: the same text within an hour, the 24-hour window is closed, the number is not on WhatsApp, the key was used for another message. Fix the cause. Do not retry as is.
400, 413, 415invalid_inputNo.Fix the request: bad JSON, a missing field, a body over 600,000 bytes, or not application/json.
401invalid_api_keyNo.The key is wrong or revoked. Tell a person.
403plan_required, insufficient_permissionNo.The account is below Max, or the key lacks a permission.
404unknown_toolNo.Check the tool name against GET /api/v1/tools.
503, or no answertool_errorMaybe.Send the same request again with the same key.
429 rate_limited: same key
HTTP/1.1 429 Too Many Requests
Retry-After: 48

{
  "error": {
    "code": "rate_limited",
    "message": "This number already tried to send 5 messages in the last minute, so WhatSync held this one back and sent nothing. WhatsApp flags numbers that send many messages in a quick burst. It can go in about 48 seconds.",
    "retry_after": 48
  }
}
409 sending_off: stop
HTTP/1.1 409 Conflict

{
  "error": {
    "code": "sending_off",
    "message": "Sending is turned off for this WhatsApp number by its owner, so WhatSync sent nothing. Nothing will send until the owner turns sending back on.",
    "sent": false,
    "reason": "sending_off",
    "draft_link": "https://wa.me/15550000001?text=Sending%20off%20test",
    "message_text": "Sending off test"
  }
}

A send that did not go out never answers 200. If the answer is 200, WhatsApp took the message.

Webhooks: delivery, repeats and signatures

  • Answer fast. WhatSync waits 10 seconds for a 2xx. n8n's Webhook node set to respond immediately and Make's custom webhook both do.
  • Events can arrive twice. Delivery is at least once, and a person can resend an event from the delivery log. Every event has a stable id, also sent as the webhook-id header. Keep the ids you have handled and skip a repeat.
  • Order is not guaranteed. Use data.message.timestamp, not arrival order.
  • Failures are retried after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours and 12 hours. After 9 attempts the delivery is marked failed.
  • A dead URL is switched off. HTTP 410 disables the webhook at once. So do 100 failures in a row with no success for three days. Redirects are not followed.
  • Nothing is lost for seven days. Payloads are kept that long, and a failed or delivered event can be sent again from Developers or with POST /api/v1/webhooks/{id}/deliveries/{deliveryId}/retry.
  • Only saved chats send events. The chats you chose under What's saved. Your own sends arrive as message.sent, never message.received, so a reply cannot trigger itself.

Check the signature

Every delivery is signed the Standard Webhooks way: webhook-signature holds v1, plus the base64 HMAC-SHA256 of id.timestamp.body, keyed with your signing secret (the part after whsec_, base64 decoded). Check it on the raw body before you trust anything in it, and refuse a webhook-timestamp more than five minutes old.

  • n8n: the Verify signature node in every workflow here does this. The WhatSync Trigger of the community node does it by itself.
  • Make cannot compute this check. Add your own secret header to the webhook instead and let Make require it: see WhatsApp scenarios in Make.
  • Your own code: copy the Node.js, Python or PHP function from Webhooks.

See why deliveries fail

GET /api/v1/webhooks lists each webhook with consecutive_failures and last_failure, which says in plain words what went wrong and how to fix it. The delivery log (GET /api/v1/webhooks/{id}/deliveries) has the status code and the first 4,096 bytes of your server's answer.

Limits for unattended sending

A personal number

LimitValueAnswer when reached
Sends a day through the API200 on Max, 300 on Business. Resets at 00:00 UTC.429 daily_limit_reached
Sends a minute5 per number429 rate_limited
The same text to the same person or groupOnce every 60 minutes422 tool_error
People the number never chatted with10 per 24 hours (20 on Business), at least 30 seconds apart429 new_people_limit
New people in the first dayNone in the first 24 hours after the number is linked429 new_people_limit
New groups1 every 10 minutes, 2 an hour, 10 a day429 rate_limited

Messages, files, reactions, polls and group messages all count toward the daily and per-minute limits. Sends made by an AI app such as ChatGPT or Claude have their own daily count on the same number and do not use up the API's. Someone who wrote to you, or is saved in the phone's contacts, is never a new person.

A WhatsApp Business API number

WhatSync sets no daily or per-minute send limit for API keys. Meta's own messaging limits, template rules and the 24-hour window apply.

The API itself

LimitValue
Read tools600 requests a minute per key
Write tools120 requests a minute per key
Calls in flight3 per account. Extra calls wait up to 15 seconds for a free slot, then get 429.
Request body600,000 bytes
Message text4,096 characters
API keys and webhooks10 keys and 10 webhooks per account

Keeping a personal number safe

WhatsApp restricts numbers for what they send, not for what they read. A linked personal number is your own WhatsApp, and WhatsApp treats it like a person's phone.

  • Safe: replying to people who wrote to you, and writing to people you already chat with. That is what the limits above are sized for.
  • Risky: writing first to people who never heard from you, or the same text to many people. WhatsApp bans numbers for this, sometimes within seconds, and a newly linked number most of all.
  • For outreach, reminders to customers and anything in bulk: connect a number on the official WhatsApp Business API and send approved templates to people who agreed to hear from you.

The owner can stop every send at once with the sending switch in the dashboard under Settings, Sending. Reading and webhooks keep working, and your workflow gets sending_off.

The 24-hour window on the Business API

On the Business API, free text is only allowed within 24 hours of the customer's last message to you. A reply to a webhook event is always inside the window. Outside it, free text is refused with 422 tool_error: "No inbound customer message in the last 24 hours. Use an approved template instead."

  • Ask first with check_recipient_send_options: can_send_freeform and approved_template_required tell you which one applies.
  • A template needs templateName, templateLanguage, templateParameters (one value per variable, in order) and recipientOptInConfirmed: true. Only set that when the person agreed to get messages from you.
  • Templates with a media header, or with a button that needs a value, cannot be sent through the API yet. Fixed buttons work.

Hear about it when something breaks

An unattended setup needs three alerts. Each one is a small workflow you import once.

  • n8n: alert when a workflow fails

    Set it as the Error workflow of every WhatSync workflow.

    Download JSON
  • n8n: alert when WhatsApp disconnects

    connection.disconnected and connection.connected events.

    Download JSON
  • A send was refused or is uncertain. Every workflow here checks safe send's ok and alerts a person when it is false.
  • The number disconnected. A phone can log a linked number out. Until someone links it again nothing is received or sent. See Alert when WhatsApp disconnects.
  • The workflow itself failed. Import the error alert, publish it, and choose it as Error workflow in each workflow's settings. A wrong signing secret, an expired key or a broken step then reaches a person at once.

Go-live checklist

  1. The API key has only the permissions the workflow needs, and lives in a credential, not in a node's text.
  2. The webhook signature is checked, or Make requires your secret header.
  3. Repeated events are skipped by event id.
  4. Every send uses a key that stays the same on a retry.
  5. A 30-second timeout on the send, and the same key on the retry.
  6. A person is alerted when a send is not_sent, undelivered or unknown.
  7. The disconnect alert and the error workflow are on.
  8. You sent WhatSync's test event and saw it stop at the filter.
  9. You wrote from a second phone and got exactly one reply.
  10. You switched sending off in the dashboard, wrote again, and the alert arrived. Then you switched it back on.
  11. Your replies are not all the same text: the same text to one person is refused within an hour.
  12. On a personal number: the workflow only answers people who wrote first.