Developer Documentation

REST API Reference

Create, manage, and export charts programmatically. Power your Zapier workflows and custom integrations.

Base URLhttps://vizelify.com

Authentication

All API requests require an API key in the X-AUTHORIZATION header.

How to get your key
  1. Sign in to your Vizelify Settings page
  2. Click Generate API Key
  3. Copy the key (starts with vzl_) and store it securely
  4. Pass it in the X-AUTHORIZATION header with every request

Example Request

curl -X GET https://vizelify.com/api/v1/auth/me \
  -H "X-AUTHORIZATION: vzl_your_api_key_here"

Test Authentication

Verify your API key and fetch your user profile. Used by Zapier to validate the connection.

GET/api/v1/auth/me

Response (200 OK)

{
  "id": "e67e3ad9-ef70-4927-b67a-115f01dddfa4",
  "email": "user@example.com",
  "name": "Jane Doe"
}

List Charts

Retrieve all charts belonging to the authenticated user.

GET/api/v1/charts

Parameters

FieldTypeDescription
chartTypestringOptional filter by chart type (e.g. "bar", "line", "pie")

Response (200 OK)

[
  {
    "id": "2a8f7814-c0d2-41c0-a498-be224b78eae6",
    "name": "Monthly Revenue",
    "chartType": "bar",
    "title": "Revenue Growth",
    "thumbnailUrl": null,
    "embedUrl": "https://vizelify.com/embed/charts/2a8f7814-...",
    "createdAt": "2026-05-11T00:00:00.000Z",
    "updatedAt": "2026-05-11T00:05:00.000Z"
  }
]

Create Chart

Generate a new chart from your data. Returns the chart ID and embed URL.

POST/api/v1/charts

Parameters

FieldTypeDescription
namestringInternal identifier for the chart
chartTypestringbar, line, area, pie, donut, stacked-bar, stacked-area
titlestringDisplay title shown on the chart
datasetsarrayArray of dataset objects with label and dataPoints
colourModestring"preset" or "custom" (default: "preset")
coloursstring[]Custom hex palette, e.g. ["#FF5733", "#33FF57"]
showLegendbooleanShow legend (default: true)
showDataLabelsbooleanShow data labels (default: false)
showGridLinesbooleanShow grid lines (default: true)

Example Request

curl -X POST https://vizelify.com/api/v1/charts \
  -H "X-AUTHORIZATION: vzl_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Monthly Revenue",
    "chartType": "bar",
    "title": "Revenue Q1 2026",
    "datasets": [
      {
        "label": "Revenue",
        "dataPoints": [
          { "label": "Jan", "value": 12000 },
          { "label": "Feb", "value": 15000 },
          { "label": "Mar", "value": 18000 }
        ]
      }
    ]
  }'

Response (201 Created)

{
  "id": "2a8f7814-c0d2-41c0-a498-be224b78eae6",
  "name": "Monthly Revenue",
  "chartType": "bar",
  "title": "Revenue Q1 2026",
  "embedUrl": "https://vizelify.com/embed/charts/2a8f7814-...",
  "createdAt": "2026-05-11T00:00:00.000Z"
}

Get Chart

Fetch full details and data payload of a single chart.

GET/api/v1/charts/:id

Response (200 OK)

{
  "id": "2a8f7814-...",
  "name": "Monthly Revenue",
  "chartType": "bar",
  "title": "Revenue Q1 2026",
  "xAxisLabel": "Month",
  "yAxisLabel": "Revenue ($)",
  "showLegend": true,
  "showDataLabels": false,
  "showGridLines": true,
  "colourMode": "preset",
  "colours": [],
  "datasets": [ ... ],
  "thumbnailUrl": null,
  "embedUrl": "https://vizelify.com/embed/charts/2a8f7814-...",
  "createdAt": "2026-05-11T00:00:00.000Z",
  "updatedAt": "2026-05-11T00:05:00.000Z"
}

Update Chart

Partially update an existing chart. Only include fields you want to change.

PUT/api/v1/charts/:id

Parameters

FieldTypeDescription
namestringUpdate chart name
chartTypestringChange chart type
titlestringUpdate display title
datasetsarrayReplace datasets with new data
coloursstring[]Update color palette
showLegendbooleanToggle legend visibility
showDataLabelsbooleanToggle data labels
showGridLinesbooleanToggle grid lines

Response (200 OK)

{
  "id": "2a8f7814-...",
  "name": "Monthly Revenue",
  "chartType": "bar",
  "title": "Updated Title",
  "datasets": [ ... ],
  "embedUrl": "https://vizelify.com/embed/charts/2a8f7814-...",
  "updatedAt": "2026-05-11T01:00:00.000Z"
}

Delete Chart

Permanently remove a chart and all associated data.

DELETE/api/v1/charts/:id

Response (200 OK)

{
  "success": true
}

Export Chart

Generate a download URL for the chart in your preferred format.

GET/api/v1/charts/:id/export?format=png|svg

Parameters

FieldTypeDescription
formatstring"png" or "svg" (default: "svg")

Response (200 OK)

{
  "chartId": "2a8f7814-...",
  "format": "png",
  "downloadUrl": "https://vizelify.com/api/v1/charts/2a8f7814-.../download?format=png"
}

Download Chart File

Returns the actual image file. No authentication required. Charts are rendered server-side at 600x400px.

GET/api/v1/charts/:id/download?format=png|svg

Parameters

FieldTypeDescription
formatstring"png" or "svg" (default: "svg")

Returns binary file with Content-Type: image/png or image/svg+xml and a Content-Disposition: attachment header for automatic download.

Error Responses

All errors return JSON with an error field and an appropriate HTTP status code.

StatusMeaning
400Bad request — missing required fields or invalid format
401Unauthorized — missing or invalid API key
403Forbidden — chart belongs to another user
404Not found — chart does not exist
500Internal server error

Example Error Response

{
  "error": "Unauthorized",
  "message": "Missing X-AUTHORIZATION header"
}