> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superskope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration recipes

> Start with read-only checks, then add explicitly approved agent actions.

The repository's `examples/` folder contains runnable server examples. They use environment variables, never load the project's private environment, and do not contact a real service merely by being imported. Run them only against a reviewed installation and selected conversations.

## Node or Python status check

`node examples/node/messages.mjs` and `python3 examples/python/status.py` perform a read-only status request. They require your HTTPS installation origin and a key with `status:read`. The Python example uses the standard library; it is not a published Python SDK.

## Groups and direct messages

Use exact chat IDs returned by permitted API reads. A group ends in `@g.us`; a DM can use a phone or verified LID ID. Do not derive an alias from a visible phone number, strip suffixes, or accept a model's invented recipient.

`examples/node/agent-worker.mjs` supplies starter orchestration over the same customer SDK:

1. Durably receive a signed event using the [receiver](https://docs.superskope.com/developers/webhook-recipes.md).
2. Call `prepare(eventId)` to fetch authorized history and run your own decision function.
3. Review the draft. A separate host callback must authorize `sendApproved(eventId)`.
4. Persist the result. Accepted means engine acceptance; unknown work remains locked.
5. Call `inspect(eventId)` with the original key to read operation state without resubmitting.

Configure an API-owned or explicitly delegated agent ID; [agent setup](https://docs.superskope.com/developers/agents.md) explains creation and enrollment. The worker checks the queued account and current membership, then sends with bot context so human takeover remains enforced. Your host reviews that access snapshot against its business-user policy. The worker reserves a local intent before any send and keeps its request key across process restarts. It never automatically retries an unknown send. It does not implement Dietboite business roles or replace Boitebot's mention, reply and follow-up activation rules. Treat message text and retrieved documents as untrusted evidence.

## Reply, attach and react

```js theme={null}
await client.replyText(chatId, messageId, 'Here is the reviewed document.', {
  idempotencyKey: persistedReplyKey,
});
await client.sendAttachment(chatId, {
  type: 'pdf', data: reviewedPdfBase64, filename: 'document.pdf', replyTo: messageId,
}, { idempotencyKey: persistedFileKey });
await client.react(chatId, messageId, '👍', {
  idempotencyKey: persistedReactionKey,
});
```

Each line is a separate real mutation if run. Use separate previously persisted intent keys. Select the corresponding scopes and explicitly authorize the intended destination/content first. The repository's message CLI defaults to a read-only check; `--send` opts into a reviewed text/reply/PDF action.

## Connect your existing orchestration

Keep models, tools and business approvals in your own infrastructure. The SDK supplies scoped WhatsApp operations; it is not a model provider. Store credentials outside prompts and browser applications. An API integration must not bypass human takeover, group-admin rules or current conversation access.

For a workflow engine, use a verified internal webhook trigger and preserve the same event/intent records through execution retries. For an MCP host, use the read-only stdio adapter first. [SDK and MCP](https://docs.superskope.com/developers/sdk-mcp.md) explains the explicit host gates for writes and private pairing data.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.