GET

List users

Your end users, newest first.

View as Markdown
GEThttps://api.muzekit.com/v1/users

Query

qstring

Only users whose own id (external_id), name or email contains this text, in any case. Up to 100 characters.

limitnumber

1 to 100, default 20.

afterusr_…

next_cursor from the previous page.

Request

curl "https://api.muzekit.com/v1/users?limit=20" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

The list holds this key's environment's users, newest first: everyone a session or Create or update a user added. q finds users by your own id, their name or their email; to get one user by an id you know, use Get a user. last_active_at is the last time your server opened a session for the user or updated them.

Examples

Page through every user

Follow next_cursor until has_more is false. Use limit=100 for the fewest calls.

AFTER=""
while :; do
  PAGE=$(curl -s "https://api.muzekit.com/v1/users?limit=100&after=$AFTER" \
    -H "Authorization: Bearer $MUZEKIT_SECRET_KEY")
  echo "$PAGE" | jq -r '.data[] | [.id, .external_id] | @tsv'
  AFTER=$(echo "$PAGE" | jq -r '.next_cursor // empty')
  [ -z "$AFTER" ] && break
done

Search users by email or name

q matches part of the email, the name or your own id, in any case. It matches its text as typed, so % and _ are plain characters.

curl -G https://api.muzekit.com/v1/users \
  --data-urlencode "[email protected]" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

Map Muzekit ids to your own users

Each user's external_id is the id your server gave it. Build a lookup once and store the usr_… id on your side, so later calls (such as GET /v1/templates?user=usr_… or uploads into the user's library) need no search.

# One page: "your id <tab> Muzekit id"
curl -s "https://api.muzekit.com/v1/users?limit=100" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq -r '.data[] | [.external_id, .id] | @tsv'

Find users who stopped opening the editor

Compare last_active_at with a cutoff, for example to send your own reminder email. Muzekit never emails end users.

# Users on the first page with no session in 30 days
CUTOFF=$(date -u -v-30d +%Y-%m-%dT%H:%M:%S) # GNU date: -d '30 days ago'
curl -s "https://api.muzekit.com/v1/users?limit=100" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq -r --arg c "$CUTOFF" \
    '.data[] | select((.last_active_at // "") < $c) | .external_id'

For activity counts across all users per day (sessions, saves, downloads), read Get usage.

Response

JSON
{
  "object": "list",
  "data": [
    {
      "object": "user",
      "id": "usr_8fK2mQ1xZpR",
      "external_id": "user_42",
      "name": "Ada",
      "email": null,
      "locale": null,
      "metadata": {},
      "last_active_at": "2026-10-16T21:35:00.000Z",
      "created_at": "2026-10-02T09:12:44.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "usr_3hT9cL0wQeB"
}

Each item is a user.