Template Libraries
Template libraries are shared collections of templates that can be used by any authenticated team. They’re ideal for standardized templates managed centrally — such as ERP integration templates, compliance forms, or branded label layouts.
How Libraries Work
Section titled “How Libraries Work”A library has a slug (e.g., carbon) that becomes part of the template ID. To use a library template, combine the library slug and template slug with a colon:
carbon:product-2x1This librarySlug:templateSlug format is used everywhere a template ID is accepted: the render endpoint, the template content endpoint, and the template list endpoint.
Using Library Templates
Section titled “Using Library Templates”Rendering
Section titled “Rendering”Pass the qualified template ID to the render endpoint:
curl -X POST https://api.binderypress.dev/v1/render \ -H "Authorization: Bearer bp_sk_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "templateId": "carbon:product-2x1", "data": { "sku": "WIDGET-001", "name": "Widget A" }, "format": "pdf" }'Listing Library Templates
Section titled “Listing Library Templates”Filter the templates endpoint by library slug:
curl -H "Authorization: Bearer bp_sk_live_YOUR_KEY" \ "https://api.binderypress.dev/v1/templates?library=carbon"Each template in the response includes slug and librarySlug fields, so you can construct the full template ID:
{ "templates": [ { "id": "abc123", "name": "Product 2x1", "slug": "product-2x1", "librarySlug": "carbon", "dimensions": { "width": "2in", "height": "1in" } } ]}Getting Template Content
Section titled “Getting Template Content”Use the qualified ID in the path:
curl -H "Authorization: Bearer bp_sk_live_YOUR_KEY" \ "https://api.binderypress.dev/v1/templates/carbon:product-2x1/content"Team Templates vs Library Templates
Section titled “Team Templates vs Library Templates”| Team Templates | Library Templates | |
|---|---|---|
| Template ID | shipping-label | carbon:product-2x1 |
| Accessible by | Owning team only | Any authenticated team |
| Slug uniqueness | Unique within team | Unique within library |
| Management | Any team member | Super admins only |
Team templates that belong to a library are dual-registered — the owning team can still reference them by the short slug (e.g., product-2x1), while other teams use the qualified form (carbon:product-2x1).
Demo API Keys
Section titled “Demo API Keys”Demo API keys can only render library templates. They must use the librarySlug:templateSlug format — plain slugs and raw template IDs are rejected.