API
API overview
REST endpoints to generate, manage, and publish decks. Bearer auth, JSON in, JSON out.
The heydecks REST API turns text into brand-locked deck URLs and manages decks and brands programmatically. Every request is JSON over HTTPS with a Bearer API key.
Base URL: https://heydecks.com
#Authentication
Send your API key as a Bearer token on every request:
Authorization: Bearer hd_live_<prefix>_<secret>Mint keys at heydecks.com/dashboard/api-keys. REST API access requires a Pro plan or higher — Free and Solo plans receive a 403 api_not_on_plan on every call. See Authentication for header format and key management.
#Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /v1/generate | Turn a text prompt into a brand-locked deck (async). Costs 10 credits. |
GET | /v1/jobs/{id} | Poll an async generation job. |
GET | /v1/decks | List all decks in your workspace. |
POST | /v1/decks | Create an empty deck. |
GET | /v1/decks/{id} | Fetch a single deck with all sections. |
PATCH | /v1/decks/{id} | Update deck metadata. |
DELETE | /v1/decks/{id} | Permanently delete a deck. |
POST | /v1/decks/{id}/publish | Make a deck publicly accessible. |
POST | /v1/decks/{id}/unpublish | Revert a deck to draft. |
GET | /v1/brands | List all brands in your workspace. |
POST | /v1/brands | Create a new empty brand. |
POST | /v1/brands/extract | Extract a brand from a public URL. Costs 5 credits. |
#The generate → poll → publish loop
- Generate —
POST /v1/generateenqueues a job and returns202with ajob_id. - Poll —
GET /v1/jobs/{id}at a 2-second interval untilsucceededorfailed. - Publish —
POST /v1/decks/{id}/publishmakes the draft URL live.
Prefer natural language? The MCP server collapses this loop into a single generate_deck tool call.
#Errors
Every non-2xx response uses one envelope:
{
"error": {
"code": "insufficient_credits",
"message": "Insufficient credits: need 10, have 3 remaining."
}
}See Errors for the full code table.