Skip to content
SocialMate

SocialMate Local API

Connection, settings & operations

The scope-aware credential, account settings, and the full action-node operation reference with request/response examples.

This page is the settings and operation reference for the SocialMate action node. For the trigger node and its events see Trigger node & events.

Create a connection in the app

Let SocialMate provision the credential for you — it mints a correctly-scoped key and pre-registers the webhook secret in one step:

  1. In the desktop app open API & Integrations → n8n → New connection.
  2. Pick the account scope — This account, Selected accounts, or All accounts. The key is bound to that scope; it can never touch an account you didn't allow.
  3. Copy the Server URL and API key into the n8n credential below.

The SocialMate API credential

credential socialMateApi
FieldWhat to enter
Server URLYour SocialMate server base URL, no trailing slash. Use http://127.0.0.1:3456 when n8n runs on the same machine, or your Pro Named tunnel hostname for remote n8n. Quick *.trycloudflare.com URLs are not supported — they rotate on restart and break the saved credential.
API keyThe key from API & Integrations → n8n. The key itself decides which WhatsApp accounts it can use and which scopes (read / send / admin) it carries.

n8n verifies the credential with a single GET /v1/capabilities call — it returns the server version, your tier and the feature flags, confirming reachability and key validity at once.

The Account setting (scope-aware)

Every operation has an Account dropdown that lists only the accounts your key allows — and auto-selects when the key is bound to a single account, so there's nothing to type. This replaces the old "Default Account ID" field. Server-side scope enforcement means even an All accounts key only ever sees the accounts it was granted.

Key scopes

Keys carry one or more scopes; an operation that needs an ungranted scope returns a clear 403:

ScopeGrants
readAll GET reads — accounts, chats, contacts, media, status.
sendSending messages and triggering media downloads. (Triggering a sync needs admin.)
adminManaging webhooks and API keys (the trigger node needs this to self-register).

Local vs remote reach

FreePro
Where n8n can runSame machine (localhost)Same machine or remote
ReachLocal onlyLocal + remote via a stable Named tunnel
Accounts per connection1This / selected / all

Operation reference

One node, grouped by resource. Free operations work on every tier; Pro operations need a Pro license (the API returns a clear 402 on Free so your workflow fails loudly, not silently).

ResourceOperationsTier
MessageSend Text (with Reply To Message ID) · React · Mark Read · Send TypingFree
Send Media · Send Poll · Get Poll Results · Send Location · Send Contact · Get AI Context · Search / List historyPro
ChatGet ManyFree
ContactGet · Get Many (search + paginate)Free
Update — Agent Memory: save a name/notes/email/company/tags your AI learnedPro
GroupGet Many · Get · Get Invite LinkFree
Create · Update Participants · Set Subject · Set Description · LeavePro
MediaGet Many (incl. Has Cached Context filter) · Get · Get Stats · Download File (binary) · Download Thumbnail · Get Download QueueFree
Force Download · Delete · Run Cleanup (server-wide retention/quota) · Set Context (Agent Memory: cache an AI description)Pro
QueueGet Status · Get Items · Get BatchesFree
Enqueue Message · Queue a Batch · Pause · Resume · Cancel/Retry Item · Cancel/Retry BatchPro
AccountGet Many · Get · Get Anti-Ban Status (live risk, warming, rate limits) · Get Proxy (masked)Free
Set Proxy · Clear Proxy — route an account's connection through your own residential/mobile proxy, so a headless VPS presents a residential IP instead of a datacenter one. Needs an admin-scoped key.Pro
SyncGet StatusFree
Trigger (full / contacts / messages / chats)Pro
WebhookGet Many · Get · Create · Update · Delete · Test · Get DeliveriesFree
API KeyGet Many · Create · Rotate · DeleteFree
SystemGet Capabilities · Get Status · Get Network Status · Get VersionFree

Send Text — the result envelope

A send can resolve three ways, and the node surfaces each so your workflow can branch:

StatusBodyMeaning
200{ sent: true, messageId, status: "sent" }Delivered to WhatsApp immediately.
202{ queued: true, itemId }Pro The anti-ban engine deferred the send; the queue worker retries when it's safe.
409{ error: … }The account isn't connected — link it in the app first.
429{ error: … }On Free a rate-limited send is blocked (not queued); on Pro it auto-queues as 202.

Queue a Batch — many personalised messages, one call

Pro Queue → Queue a Batch takes a template with {{column}} placeholders and up to 5,000 rows, creating one managed batch: one individual, personalised message per person, each paced by the anti-ban engine. Use it when several people who are already waiting on you need the same news — an order delay, a new pickup time.

This is not a broadcast. Identical text to many contacts is blocked by the duplicate-content guard, so personalise every row. Only for people who contacted you or explicitly opted in — never a list you bought, scraped or guessed. Batch sending is off by default: switch it on deliberately, with consent, in the app first (it returns 403 until then). Each row carries a chatId plus the fields your template references; the smart queue paces every send through anti-ban and lets you pause, resume, retry or cancel the whole batch.

POST Queue → Queue a Batch Pro
template: "Hi {{name}}, your appointment is {{time}} on {{date}}."
rows: [
  { "chatId": "15551234567", "fields": { "name": "Jordan", "time": "10:00", "date": "Mon" } },
  { "chatId": "15557654321", "fields": { "name": "Sam",    "time": "11:30", "date": "Mon" } }
]
options: { "priority": 1, "scheduledAt": "2026-07-01T08:00:00Z", "batchName": "july-reminders" }

A row is { chatId, displayName?, fields? } — the template's placeholders read from fields. The schema is strict (additionalProperties: false), so putting name/time at the top level of the row instead of inside fields is rejected with a 400.

Get Anti-Ban Status — observe before you push

Account → Get Anti-Ban Status returns live risk, warming phase, pause state and the per-minute/hour/day rate limits for an account — read it in a workflow to throttle yourself, or to alert when an account enters cooling. Pair it with the anti-ban reference.

Errors you'll see

StatusMeaning
401Missing or invalid API key.
402A Pro feature on a Free license — the response names the required feature.
403The key lacks the required scope (read / send / admin).
429Two different things, and the node treats them differently. A transient per-key rate limit is retried for you (capped backoff). An anti-ban block is not retried — see below.

An anti-ban block is data, not an error

Since v2.7.0, when the anti-ban engine refuses a send, Send Text and Send Media return it as structured data rather than throwing:

{ "blocked": true, "reason": "night_mode", "retryAfterMs": 27000000, "hint": "…", "upgrade": "…" }

Branch on blocked. The node deliberately does not retry these: the older behaviour slept through Retry-After (which can be hours during quiet hours) and then threw a generic error that lost the reason. Route a blocked send to Queue → Enqueue Message on Pro and the smart queue replays it when the block clears; on Free, inspect reason and decide. A workflow that ignores blocked will look like it succeeded while sending nothing.

Building an AI agent? The single most useful operation is Message → Get AI Context — it hands your LLM the whole conversation in one call.

Free forever · no card Download free