API Reference

Manage your pressd.in content programmatically. Authenticate with an API key from Settings → API Keys.


Authentication

All authenticated endpoints accept a Bearer token in the Authorization header.

Authorization: Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

API keys carry permissions: read, write, and publish. A write-only key cannot publish content, and a read-only key cannot create or modify content.


Rate Limits

Per API key, per minute:

OperationLimit
Read (GET)1,000 / min
Write (POST, PUT, DELETE)100 / min

Rate limit info is returned in X-RateLimit-Remaining and X-RateLimit-Reset headers.


Public Endpoints

No authentication required. Returns published content only.

GET /api/profiles/{slug}

Get a profile by slug.

GET /api/profiles/{slug}/decks

List published decks with nested cards.

GET /api/profiles/{slug}/decks/{deckSlug}

Get a single deck with cards.

GET /api/profiles/{slug}/scrolls

List published scrolls (no body).

GET /api/profiles/{slug}/scrolls/{scrollSlug}

Get a single scroll with body.


Decks

Requires write permission.

POST /api/decks

Create a new deck.

{ "title": "My Deck", "slug": "my-deck", "description": "Optional" }
PUT /api/decks/{id}

Update a deck. Send only fields to change.

{ "title": "New Title", "status": "published" }
DELETE /api/decks/{id}

Delete a deck and all its cards.


Cards

Requires write permission.

POST /api/decks/{id}/cards

Add a card to a deck.

{ "card_type": "hero", "content": { "name": "Rick", "headline": "Builder" }, "sort_order": 0 }
PUT /api/cards/{id}

Update a card.

{ "content": { "name": "Updated" } }
DELETE /api/cards/{id}

Delete a card.

POST /api/decks/{id}/cards/bulk

Create multiple cards at once (max 50).

{ "cards": [{ "card_type": "hero", "content": {...} }, ...] }
PUT /api/decks/{id}/cards/reorder

Reorder cards by ID.

{ "card_ids": ["uuid-1", "uuid-2", "uuid-3"] }

Card Types

hero { name, headline, subheadline, avatar_url, cta_text, cta_url }
service { title, description, price, bullet_points: [], cta_text, cta_url }
testimonial { quote, author, role, company, avatar_url }
proof { items: [{ label, value }] }
cta { heading, text, button_label, button_url, style }
quote { text, attribution }
event { title, date, venue, description, cta_text, cta_url }
freeform { html }

Scrolls

Requires write permission. Publishing requires publish permission.

POST /api/scrolls

Create a new scroll.

{ "title": "My Post", "slug": "my-post", "body": "# Hello\n\nMarkdown content..." }
PUT /api/scrolls/{id}

Update a scroll.

{ "body": "Updated content", "status": "published" }
DELETE /api/scrolls/{id}

Delete a scroll.


Errors

StatusMeaning
400Bad request — missing required fields
401Unauthorized — missing or invalid API key
403Forbidden — insufficient permissions
404Not found — resource doesn't exist or isn't yours
429Rate limited — wait and retry
500Server error

All errors return { "error": "message" }.