Skip to main content
PUT
/
api
/
v1
/
embed
/
charts
Create or retrieve a chart embed
curl --request PUT \
  --url https://sacra.com/api/v1/embed/charts/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": [
    {
      "dataset_id": 123,
      "view_type": "column",
      "color": "<string>",
      "annotated_points": [
        {}
      ],
      "show_data_labels": true
    }
  ],
  "name": "<string>",
  "description": "<string>"
}
'
{ "status": "success", "data": { "embed_html": "<iframe frameborder=\"0\" height=\"500\" src=\"https://sacra.com/embed/8253ce69-a1ab-4567-a39d-a53d5f3ae554/charts/d355e702-4ec5-4973-aeeb-80450ddb980d\" title=\"Sacra Chart Embed\" width=\"560\">\n</iframe>\n" } }

Documentation Index

Fetch the complete documentation index at: https://docs.sacra.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

data
object[]
required
name
string

Chart title. Defaults to a sorted join of dataset names.

description
string

Chart description. Defaults to 'API Generated Chart'.

Response

Existing chart found. Returns its embed HTML.

status
string
required
data
object
required