# Developer documentation

> Build apps on top of Caramel: connect contacts, submit forms, trigger campaigns, and manage marketing — via MCP or REST.

The Caramel developer platform lets you connect your app to a business's customer data, forms, and marketing campaigns. You manage the contact records; Caramel handles email delivery, audience segmentation, and campaign execution.

There are two ways to call the API — pick whichever fits your runtime.

| Protocol | Best for | Endpoint |
|---|---|---|
| **Model Context Protocol** (JSON-RPC 2.0) | AI assistants and LLM builder platforms — Claude, Cursor, Lovable, Windsurf | `https://app.caramelme.com/api/functions/caramel-mcp` |
| **REST** | Server-side integrations and custom backends | `https://gateway.caramelme.com/v1/*` |

> **Note** The REST gateway is in limited preview. The MCP endpoint is the primary surface today. Both surfaces share the same authentication flow and tool catalog.

Both use **OAuth 2.0 + PKCE** with a magic-link login. One token works across both surfaces.

## What you can build

- **Contact sync** — add or update contacts in a business's audience from your app.
- **Form submissions** — submit data to any Caramel form and trigger its downstream automations.
- **Campaign management** — list, create, and activate marketing campaigns and templates.
- **Audience segmentation** — list segments and enroll contacts.
- **Capability discovery** — introspect what tools and tiers are available at runtime.

The full catalog is 19 tools across 7 categories. Every legacy tool name from the original connector (`list_businesses`, `list_campaigns`, etc.) keeps working indefinitely.

## Documentation sections

- [**Get started**](get-started/index) — OAuth setup, your first token, and a working `list_businesses` call.
- [**Concepts**](concepts/index) — data model: businesses, contacts, forms, campaigns, and segments.
- [**Guides**](guides/index) — task-focused walkthroughs: build with Lovable, connect Claude, submit a form, trigger a campaign.
- [**Reference**](reference/index) — every tool, its parameters, return shape, and error codes.

## For business users

If you're looking for help using Caramel's dashboard — forms, campaigns, and billing — visit the [Help Center](https://app.caramelme.com/help).

## Getting a client ID

MCP-compatible clients (Claude, Lovable, Cursor, and any client that uses a `localhost` or `claude.ai` redirect URI) self-register via Dynamic Client Registration — no setup required. Connect from your client and complete the magic-link login.

If you're building a custom server-side integration with a hosted redirect URI, email `aymen@reactmotion.com` with your app name, redirect URIs, and requested scopes.
