Managing Themes via API

Themes control branding, colors, typography, and contact information applied to every slide or document Deckrun generates. Agents can create, update, and delete themes programmatically — no dashboard required.

All theme endpoints require a Bearer token (Firebase JWT or API key).


Create a theme

POST /api/profile/themes/me
Authorization: Bearer <token>
Content-Type: application/json
{
  "name": "Acme Corp",
  "category": "slide",
  "branding": {
    "org_name": "Acme Corp",
    "colors": {
      "primary": "#1B2A4A",
      "accent": "#E84B3A",
      "heading_color": "#E84B3A",
      "title_slide_bg": "#1B2A4A",
      "footer_bg": "#F4F6FB",
      "footer_text": "#1B2A4A"
    },
    "typography": {
      "title_font": "Georgia",
      "body_font": "Arial"
    }
  },
  "contact": {
    "name": "Jane Smith",
    "title": "Head of Marketing",
    "email": "jane@acme.com"
  }
}

Response includes the assigned id — save it to use the theme in generate requests.


Upload a logo and favicon

Logos and favicons are stored as base64 data URIs in branding.logo_data and branding.favicon_data. The renderer uses the data URI directly — no file hosting needed.

Encode an SVG or PNG:

# SVG
LOGO=$(base64 -i logo.svg | tr -d '\n')
LOGO_URI="data:image/svg+xml;base64,$LOGO"

# PNG
LOGO=$(base64 -i logo.png | tr -d '\n')
LOGO_URI="data:image/png;base64,$LOGO"

Include in create or update body:

{
  "name": "Acme Corp",
  "category": "slide",
  "branding": {
    "org_name": "Acme Corp",
    "logo_data": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0...",
    "favicon_data": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0...",
    "colors": { "primary": "#1B2A4A", "accent": "#E84B3A" }
  }
}

Recommended limits: logo under 500 KB, favicon under 100 KB. SVG is preferred for sharpness at all resolutions.


Update an existing theme

PUT /api/profile/themes/me/{theme_id}
Authorization: Bearer <token>
Content-Type: application/json

The body must include the full theme object (same shape as create). Partial updates are not supported — fetch first, merge, then PUT.

Fetch → merge → update pattern:

# 1. Fetch current themes
curl -s https://api.agenticdecks.com/api/profile/themes/me \
  -H "Authorization: Bearer $TOKEN" | jq '.slide_themes[] | select(.name == "Acme Corp")'

# 2. PUT with updated fields merged in
curl -s -X PUT https://api.agenticdecks.com/api/profile/themes/me/$THEME_ID \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "$UPDATED_BODY"

List themes

GET /api/profile/themes/me
Authorization: Bearer <token>

Returns { "slide_themes": [...], "document_themes": [...] }. Each entry includes id, name, category, branding, contact, created_at, updated_at.


Delete a theme

DELETE /api/profile/themes/me/{theme_id}
Authorization: Bearer <token>

Use a theme in a generate request

Pass the theme id in the theme field of the generate request body:

{
  "content": "# Slide 1\n\nContent here.",
  "output_types": ["pdf"],
  "theme": "977e5ae6-6ee7-41e9-98ec-10d4b42faada"
}

The renderer applies the theme's branding — logo, colors, fonts, and contact footer — to every slide or document page.


Agent tips