Docs·Workspace

PUT/api/v1/spreelytics/references/:referenceId

Update a reference

Changes a reference. Send only the fields to change: "description": null clears the note, and "color": null goes back to the default colour.

It answers 404 when the id is not a reference in this audience. Needs the Editor or Admin role in the workspace that owns the audience. A Viewer gets 403.

Keys: an account key. Getting started explains both kinds.

Parameters

PropInTypeNotes
referenceIdpathstringThe reference id.
contactListIdquerystringThe audience id, a UUID. With an audience key it must be that key's own audience.

Request body

PropTypeNotes
title?stringOptional. Trimmed, and a blank title answers 400.
description?stringOptional. null or an empty string clears it.
date?stringOptional. A new moment, read as on create.
color?stringOptional. A preset var(--chart-N), a #rrggbb hex, or null for the default colour.

Response

PropTypeNotes
idstringThe reference id.
titlestringThe label shown on the marker.
descriptionstringThe longer note, or null.
datestringThe marked moment. Create and update calls answer in ISO 8601, the list in the database form (2026-09-30 09:00:00+00).
colorstringThe marker colour: a preset such as var(--chart-1), a #rrggbb hex, or null for the default colour.
createdAtstringWhen it was created. Only the create call answers in ISO 8601 (2026-09-30T09:00:00.000Z). Every other call returns the database form (2026-09-30 09:00:00+00), so parse both.
updatedAtstringWhen it last changed. Create and update calls answer in ISO 8601, lists and reads in the database form, as with createdAt.

Request

curl -X PUT 'https://app.spreelytics.com/api/v1/spreelytics/references/:referenceId?contactListId=…' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ … }'
const res = await fetch('https://app.spreelytics.com/api/v1/spreelytics/references/:referenceId', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ /* see Request body above */ }),
});
const data = await res.json();
import requests

res = requests.put(
    "https://app.spreelytics.com/api/v1/spreelytics/references/:referenceId",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={},  # see Request body above
)
data = res.json()

Response

{
  "id": "string",
  "title": "string",
  "description": "string",
  "date": "string",
  "color": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

See your own numbers today.

Free up to 100k events a month · no credit card

Contact

Tell us what you need.

A real person reads these. We usually reply within one working day.

Or email us directly at contact@spreelytics.com.