Prompt for your AI coding assistant
Building your SendSeven integration with Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Windsurf or another AI coding assistant? Give it the prompt below first. It tells the assistant what SendSeven is, how authentication, errors, rate limits and pagination work, and, most importantly, where to read the real documentation, so it writes code against our actual API instead of guessing.
The prompt
You are helping me integrate the SendSeven API into this project.
ABOUT SENDSEVEN
SendSeven is a customer messaging platform for marketing, sales and support teams,
built on a powerful unified messaging API. It brings eight channels together:
WhatsApp, SMS, Email, Instagram, Messenger, Live Chat, Telegram and Browser Push.
Teams handle every incoming conversation in one shared inbox, manage contacts, run
campaigns, create WhatsApp templates and automate replies with visual flows and AI bots.
Developers can use all of this through one REST API with one consistent schema for
messaging, contacts, conversations, templates, campaigns and flows, plus webhooks for
real-time events and an official MCP server. In Germany, RCS Business Messaging is
available as an additional channel. SendSeven is hosted in the EU and is a Meta
Business Partner.
API BASICS
- Base URL: https://api.sendseven.com/api/v1
- Auth: send my API token on every request as `Authorization: Bearer <token>` together with
`Content-Type: application/json`. Tokens look like `s7_api_` + 32 hex characters and are
created in the SendSeven app under Settings > API Tokens. The workspace (tenant) is embedded
in the token, so no X-Tenant-ID header is needed. Each token has scopes (`resource:action`,
e.g. `messages:create`, `contacts:read`); a missing scope returns 403 and the `detail` names it.
- Errors: JSON with a `detail` field (usually a string) and often an `error_code`
(e.g. INVALID_TOKEN, INSUFFICIENT_SCOPE, RESOURCE_NOT_FOUND, RATE_LIMITED). Request-validation
errors are HTTP 422 with `detail` as a list of {loc, msg, type} objects.
- Rate limits: 100 requests/minute on standard endpoints, 10/minute on bulk operations.
Responses carry X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-Reset. On HTTP 429,
wait for the Retry-After header (seconds), then retry with exponential backoff.
- Pagination: list endpoints take `page` (1-based) and `page_size` (usually max 100) and return
{"items": [...], "pagination": {"total", "page", "page_size", "total_pages", "has_next",
"has_prev"}}. Loop while `has_next` is true.
- Conventions: a POST that creates returns 201 with the created object; DELETE usually
returns {"success": true, "id": "..."}. IDs are strings. Timestamps are ISO 8601.
DOCUMENTATION (read it, don't guess)
- Index of all docs pages, written for LLMs: https://docs.sendseven.com/llms.txt
- Every docs page is also available as plain Markdown: append `.md` to its URL
(e.g. https://docs.sendseven.com/getting-started/quickstart.md).
- Machine-readable OpenAPI 3.1 spec (source of truth for endpoints, fields and scopes):
https://api.sendseven.com/api/v1/openapi.json
(snapshot mirror: https://docs.sendseven.com/openapi/sendseven-api.json)
- Interactive API reference for humans: https://api.sendseven.com/api/v1/docs
KEY PAGES (Markdown)
- Overview: https://docs.sendseven.com/index.md
- Quickstart: https://docs.sendseven.com/getting-started/quickstart.md
- Authentication & scopes: https://docs.sendseven.com/getting-started/authentication.md
- Error handling: https://docs.sendseven.com/getting-started/error-handling.md
- Rate limits: https://docs.sendseven.com/getting-started/rate-limits.md
- Send a text message: https://docs.sendseven.com/guides/messaging/send-text-message.md
- Send media: https://docs.sendseven.com/guides/messaging/send-media-message.md
- Buttons & lists: https://docs.sendseven.com/guides/messaging/interactive-messages.md
- What each channel supports: https://docs.sendseven.com/guides/messaging/channel-capabilities.md
- Webhooks setup: https://docs.sendseven.com/guides/webhooks/setup.md
- Webhook events & payloads: https://docs.sendseven.com/guides/webhooks/events.md
- Webhook signature verification: https://docs.sendseven.com/guides/webhooks/signature-verification.md
- Contacts: https://docs.sendseven.com/guides/contacts/manage-contacts.md
- Conversations: https://docs.sendseven.com/guides/conversations/overview.md
- WhatsApp getting started: https://docs.sendseven.com/guides/whatsapp/getting-started.md
- WhatsApp 24-hour window: https://docs.sendseven.com/guides/whatsapp/24h-window.md
- WhatsApp templates: https://docs.sendseven.com/guides/whatsapp/templates.md
- Send a WhatsApp template: https://docs.sendseven.com/guides/whatsapp/send-template.md
- Multi-tenancy & sub-accounts (only for platforms serving several customers):
https://docs.sendseven.com/multi-tenancy/overview.md
- Code examples: https://docs.sendseven.com/guides/code-examples/quick-reference.md
- MCP server (let an AI assistant call SendSeven directly):
https://docs.sendseven.com/guides/mcp/mcp-server.md
WORKING RULES
1. Before writing code for a feature, fetch the relevant `.md` pages above (or find them via
llms.txt) and read them.
2. Never invent endpoints, fields, enum values, event names or scopes. If something is not in
the docs, look it up in the OpenAPI spec; if it is not there either, tell me instead of
guessing.
3. Keep the API token server-side only: read it from an environment variable
(e.g. SENDSEVEN_API_TOKEN) or a secrets manager. Never hard-code it, commit it, log it, or
ship it to a browser or mobile app. Request only the scopes the integration needs.
4. Webhooks: verify the X-Sendseven-Signature HMAC-SHA256 over the RAW request body exactly as
described in the signature-verification page, check the timestamp, answer the one-time
verification challenge, respond 2xx quickly and process asynchronously, and make handlers
idempotent (deliveries can be retried).
5. Handle 429 and 5xx with backoff that honours Retry-After. Do NOT blindly retry message
sends after a timeout: SendSeven does not deduplicate sends, so a retry can deliver (and
bill) the message twice. Check first (GET /messages/{message_id} or the conversation's
messages) whether it went out.
6. Respect channel rules: outside WhatsApp's 24-hour customer-service window you can only send
an approved template; check channel-capabilities before using buttons, lists or media.
7. Test against a trial or test workspace and your own phone number / test channel before
pointing the code at real customers.
8. Write small, typed API helpers with clear error handling, and keep the base URL configurable.
The Copy prompt button copies just the prompt. The Copy page button at the top copies this whole page as Markdown, which also works.
How to use it
- Claude Code, OpenAI Codex, Cursor, Copilot Chat, Windsurf: paste the prompt as your first message, then describe what you want to build, for example "Send an order confirmation over WhatsApp when an order is paid, and store inbound replies in our database."
- Make it permanent: save the prompt in your project's agent instructions file so the assistant reads it in every session:
- Claude Code:
CLAUDE.md - OpenAI Codex and other agents that read it:
AGENTS.md - Cursor: a rule in
.cursor/rules/(or the legacy.cursorrules) - GitHub Copilot:
.github/copilot-instructions.md
- Claude Code:
- Let it look things up: the assistant needs web access (a fetch or browse tool) to read the linked
.mdpages and the OpenAPI spec. If it has none, download the files it needs and add them to the project. - Want the assistant to operate SendSeven, not just write code for it? Connect the SendSeven MCP server.
Resources
llms.txt: index of every docs page, linking to the Markdown versions- Every docs page as Markdown: append
.mdto the URL, for example/getting-started/quickstart.md - OpenAPI 3.1 spec (live) and a downloadable snapshot
- Postman collection: import it into Postman, then set the
apiTokencollection variable to your API token. Postman, Insomnia and Bruno can also import the OpenAPI spec directly. - Interactive API reference
Key guides
- Quickstart
- Authentication
- Error handling
- Rate limits
- Send a text message · Send media · Interactive messages · Channel capabilities
- Webhooks setup · Webhook events · Signature verification
- Contacts · Conversations
- WhatsApp getting started · 24-hour window · Templates · Send a template
- Multi-tenancy & sub-accounts
- Code examples
- MCP server