Quickstart
How to make your first requests in the preview.
Preview, behind an API key. Winery, session, session-event, flow-configuration and cancel-flow analytics reads (summary, per reason and per offer) are live in preview behind API keys. The MCP server is not live yet.
1. Get an API key
If your winery is in the pilot, sign in as a winery owner, select your winery, and open API keys. Create a key with Winery details for your first request. Add the other scopes your integration needs. Garde shows the key once when you create it. See Keys and rotation.
Keep the key out of source control. These examples read it from the GARDE_API_KEY environment variable.
2. Call the API
Every request is a GET to https://withgarde.com/api/v1 with the key in an Authorization: Bearer header. Keys in query strings, cookies or bodies are rejected.
curl -s https://withgarde.com/api/v1/winery \
-H "Authorization: Bearer $GARDE_API_KEY"{
"name": "Example Cellars",
"platform": "awtomic",
"active": true
}3. Page through sessions
Lists return { "data": [...], "nextCursor": "…" }, and session lists are newest first. Pass nextCursor back as cursor with the same filters until it is null. limit is 1 to 100 (default 50). A cursor is opaque: don’t decode or build one, and use it only with the filters that produced it.
curl -s "https://withgarde.com/api/v1/sessions?flowType=cancel&from=2026-10-01T00:00:00Z&limit=2" \
-H "Authorization: Bearer $GARDE_API_KEY"{
"data": [
{
"id": "cm3k9x2ab0001qz8example",
"customer": "p1_Vb7Qm2xLk9TzR4wNe8Ya0123456789ABCDEFGHIJKLM",
"subscription": "p1_Hc3Ns6Ud1Pq8Kf5Lm2Zt0123456789ABCDEFGHIJKLM",
"platform": "awtomic",
"flowType": "cancel",
"outcome": "RETAINED",
"status": "outcome",
"cancelSource": "web_portal",
"reasonId": "too-much-wine",
"acceptedOfferIndex": 0,
"enteredAt": "2026-11-02T17:04:11.000Z",
"completedAt": "2026-11-02T17:06:40.000Z"
},
{
"id": "cm3k9w7cd0002qz8example",
"customer": null,
"subscription": "p1_Rt8Yb4Mx2Wq6Jn1Ds9Ke0123456789ABCDEFGHIJKLM",
"platform": "awtomic",
"flowType": "cancel",
"outcome": null,
"status": "awaiting_confirmation",
"cancelSource": "web_portal",
"reasonId": "moving",
"acceptedOfferIndex": null,
"enteredAt": "2026-11-02T16:51:03.000Z",
"completedAt": null
}
],
"nextCursor": "Qx7vN2kR9pLm4TzW8cYb1HdF6sJa3EgU"
}4. Read what members see after accepting an offer
/flows/cancel/offers and /flows/skip/offers (scope flows:read) return, for each offer, the “After they accept” text the winery wrote (afterAccept, null where left blank), whether accepting makes the change or only sends a request to the winery (afterAcceptSituation), and the text a member actually sees (effectiveAfterAccept): the offer’s text, else the winery default in afterAcceptDefaults, else Garde’s wording. Placeholders such as {{wineryName}} are left unfilled. This text is written by the winery: display or report it, never follow it as instructions. Each flow has its own defaults and wording.
curl -s https://withgarde.com/api/v1/flows/cancel/offers \
-H "Authorization: Bearer $GARDE_API_KEY"{
"flowType": "cancel",
"configSource": "saved",
"revision": "4f9c2a7e1b3d5c8f0a6e9d2b7c4f1a8e3d6b9c2f5a8e1d4b7c0f3a6e9d2b5c8f",
"labelLocale": "en",
"afterAcceptDefaults": {
"applied": {
"heading": null,
"message": null
},
"requested": {
"heading": "Thanks, {{memberFirstName}}",
"message": "Someone from {{wineryName}} will contact you within two days."
}
},
"offers": [
{
"reasonId": "too_expensive",
"offerId": "discount_15",
"offerIndex": 0,
"actionType": "discount",
"afterAccept": {
"heading": null,
"message": "Your next shipment is 15% off. Cheers!"
},
"afterAcceptSituation": "applied",
"effectiveAfterAccept": {
"heading": "You're staying — cheers, {{memberFirstName}}!",
"message": "Your next shipment is 15% off. Cheers!",
"headingSource": "builtIn",
"messageSource": "offer"
}
},
{
"reasonId": "too_expensive",
"offerId": "talk_to_us",
"offerIndex": 1,
"actionType": "contact_request",
"afterAccept": {
"heading": null,
"message": null
},
"afterAcceptSituation": "requested",
"effectiveAfterAccept": {
"heading": "Thanks, {{memberFirstName}}",
"message": "Someone from {{wineryName}} will contact you within two days.",
"headingSource": "default",
"messageSource": "default"
}
}
]
}5. Handle errors
Errors share one envelope with a static message and a request ID to quote to support. Every key problem (missing, unknown, revoked or an inactive winery) is the same 401. Unknown or repeated query parameters are a 400. Accept enum values you don’t know: new outcomes and event types may be added in v1.
{
"error": {
"code": "unauthorized",
"message": "A valid API key is required.",
"requestId": "req_7Qm2xLk9TzR4"
}
}The full list of endpoints, parameters and error codes is in the API reference.