Overview
Connect to VYG to build reports and integrations.
The VYG API gives you programmatic access to your VYG account: customers, orders and subscriptions, segments, insights, conversations, campaigns, discounts and integration settings.
Choose how to connect:
| Connection | URL | Use it for |
|---|---|---|
| REST API | https://api.vyg.app/v1 | Build reports, automate tasks or connect another system. |
| MCP | https://api.vyg.app/mcp | AI assistants such as Claude and Cursor. See Connect an AI assistant. |
Event collection (the web pixel and server-side events) runs on a separate host,
https://cdp.vyg.app. See Data collection.
One operation, two ways to call it
Most operations are available both as a REST route and as an MCP tool. The reference documents the inputs, permissions and results for each operation. For example, GET /v1/customers/{id} and the
get_customer tool return the same customer. The tool catalog links each tool to its REST
route, and each REST operation in the reference names its tool.
A few operations exist on only one side:
- MCP only:
get_conversation_details, the Shopify and Klaviyo tools. - REST only: API key management (
/v1/keys).
Credentials
Connect with an API key or sign in with OAuth:
- An API key (
vyg_…orvyg_ba_…), sent as a bearer token. Keys are for server-to-server use and can only read and write a subset of the API. See API keys. - A sign-in (OAuth) access token, obtained when a person signs in with their VYG account and picks a brand. MCP clients do this for you. Some operations accept only a sign-in, including all campaign, discount and segment changes. See Authentication.
Conventions
- Requests and responses are JSON. Timestamps are ISO 8601 strings in UTC.
- Select your account when connecting. See Account context.
- Errors use this format:
{"error": {"code", "message"}}. See Errors. - List endpoints use one of two pagination styles. See Pagination.
- The OpenAPI 3.1 document is served at
GET https://api.vyg.app/v1/openapi.json.
Health check
GET /health needs no credential. Use it as an uptime probe.
curl -sS https://api.vyg.app/health{ "status": "ok" }Next steps
- Quickstart: make your first request with an API key.
- Scopes: what each scope allows, and which ones an API key can hold.
- REST API reference: every
/v1route. - Changelog: API changes and migration instructions.