GET

Get usage

What end users did in the editor, per day in the editor's time zone.

View as Markdown
GEThttps://api.muzekit.com/v1/usage
curl "https://api.muzekit.com/v1/usage?days=30" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

days is 1 to 90 (default 30); a larger number is read as 90. A key reads its own environment's usage. Sessions opened from the Muzekit dashboard are not counted. active_users is how many different users did something in the editor. days lists every day in the range, oldest first, with zeros on quiet days, and date is the day in the editor's timezone.

sessions here counts every time the editor opened. Your plan counts a user reopening the same template in the same browser within 10 minutes as one session, so for the number your plan meters, read plan.period.sessions_used from GET /v1/workspace.

The numbers are totals across all your users. For one user's activity (to bill your own customers per use, say), listen for the session.started and template.updated webhooks: each carries the user's external_user_id.

Examples

Show the last 7 days in your admin

days=7 gives today and the six days before it, one row each, ready for a chart or a table.

curl -s "https://api.muzekit.com/v1/usage?days=7" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq -r '.days[] | [.date, .active_users, .sessions, .downloads] | @tsv'

Store yesterday's numbers each night

Run a daily job after midnight in the editor's time zone. Ask for days=2: the first row is yesterday, complete, and the second is today so far.

curl -s "https://api.muzekit.com/v1/usage?days=2" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" | jq '.days[0]'

Store rows by date, so a rerun of the job replaces the day instead of adding it twice.

See how often a session ends in a download

Over the longest range (90 days), divide downloads by sessions in total to see whether your users get to a finished design. Use templates_saved the same way for how many keep working on one.

curl -s "https://api.muzekit.com/v1/usage?days=90" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq '.total | if .sessions > 0 then .downloads / .sessions else 0 end'

A Test key reads Test usage only. Use your Live key for what your real users do.

Response

JSON
{
  "object": "usage",
  "environment": "live",
  "timezone": "America/New_York",
  "total": {
    "active_users": 412,
    "sessions": 1380,
    "templates_created": 96,
    "templates_saved": 2210,
    "downloads": 640
  },
  "days": [
    {
      "date": "2026-10-16",
      "active_users": 38,
      "sessions": 120,
      "templates_created": 7,
      "templates_saved": 190,
      "downloads": 51
    }
  ]
}