WhatsApp

Referência da API

Use the Vecsy HTTP API to render a template into a PNG or PDF file. Each successful request returns a temporary download URL.

Overview

  • Base URL: https://www.vecsy.co
  • The public endpoint lives under /api/.
  • All API calls must include a valid bearer token (see below).

Authentication

Send your token in the Authorization header. Both of these forms are accepted:

Authorization: Bearer YOUR_TOKEN_HERE
Authorization: YOUR_TOKEN_HERE

Create and manage tokens from your Vecsy account: open Automation, then the API section (while logged in). Store tokens securely; treat them like passwords.

Gerar imagem

POST /api/generate-image

Renders one file from a template that is in the Ready state and belongs to your account. You must send every dynamic field defined on that template.

Required and optional parameters

Nome Descrição
template_uuid UUID of the template (Ready).
file_format Optional. Use png (default) or pdf.
One value per dynamic field on the template (names match what you configured in the editor).

Example (JSON)

curl -X POST "https://www.vecsy.co/api/generate-image" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -d '{
    "template_uuid": "18cc03b9-68c9-4aaf-ad74-17c8c76e0827",
    "file_format": "png",
    "title": "Example headline",
    "photo": "https://example.com/image.jpg"
  }'

Replace field names and values with those of your template.

Request formats

JSON — Content-Type: application/json. Image fields must be public HTTPS URLs. File uploads are not supported in JSON mode.

Multipart form-data — Use when you need to upload image binary data. Non-file fields go in the form; the file part is typically named file.

If more than one image field is provided as an upload (not a URL), the upload must be a single .zip archive containing the images required by the template.

Campos do template

  • Text and other non-image fields: send the value as a string in JSON or as a form field.
  • Image fields: either a string URL (https://…) in JSON, or an uploaded file in multipart mode.
  • Color properties exposed as hex must match the format #RRGGBB (six hexadecimal digits).

Responses and errors

On success (HTTP 200), the body includes a temporary file URL, the storage key, and the output format. Download the file soon; the link may expire.

{
  "url": "https://…",
  "key": "uploads/api/generate-image/…",
  "format": "png"
}

Common error responses use JSON with an error message, for example:

  • 401 — Missing or invalid token.
  • 400 — Validation error, missing field, invalid color, wrong upload type, or API request limit reached.
  • 404 — Template not found or not in Ready state.

Limits

API usage counts against the request quota of your Vecsy plan. If the quota is exceeded, the API returns an error until the limit resets or your plan is upgraded.

View plans Back to API overview