Browse the docs Open

API Reference

every object, every endpoint

The complete reference, generated from the live API spec. Download it whole as Markdown, OpenAPI or Postman.

Objects

Template

A reusable design with addressable layers.

Field Type Description
uuid string Stable public identifier.
title string Human-readable name.
width integer Canvas width in pixels.
height integer Canvas height in pixels.
layers Layer[] Addressable layers and their modifications.
created_at datetime ISO-8601 creation timestamp.

Layer

A single addressable element inside a template.

Field Type Description
layer string Layer key used when overriding content.
type string One of image, text, empty, qr_code.
available_modifications object Override keys this layer accepts (image_url, text, background_color, qr_content).

Screenshot

A rendered capture of a web page.

Field Type Description
id string Screenshot UUID.
url string Captured page URL.
image_url string URL of the rendered image.
width integer Viewport width in pixels.
height integer Viewport height in pixels.
created_at datetime ISO-8601 creation timestamp.

Snap

A render job produced from a template or collection.

Field Type Description
id string Snap UUID.
media_url string|null URL of the finished asset, null until completed.
type string image or pdf.
status string pending, processing, completed, failed or canceled.
is_async boolean Whether the snap was queued.
webhook_url string|null Callback URL for async completion.
completed_at datetime|null When rendering finished.
last_error string|null Failure reason, when status is failed.
variants array|null Per-layer content overrides applied.
template_id string|null Source template UUID.
template_title string|null Source template name.
created_at datetime ISO-8601 creation timestamp.

Endpoints

Authentication

GET /v1/auth

Verify the current token

Returns the account the token belongs to. Use it to confirm a token is valid and to read the signed-in identity.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Example request

curl

curl https://snapsbrew.com/api/v1/auth \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Accept: application/json'

Example responses

200 Token is valid.
{
    "data": {
        "email": "[email protected]",
        "name": "Ada Lovelace"
    }
}
401 Missing or invalid token.
{
    "message": "Unauthenticated."
}
403 Token lacks the api_requests ability.
{
    "message": "Invalid ability provided."
}

Usage

GET /v1/usage

Get current usage

Returns purchased, used and remaining requests for the active billing period.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

The response carries an `X-Request-Uuid` header you can quote in support tickets.

Example request

curl

curl https://snapsbrew.com/api/v1/usage \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Accept: application/json'

Example responses

200 Usage for the active period.
{
    "period_start_date": "2026-05-01T00:00:00Z",
    "period_end_date": "2026-05-31T23:59:59Z",
    "period_purchased_requests": 1000,
    "period_used_requests": 240,
    "period_available_requests": 760
}
401 Missing or invalid token.
{
    "message": "Unauthenticated."
}

Templates

GET /v1/templates

List templates

Returns a cursor-paginated list of your templates.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

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

200 A page of templates.
{
    "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"
    }
}

GET /v1/templates/{templateUuid}

Get a template

Returns a single template and its parsed layers.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

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

200 The template.
{
    "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"
}
404 Template not found in your company.
{
    "message": "Not found."
}

POST /v1/templates

Create a template

Creates a template and generates its preview image. Requires the create-template policy.

Auth: Bearer token Ability: api_requests Gate: policy:create,Template Free

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

200 Template created.
{
    "data": {
        "uuid": "...",
        "title": "New template"
    },
    "message": "Template created successfully"
}

PATCH /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.

Auth: Bearer token Ability: api_requests Free

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

200 Template updated.
{
    "message": "template updated sucessfully"
}
404 Template not found in your company.
{
    "message": "Not found."
}

DELETE /v1/templates/{templateId}

Delete a template

Deletes a template. The path segment is the numeric template ID. Requires the delete-template policy.

Auth: Bearer token Ability: api_requests Gate: policy:delete,Template Free

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

200 Template deleted.
{
    "message": "template deleted sucessfully"
}
404 Template not found in your company.
{
    "message": "Not found."
}

Media

GET /v1/media

List media

Returns your uploaded images, 12 per page, newest first.

Auth: Bearer token Ability: api_requests Free

Parameters

Name In Type Required Description
page query integer No Page number for the standard paginator.

Example request

curl

curl https://snapsbrew.com/api/v1/media \
  -H 'Authorization: Bearer <your-token>'

Example responses

200 A page of media.
{
    "data": [
        {
            "id": 12,
            "file_name": "logo.png",
            "src": "https://snapsbrew.com/storage/12/conversions/logo-image.jpg"
        }
    ],
    "links": {
        "first": "...",
        "last": "...",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "per_page": 12,
        "total": 1
    }
}

POST /v1/media

Upload media

Uploads an image into your media library. Send as multipart/form-data.

Auth: Bearer token Ability: api_requests Free

Request body

Content-Type: multipart/form-data

Field Type Required Validation Description
file file Yes required, file, image The image to upload.

Example request

curl

curl -X POST https://snapsbrew.com/api/v1/media \
  -H 'Authorization: Bearer <your-token>' \
  -F '[email protected]'

Example responses

200 Media uploaded.
{
    "id": 12,
    "file_name": "logo.png",
    "src": "https://snapsbrew.com/storage/12/conversions/logo-image.jpg"
}
422 File missing or not an image.
{
    "message": "The file must be an image."
}

Screenshots

GET /v1/screenshots

List screenshots

Returns a cursor-paginated list of your screenshots.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Parameters

Name In Type Required Description
cursor query string No Cursor token from meta.next_cursor.

Example request

curl

curl https://snapsbrew.com/api/v1/screenshots \
  -H 'Authorization: Bearer <your-token>'

Example responses

200 A page of screenshots.
{
    "data": [
        {
            "uuid": "a1b2c3",
            "url": "https://example.com",
            "image_url": "https://snapsbrew.com/storage/screenshots/a1b2c3.png",
            "width": 1330,
            "height": 780,
            "created_at": "2026-05-01T12:00:00Z"
        }
    ],
    "meta": {
        "previous_cursor": null,
        "next_cursor": null
    }
}

GET /v1/screenshots/{screenshotUuid}

Get a screenshot

Returns a single screenshot.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Parameters

Name In Type Required Description
screenshotUuid path string Yes UUID of the screenshot.

Example request

curl

curl https://snapsbrew.com/api/v1/screenshots/<uuid> \
  -H 'Authorization: Bearer <your-token>'

Example responses

200 The screenshot.
{
    "data": {
        "id": "a1b2c3",
        "url": "https://example.com",
        "image_url": "https://snapsbrew.com/storage/screenshots/a1b2c3.png",
        "width": 1330,
        "height": 780,
        "created_at": "2026-05-01T12:00:00Z"
    }
}
404 Screenshot not found in your company.
{
    "message": "Not found."
}

POST /v1/screenshots

Create a screenshot

Captures a web page. Defaults to a 1330x780 viewport when width/height are omitted.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Gate: hasActiveSubscription Costs credits

Credits — Requires available credits (canCreateSnap); returns 417 when exhausted.

Request body

Content-Type: application/json

Field Type Required Validation Description
url string No url Page to capture. Validated as a URL when present.
width integer No integer Viewport width. Defaults to 1330.
height integer No integer Viewport height. Defaults to 780.

Example request

curl

curl -X POST https://snapsbrew.com/api/v1/screenshots \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com","width":1330,"height":780}'

Example responses

200 Screenshot created.
{
    "data": {
        "id": "a1b2c3",
        "url": "https://example.com",
        "image_url": "https://snapsbrew.com/storage/screenshots/a1b2c3.png",
        "width": 1330,
        "height": 780,
        "created_at": "2026-05-01T12:00:00Z"
    }
}
401 No active subscription or trial.
{
    "message": "Unauthenticated."
}
417 Monthly credit quota exhausted.
{
    "message": "You have reached your snap quota."
}

Snaps

POST /v1/snaps

Create a snap

Renders a snap from a single template (`template_id`) or every template in a collection (`collection_id`). Provide exactly one of the two.

Synchronous (default): the response carries the finished `media_url` and returns 201.

Asynchronous (`async: true`): the snap is queued, the response returns 202 immediately, and the result is delivered to `webhook_url` on completion.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Gate: hasActiveSubscription Costs credits

Credits — Synchronous: 1 credit per rendered template. Asynchronous: 0 credits at accept time (HTTP 202); the credit is charged when the queued snap reaches completed.

Request body

Content-Type: application/json

Field Type Required Validation Description
template_id string No required_without:collection_id, prohibits:collection_id, exists templates.uuid scoped to company UUID of a single template to render.
collection_id string No required_without:template_id, prohibits:template_id, exists template_collections.uuid scoped to company UUID of a collection; one snap is rendered per template.
type string No nullable, in:image,pdf Output format. Defaults to image.
async boolean No sometimes, boolean Queue the render and return 202.
webhook_url string No url, required_if:async,true Callback URL invoked when an async snap completes.
variants array No no server validation Per-layer content overrides applied to the render.

Every response carries an `X-Request-Uuid` header. Quote it in support tickets.

A collection request returns an array of snap objects, one per template.

Example request

curl

curl -X POST https://snapsbrew.com/api/v1/snaps \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"template_id":"<uuid>","type":"image","variants":[{"layer":"review_title","text":"Hello world"}]}'

async curl

curl -X POST https://snapsbrew.com/api/v1/snaps \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"template_id":"<uuid>","async":true,"webhook_url":"https://example.com/hooks/snap"}'

Example responses

201 Synchronous snap rendered.
{
    "id": "9f1c2d3e",
    "media_url": "https://snapsbrew.com/storage/snaps/9f1c2d3e.png",
    "type": "image",
    "status": "completed",
    "is_async": false,
    "webhook_url": null,
    "completed_at": "2026-05-01T12:00:03Z",
    "last_error": null,
    "variants": [],
    "template_id": "141e8454-8aa1-420a-bd0b-18a85ba949a2",
    "template_title": "Launch card",
    "created_at": "2026-05-01T12:00:00Z"
}
202 Asynchronous snap queued.
{
    "id": "9f1c2d3e",
    "media_url": null,
    "type": "image",
    "status": "pending",
    "is_async": true,
    "webhook_url": "https://example.com/hooks/snap",
    "completed_at": null,
    "last_error": null,
    "variants": [],
    "template_id": "141e8454-8aa1-420a-bd0b-18a85ba949a2",
    "template_title": "Launch card",
    "created_at": "2026-05-01T12:00:00Z"
}
404 Template or collection not found, or collection empty.
{
    "message": "Not found."
}
417 Monthly credit quota exhausted.
{
    "message": "You have reached your snap quota."
}
422 Validation failed.
{
    "message": "The template id field is required when collection id is not present."
}

Tags

GET /v1/tags

List tags

Returns up to 15 tags, ordered by name, optionally filtered by a search term.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Parameters

Name In Type Required Description
search query string No Case-insensitive substring match on tag name.

Example request

curl

curl 'https://snapsbrew.com/api/v1/tags?search=launch' \
  -H 'Authorization: Bearer <your-token>'

Example responses

200 Matching tags.
{
    "data": [
        {
            "id": 1,
            "name": "Launch",
            "slug": "launch"
        }
    ]
}

POST /v1/tags

Create a tag

Creates a tag. The slug is generated from the name; collisions get a numeric suffix.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Request body

Content-Type: application/json

Field Type Required Validation Description
name string Yes required, string, max:255 Display name of the tag.

Example request

curl

curl -X POST https://snapsbrew.com/api/v1/tags \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Launch"}'

Example responses

201 Tag created.
{
    "data": {
        "id": 1,
        "name": "Launch",
        "slug": "launch"
    }
}
422 Validation failed.
{
    "message": "The name field is required."
}

POST /v1/templates/{templateUuid}/tags

Sync template tags

Replaces all tags on a template with the supplied set. Send an empty array to clear every tag.

Auth: Bearer token Ability: api_requests Gate: logApiRequest Free

Parameters

Name In Type Required Description
templateUuid path string Yes UUID of the template.

Request body

Content-Type: application/json

Field Type Required Validation Description
tag_ids integer[] No array Tag IDs to attach. Replaces the existing set.
tag_ids.* integer No integer, exists tags.id scoped to company Each ID must belong to your company.

Example request

curl

curl -X POST https://snapsbrew.com/api/v1/templates/<uuid>/tags \
  -H 'Authorization: Bearer <your-token>' \
  -H 'Content-Type: application/json' \
  -d '{"tag_ids":[1,2]}'

Example responses

200 Tags synced.
{
    "message": "Tags updated successfully.",
    "tags": [
        {
            "id": 1,
            "name": "Launch",
            "slug": "launch"
        }
    ]
}
404 Template not found in your company.
{
    "message": "Not found."
}
422 A tag ID is invalid or not yours.
{
    "message": "The selected tag_ids.0 is invalid."
}

Embedded Forms

POST /v1/embedded-forms/{formUuid}

Submit an embedded form

Renders a snap from a configured form. Template forms return one snap; collection forms return an array of snaps.

Layer keys: template forms use the plain layer key (`headline`); collection forms use `{templateUuid}__{layerKey}`. Only layers the form was configured with are accepted; the rest are dropped silently.

Auth: Signed URL Gate: embeddedFormMiddleware Gate: valid signature required Costs credits

Credits — The form owner is charged: 1 credit for a template form, or 1 per template for a collection form.

Parameters

Name In Type Required Description
formUuid path string Yes UUID of the form.
signature query string Yes Laravel URL signature. The whole URL must be signed.

Request body

Content-Type: multipart/form-data

Field Type Required Validation Description
layers object No keys matched against the form configuration Layer overrides. Value keys by layer type: image -> image_url (file), text -> text, empty -> background_color, qr_code -> qr_content.

Collection forms return a bare array of snap objects, not a `data`-wrapped object.

This route has no rate limiting.

Example request

curl

curl -X POST 'https://snapsbrew.com/api/v1/embedded-forms/<formUuid>?signature=<sig>' \
  -F 'layers[headline]=Summer sale' \
  -F 'layers[logo][email protected]'

Example responses

201 Snap rendered (template form).
{
    "data": {
        "id": "9f1c2d3e",
        "media_url": "https://snapsbrew.com/storage/snaps/9f1c2d3e.png",
        "type": "image",
        "status": "completed",
        "is_async": false,
        "webhook_url": null,
        "completed_at": "2026-05-01T12:00:03Z",
        "last_error": null,
        "variants": [],
        "template_id": "141e8454",
        "template_title": "Launch card",
        "created_at": "2026-05-01T12:00:00Z"
    }
}
404 Form not found or invalid signature.
{
    "message": "Not found."
}
422 Collection form has no templates configured.
{
    "message": "The form does not include any templates."
}