{
    "info": {
        "name": "Snapsbrew API Suite",
        "description": "Generate images, PDFs and screenshots from reusable templates. The Snapsbrew API turns design templates into a render pipeline you can call from any stack.",
        "_postman_id": "e9004e39-d826-8409-d889-bd2672cf4949",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Authentication",
            "description": "Authenticated endpoints use a Sanctum personal access token. Send it as a bearer token in the Authorization header. Tokens must carry the `api_requests` ability. Authorization: Bearer <your-token> Accept: application/json",
            "item": [
                {
                    "name": "Verify the current token",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/auth",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "auth"
                            ]
                        },
                        "description": "Returns the account the token belongs to. Use it to confirm a token is valid and to read the signed-in identity."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        },
        {
            "name": "Usage",
            "description": "Read the credit balance for the current billing period. Purely informational \u2014 it does not consume credits.",
            "item": [
                {
                    "name": "Get current usage",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/usage",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "usage"
                            ]
                        },
                        "description": "Returns purchased, used and remaining requests for the active billing period."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        },
        {
            "name": "Templates",
            "description": "Templates are reusable designs with addressable layers. List and read them, or manage them programmatically. All template endpoints are scoped to your company.",
            "item": [
                {
                    "name": "List templates",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/templates",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "templates"
                            ],
                            "query": [
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "Cursor token from a previous response's meta.next_cursor.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Returns a cursor-paginated list of your templates."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Get a template",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/templates/{templateUuid}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "templates",
                                "{templateUuid}"
                            ]
                        },
                        "description": "Returns a single template and its parsed layers."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Create a template",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/templates",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "templates"
                            ]
                        },
                        "description": "Creates a template and generates its preview image. Requires the create-template policy.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"<title>\",\n    \"width\": 0,\n    \"height\": 0,\n    \"layers\": []\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Update a template",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/templates/{templateId}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "templates",
                                "{templateId}"
                            ]
                        },
                        "description": "Updates a template and regenerates its preview image. The path segment is the numeric template ID, not the UUID.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"title\": \"<title>\",\n    \"width\": 0,\n    \"height\": 0,\n    \"layers\": []\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Delete a template",
                    "request": {
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/templates/{templateId}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "templates",
                                "{templateId}"
                            ]
                        },
                        "description": "Deletes a template. The path segment is the numeric template ID. Requires the delete-template policy."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        },
        {
            "name": "Media",
            "description": "Upload and list images stored in your account media library. Use these as image-layer sources in snaps.",
            "item": [
                {
                    "name": "List media",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/media",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "media"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "Page number for the standard paginator.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Returns your uploaded images, 12 per page, newest first."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Upload media",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "multipart/form-data",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/media",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "media"
                            ]
                        },
                        "description": "Uploads an image into your media library. Send as multipart/form-data.",
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "file",
                                    "type": "file",
                                    "value": "",
                                    "description": "The image to upload."
                                }
                            ]
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        },
        {
            "name": "Screenshots",
            "description": "Render a web page to an image. Creating screenshots requires an active subscription or trial.",
            "item": [
                {
                    "name": "List screenshots",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/screenshots",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "screenshots"
                            ],
                            "query": [
                                {
                                    "key": "cursor",
                                    "value": "",
                                    "description": "Cursor token from meta.next_cursor.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Returns a cursor-paginated list of your screenshots."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Get a screenshot",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/screenshots/{screenshotUuid}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "screenshots",
                                "{screenshotUuid}"
                            ]
                        },
                        "description": "Returns a single screenshot."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Create a screenshot",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/screenshots",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "screenshots"
                            ]
                        },
                        "description": "Captures a web page. Defaults to a 1330x780 viewport when width/height are omitted.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"url\": \"<url>\",\n    \"width\": 0,\n    \"height\": 0\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        },
        {
            "name": "Snaps",
            "description": "A snap renders a template (or every template in a collection) into a finished image or PDF, with your content substituted into each layer. Render synchronously for an instant result, or asynchronously with a webhook for bulk work. Creating snaps requires an active subscription or trial.",
            "item": [
                {
                    "name": "Create a snap",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/snaps",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "snaps"
                            ]
                        },
                        "description": "Renders a snap from a single template (`template_id`) or every template in a collection (`collection_id`). Provide exactly one of the two.\n\nSynchronous (default): the response carries the finished `media_url` and returns 201.\n\nAsynchronous (`async: true`): the snap is queued, the response returns 202 immediately, and the result is delivered to `webhook_url` on completion.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"template_id\": \"<template_id>\",\n    \"collection_id\": \"<collection_id>\",\n    \"type\": \"<type>\",\n    \"async\": false,\n    \"webhook_url\": \"<webhook_url>\",\n    \"variants\": []\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([201, 202]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        },
        {
            "name": "Tags",
            "description": "Tags organise templates. Create them, search them, and attach them to templates. All tags are scoped to your company.",
            "item": [
                {
                    "name": "List tags",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/tags",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "tags"
                            ],
                            "query": [
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "Case-insensitive substring match on tag name.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "Returns up to 15 tags, ordered by name, optionally filtered by a search term."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Create a tag",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/tags",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "tags"
                            ]
                        },
                        "description": "Creates a tag. The slug is generated from the name; collisions get a numeric suffix.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"<name>\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([201]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                },
                {
                    "name": "Sync template tags",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/templates/{templateUuid}/tags",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "templates",
                                "{templateUuid}",
                                "tags"
                            ]
                        },
                        "description": "Replaces all tags on a template with the supplied set. Send an empty array to clear every tag.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"tag_ids\": []\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([200]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        },
        {
            "name": "Embedded Forms",
            "description": "Embedded forms render snaps from a signed URL \u2014 no API token. The URL must be a Laravel signed URL; an invalid signature returns 404. The form owner is charged for the render.",
            "item": [
                {
                    "name": "Submit an embedded form",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "multipart/form-data",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/v1/embedded-forms/{formUuid}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "v1",
                                "embedded-forms",
                                "{formUuid}"
                            ],
                            "query": [
                                {
                                    "key": "signature",
                                    "value": "",
                                    "description": "Laravel URL signature. The whole URL must be signed.",
                                    "disabled": false
                                }
                            ]
                        },
                        "description": "Renders a snap from a configured form. Template forms return one snap; collection forms return an array of snaps.\n\nLayer 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.",
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "layers",
                                    "type": "text",
                                    "value": "",
                                    "description": "Layer overrides. Value keys by layer type: image -> image_url (file), text -> text, empty -> background_color, qr_code -> qr_content."
                                }
                            ]
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('Successful response', function () {",
                                    "  pm.expect([201]).to.include(pm.response.code);",
                                    "});"
                                ]
                            }
                        }
                    ],
                    "response": []
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{token}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://snapsbrew.com/api",
            "type": "string"
        },
        {
            "key": "token",
            "value": "YOUR_API_TOKEN",
            "type": "string"
        }
    ]
}