Skip to main content
Chart notes are short notes your team pins to a day on the Overview traffic chart, such as “Launched pricing page” or “Newsletter went out”. This API reads and writes the same notes the dashboard shows.

What to know first

  • One set of notes per site, shared with your whole team. Everyone in your organization who can see a site sees its notes, and admins and members can add, change and delete them. There are no private notes.
  • Dates are UTC calendar days, inside the analytics retention window. A note belongs to a day, YYYY-MM-DD, from 729 days before today up to today: 730 days, today included. There is no per-site timezone and no future date. Once a note’s day falls out of that window, our hourly deletion job deletes it within a day. On weekly or hourly charts, a note appears on the week or hour that contains its day.
  • Every note records how it was written. created_via and updated_via are dashboard, api_key or oauth (an AI assistant you connected). A note written with an API key is attributed to the team member who created that key.
  • API keys and AI assistants never see member ids. created_by and updated_by (user ids from our authentication provider) are returned only to the dashboard, which turns them into names. Traceten stores no names or email addresses with a note.
  • Note text is typed by people. If you feed notes to an AI model, treat the text as data, not instructions.
  • A site holds at most 2,000 notes.
  • Notes are deleted with their site. Deleting a site or closing your account deletes its notes when the erasure runs, 30 days later.
  • Do not put personal data in a note. Everyone on your team, every API key that can read the site, and any AI assistant you connect can read it.

Base URL and authentication

Every endpoint takes Authorization: Bearer <YOUR_API_KEY> (details) and a site_id. With an API key, site_id is the site’s snippet key, the ttid_… value your install snippet carries as data-site. Responses use the standard envelope: { "status": "success", "data": … } on success and { "status": "error", "error", "message", "field", "statusCode" } on failure. See Errors.

The note object

What an API key receives:
Characters are counted as Unicode characters, so an emoji counts as one. Notes containing control characters (other than tab and line breaks) or text-direction overrides are refused with 422.

GET /v1/annotations

List a site’s notes for a date window, oldest day first. Several notes can share a day; those come back in the order they were added.

GET /v1/annotations/:id

One note. site_id goes in the query string. A note on another site is 404.
200 returns { "status": "success", "data": { "annotation": { … } } }.

POST /v1/annotations

Add a note.
201 returns { "status": "success", "data": { "annotation": { … } } }.

PATCH /v1/annotations/:id

Change a note’s text, its day, or both. Send site_id and at least one of date or note; each follows the same rules as creating a note. updated_via records how the change was made. The note’s creator never changes.
200 returns { "status": "success", "data": { "annotation": { … } } }.

DELETE /v1/annotations/:id

Delete a note permanently. There is no undo. site_id goes in the query string.
204 with no body.

Errors

Next