# Hotmart — how to use (mcp.ai)

Plataforma de produtos digitais Hotmart, vendas (histórico, resumo, comissões), assinaturas (listar, cancelar, reativar) e produtos via API oficial. Gere suas credenciais (Client ID + Client Secret) em Ferramentas → Credenciais de API no painel Hotmart.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_hotmart?ms=1781045280000`
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. `hotmart_list_accounts`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/hotmart`
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/hotmart/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/hotmart/list/accounts` — Lista contas Hotmart (creators) vinculadas a este install — id, label e apelido.
  - body: { account?: string }
- `POST https://api.mcp.ai/api/hotmart/products` — Lista produtos do creator na Hotmart (filtros opcionais: max_results, page_token).
  - body: { max_results?: integer, page_token?: string, account?: string }
- `POST https://api.mcp.ai/api/hotmart/sales/commissions` — Leitura de vendas na Hotmart (Payments API).
  - body: { start_date?: string, end_date?: string, product_id?: string, transaction_status?: string, buyer_email?: string, max_results?: integer, page_token?: string, account?: string, product_ids?: string[] }
- `POST https://api.mcp.ai/api/hotmart/sales/history` — Leitura de vendas na Hotmart (Payments API).
  - body: { start_date?: string, end_date?: string, product_id?: string, transaction_status?: string, buyer_email?: string, max_results?: integer, page_token?: string, account?: string, product_ids?: string[] }
- `POST https://api.mcp.ai/api/hotmart/sales/price/details` — Leitura de vendas na Hotmart (Payments API).
  - body: { start_date?: string, end_date?: string, product_id?: string, transaction_status?: string, buyer_email?: string, max_results?: integer, page_token?: string, account?: string, product_ids?: string[] }
- `POST https://api.mcp.ai/api/hotmart/sales/summary` — Leitura de vendas na Hotmart (Payments API).
  - body: { start_date?: string, end_date?: string, product_id?: string, transaction_status?: string, buyer_email?: string, max_results?: integer, page_token?: string, account?: string, product_ids?: string[] }
- `POST https://api.mcp.ai/api/hotmart/subscriptions/list` — Leitura de assinaturas na Hotmart.
  - body: { subscriber_code?: string, product_id?: string, subscriber_email?: string, status?: string, max_results?: integer, page_token?: string, account?: string, product_ids?: string[] }
- `POST https://api.mcp.ai/api/hotmart/subscriptions/purchases` — Leitura de assinaturas na Hotmart.
  - body: { subscriber_code?: string, product_id?: string, subscriber_email?: string, status?: string, max_results?: integer, page_token?: string, account?: string, product_ids?: string[] }
- `POST https://api.mcp.ai/api/hotmart/subscriptions/summary` — Leitura de assinaturas na Hotmart.
  - body: { subscriber_code?: string, product_id?: string, subscriber_email?: string, status?: string, max_results?: integer, page_token?: string, account?: string, product_ids?: string[] }
- `POST https://api.mcp.ai/api/hotmart/subscriptions/write/cancel` — Mutações em assinaturas Hotmart.
  - body: { subscriber_codes: string[], send_mail?: boolean, charge?: boolean, account?: string }
- `POST https://api.mcp.ai/api/hotmart/subscriptions/write/reactivate` — Mutações em assinaturas Hotmart.
  - body: { subscriber_codes: string[], send_mail?: boolean, charge?: boolean, account?: string }

## Example prompts
- "Quanto vendi na Hotmart nos últimos 30 dias?"
- "Liste minhas assinaturas ativas"
- "Cancele a assinatura do subscriber_code X"

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