# RD Station — how to use (mcp.ai)

RD Station Marketing, contatos/leads (buscar, criar/atualizar, funil), eventos de conversão e webhooks via API oficial (OAuth 2.0). A plataforma fornece a aplicação OAuth, você só clica em Autorizar e loga com sua conta RD Station. (v1: Marketing; CRM em breve.)

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_rdstation?ms=1781044500000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `rdstation_account_info`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/rdstation`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/rdstation/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/rdstation/account/info` — Dados da conta RD Station ativa (nome da conta).
  - body: { account?: string }
- `POST https://api.mcp.ai/api/rdstation/contacts/funnel` — Contatos (leads) na RD Station Marketing.
  - body: { identifier_type?: string, identifier: string, fields?: object, account?: string }
- `POST https://api.mcp.ai/api/rdstation/contacts/get` — Contatos (leads) na RD Station Marketing.
  - body: { identifier_type?: string, identifier: string, fields?: object, account?: string }
- `POST https://api.mcp.ai/api/rdstation/contacts/upsert` — Contatos (leads) na RD Station Marketing.
  - body: { identifier_type?: string, identifier: string, fields?: object, account?: string }
- `POST https://api.mcp.ai/api/rdstation/events` — Cria um evento de conversão na RD Station Marketing (POST /platform/events).
  - body: { event: object, account?: string }
- `POST https://api.mcp.ai/api/rdstation/list/accounts` — Lista as contas RD Station vinculadas a este install (account_id, label).
  - body: { account?: string }
- `POST https://api.mcp.ai/api/rdstation/webhooks/create` — Webhooks da RD Station Marketing.
  - body: { uuid?: string, webhook?: object, account?: string }
- `POST https://api.mcp.ai/api/rdstation/webhooks/delete` — Webhooks da RD Station Marketing.
  - body: { uuid?: string, webhook?: object, account?: string }
- `POST https://api.mcp.ai/api/rdstation/webhooks/list` — Webhooks da RD Station Marketing.
  - body: { uuid?: string, webhook?: object, account?: string }

## Example prompts
- "Busque o contato email:fulano@empresa.com na RD Station"
- "Crie um evento de conversão pra esse lead"
- "Liste os webhooks configurados"

## More
- Page: https://mcp.ai/rdstation
- Agent spec (llms.txt): https://mcp.ai/rdstation/llms.txt
- Postman collection: https://mcp.ai/rdstation/postman.json
