# Use these docs with AI assistants

> llms.txt, Markdown versions of every page, Ask AI, the raw OpenAPI spec and the MCP server: everything an AI assistant needs to build a WhatSetter integration.

Source: https://docs.whatsetter.com/developers/ai-assistants/

These docs are written for people and for AI assistants. Every page exists as Markdown, the whole site fits in one file, and an assistant can act on your account through the MCP server.

## What these docs expose to AI

| Resource | Where | Use it for |
|---|---|---|
| Index of every page | `https://docs.whatsetter.com/llms.txt` | Give an assistant a map of the docs in one request. |
| Everything in one file | `https://docs.whatsetter.com/llms-full.txt` | Paste the whole documentation into a long-context model. |
| Any page as Markdown | Add `.md` to the page path, or send `Accept: text/markdown` | Feed one page without HTML noise. |
| Raw OpenAPI spec | `https://docs.whatsetter.com/openapi.yaml` | Generate a client, validate requests, let an assistant read every schema. |
| Ask AI | The **Ask AI** button in the header | Ask a question in English, French or Spanish. It answers from these docs only, with sources. |
| Page actions | **Copy page**, **Open in Claude**, **Open in ChatGPT** in the page header | Copy the Markdown, or open the page in your assistant in one click. |
| MCP server | `https://mcp.whatsetter.com/mcp` | Let the assistant act on your account: leads, campaigns, prompts, knowledge, blocked contacts. See [MCP server](/developers/mcp/). |

Markdown URLs follow the site structure, in every language:

```
https://docs.whatsetter.com/developers/quickstart.md
https://docs.whatsetter.com/developers/errors.md
https://docs.whatsetter.com/fr/dashboard/leads.md
https://docs.whatsetter.com/es/developers/webhooks.md
```

```bash
curl -H "Accept: text/markdown" https://docs.whatsetter.com/developers/authentication/
```

## Give your assistant the right context

Put this block in the file your assistant reads at the start of every session: `CLAUDE.md` for Claude Code, a rule file for Cursor, `AGENTS.md` for Codex.

```markdown
## WhatSetter API

Before using the WhatSetter API, read https://docs.whatsetter.com/llms.txt
and the guide of the resource you need
(for example https://docs.whatsetter.com/developers/guides/leads.md).

- Base URL: https://app.whatsetter.com/api/v1
- The API key is in the WHATSETTER_API_KEY environment variable.
  Never write it in code, in a config file or in a commit.
- Every error is { "error": { "code", "message" } }.
  The codes are listed at https://docs.whatsetter.com/developers/errors.md
- Always send an Idempotency-Key header on POST /messages.
- Never send a WhatsApp message or add a lead to a campaign without asking me first.
```

The assistant then fetches the exact page it needs instead of guessing field names.

## Feed a page to an assistant

Three ways, from fastest to most complete:

1. Click **Open in Claude** or **Open in ChatGPT** in the header of the page you are reading.
2. Click **Copy page** and paste the Markdown into the chat.
3. Give the assistant the `.md` URL of the page, for example `https://docs.whatsetter.com/developers/webhooks.md`, and let it fetch it.

For a question that spans several pages, give `https://docs.whatsetter.com/llms-full.txt` once.

## Let Claude Code build an integration end to end

1. Create a key in **Settings**, then **API & MCP**, with the scopes the integration needs. Export it: `export WHATSETTER_API_KEY="ws_live_…"`.
2. Add the block above to your project's `CLAUDE.md`.
3. Optionally connect the [MCP server](/developers/mcp/) so Claude Code can check the result against your real workspace: `claude mcp add --transport http whatsetter https://mcp.whatsetter.com/mcp`.
4. Describe the integration. For example: "Sync every lead qualified by WhatSetter into our HubSpot CRM. Subscribe to the `contact.qualified` webhook, verify the signature, and match on `external_reference`."
5. Ask Claude Code to test with `GET /me` first, then with read calls, before any call that sends a message.

> **The key stays in the environment**
Read the generated code before running it: the key must come from `WHATSETTER_API_KEY`, never from a string in the code. If a key ever lands in a file or a chat, revoke it in **Settings**, then **API & MCP**, and create a new one.

## Related

- [MCP server](/developers/mcp/)
- [Quickstart](/developers/quickstart/)
- [Errors, limits and idempotency](/developers/errors/)
