Skip to content
New Revenue by source: MRR from Stripe or Paddle beside your live traffic, each subscription credited to its first visit

Annotations API

POST /api/v1/annotations marks a change under the traffic chart from a deploy script or CI, so a rise or a fall has its reason beside it.

Under the traffic chart, the dashboard shows what may explain a rise or a fall: alerts that fired, deploys, Google's search updates, anomalies, and changes you note. Note one by hand on the chart, or send it with a secret key:

curl https://mettr.app/api/v1/annotations \
  -H "Authorization: Bearer $METTR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Pricing page redesign", "url": "https://github.com/acme/site/pull/412"}'
{"id": 318}

Fields

Field Type What it is
title string Required. What changed, up to 120 characters
url string A link to it (the pull request, the release, the campaign), http or https, up to 500 characters. Tokens and signatures in it are taken out before it is kept
ts string When it happened, ISO 8601. Now when left out; at most a day ahead

Nothing else: an unknown field is refused with 422, so a typo in a script fails where you see it. 60 a minute; a site keeps up to 20,000.

Deploys

For deploys there is a better way than a script: a deploy hook reads your repository's own webhook (GitHub, GitLab, Bitbucket) or takes one request from your CI, and notes the commit, its author and its branch. See Deploys.

Updated · This page as Markdown · Something unclear? [email protected]

Search the docs, features, comparisons, blog and changelog