Browse the docs Open Close
Templates
The menu you render from.
Templates are reusable designs with addressable layers. List and read them, or manage them programmatically. All template endpoints are scoped to your company.
On this page
/v1/templates
List templates
Returns a cursor-paginated list of your templates.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cursor |
query | string | No | Cursor token from a previous response's meta.next_cursor. |
Example request
curl
curl https://snapsbrew.com/api/v1/templates \
-H 'Authorization: Bearer <your-token>'
Example responses
{
"data": [
{
"uuid": "141e8454-8aa1-420a-bd0b-18a85ba949a2",
"title": "Template 1",
"width": 1200,
"height": 630,
"layers": [
{
"layer": "review_title",
"type": "text",
"available_modifications": {
"text": "The worst Time-Travel movie ever made"
}
}
],
"created_at": "2026-05-01T12:00:00Z"
}
],
"meta": {
"previous_cursor": null,
"next_cursor": "eyJpZCI6MTB9"
}
}
/v1/templates/{templateUuid}
Get a template
Returns a single template and its parsed layers.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
templateUuid |
path | string | Yes | UUID of the template. |
Example request
curl
curl https://snapsbrew.com/api/v1/templates/<uuid> \
-H 'Authorization: Bearer <your-token>'
Example responses
{
"uuid": "141e8454-8aa1-420a-bd0b-18a85ba949a2",
"title": "Template 1",
"width": 1200,
"height": 630,
"layers": [
{
"layer": "review_poster",
"type": "image",
"available_modifications": {
"image_url": "https://snapsbrew.com/crazy-doc-brown-jailed"
}
},
{
"layer": "review_title",
"type": "text",
"available_modifications": {
"text": "The worst Time-Travel movie ever made"
}
}
],
"created_at": "2026-05-01T12:00:00Z"
}
{
"message": "Not found."
}
/v1/templates
Create a template
Creates a template and generates its preview image. Requires the create-template policy.
Request body
Content-Type: application/json
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
title |
string | No | no server validation |
Template name. |
width |
integer | No | no server validation |
Canvas width in pixels. |
height |
integer | No | no server validation |
Canvas height in pixels. |
layers |
array | No | no server validation |
Layer definitions; stored JSON-encoded. |
This endpoint does not validate input. Send well-formed values — bad data is persisted as-is.
Example request
curl
curl -X POST https://snapsbrew.com/api/v1/templates \
-H 'Authorization: Bearer <your-token>' \
-H 'Content-Type: application/json' \
-d '{"title":"Launch card","width":1200,"height":630,"layers":[]}'
Example responses
{
"data": {
"uuid": "...",
"title": "New template"
},
"message": "Template created successfully"
}
/v1/templates/{templateId}
Update a template
Updates a template and regenerates its preview image. The path segment is the numeric template ID, not the UUID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
templateId |
path | integer | Yes | Numeric template ID, scoped to your company. |
Request body
Content-Type: application/json
| Field | Type | Required | Validation | Description |
|---|---|---|---|---|
title |
string | No | no server validation |
Template name. |
width |
integer | No | no server validation |
Canvas width in pixels. |
height |
integer | No | no server validation |
Canvas height in pixels. |
layers |
array | No | no server validation |
Layer definitions; stored JSON-encoded. |
Example request
curl
curl -X PATCH https://snapsbrew.com/api/v1/templates/42 \
-H 'Authorization: Bearer <your-token>' \
-H 'Content-Type: application/json' \
-d '{"title":"Updated title"}'
Example responses
{
"message": "template updated sucessfully"
}
{
"message": "Not found."
}
/v1/templates/{templateId}
Delete a template
Deletes a template. The path segment is the numeric template ID. Requires the delete-template policy.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
templateId |
path | integer | Yes | Numeric template ID, scoped to your company. |
Example request
curl
curl -X DELETE https://snapsbrew.com/api/v1/templates/42 \
-H 'Authorization: Bearer <your-token>'
Example responses
{
"message": "template deleted sucessfully"
}
{
"message": "Not found."
}