GET /v1/templates/{id}/content
Returns published template metadata and the full schema v2 template content. Useful for inspecting a template before rendering or for cloning templates programmatically.
Endpoint:
GET /v1/templates/{id}/contentPath Parameter
Section titled “Path Parameter”| Parameter | Type | Description |
|---|---|---|
id |
string |
The template ID. Accepts a template ID, a team slug (e.g., shipping-label), or a library-qualified slug (e.g., carbon:product-2x1). |
Authentication
Section titled “Authentication”Authorization: Bearer bp_sk_live_YOUR_KEYResponse
Section titled “Response”Status: 200 OK
{ "id": "abc123", "name": "Shipping Label", "slug": "shipping-label", "dimensions": { "width": 101.6, "height": 152.4, "safeMargin": 3 }, "tags": ["shipping"], "publishedAt": 1711843200000, "elementCount": 1, "content": { "version": 2, "units": "in", "meta": { "name": "Shipping Label", "description": "4x6 shipping label with barcode", "tags": ["shipping"] }, "size": { "width": 101.6, "height": 152.4, "safeMargin": 3 }, "elements": [ { "id": "title", "kind": "text", "position": { "x": 5, "y": 5 }, "size": { "width": 90, "height": 10 }, "expression": "recipientName", "font": { "family": "Arial", "size": 12, "weight": "bold" }, "color": "#111111" } ] }}The content field is the full template object as stored. librarySlug is also present for a library template.
Examples
Section titled “Examples”# By team slugcurl -H "Authorization: Bearer bp_sk_live_YOUR_KEY" \ https://api.binderypress.dev/v1/templates/shipping-label/content
# By library-qualified slugcurl -H "Authorization: Bearer bp_sk_live_YOUR_KEY" \ https://api.binderypress.dev/v1/templates/carbon:product-2x1/contentErrors
Section titled “Errors”| Status | Code | Cause |
|---|---|---|
401 |
AUTH_REQUIRED |
Missing or invalid API key. |
404 |
NOT_FOUND |
Template not found or not published. |