Call the CreatorAudit API from the command line with curl and jq.
Every endpoint is a plain HTTPS request, so curl is the fastest way to try the
API. The examples below use curl for requests and jq
to parse JSON. Pair them to script anything from a one-off check to a full
paginated export.
Create a key on the API keys page, then
send it as Authorization: Bearer YOUR_API_KEY. Never paste a key into a shared shell
history — export it as an environment variable instead.
Every response carries an X-Request-ID header. Capture it whenever you need to
share a request with support. Use --dump-header to keep the headers while
still piping the body to jq.
Errors use RFC 9457 problem documents
served as application/problem+json. They always include type, title,
status, detail, and a machine-readable code. Branch on the HTTP status with
--write-out and surface the code plus the request id on failure.
The API uses cursor pagination: pass the previous response’s
pagination.next_cursor as the cursor query parameter and stop once
pagination.has_next is false. This loop collects every account into a single
JSON array.
collect_all_accounts() { local cursor="" page url : > /tmp/ca-accounts.jsonl while :; do url="$CREATORAUDIT_BASE_URL/accounts?limit=200" if [ -n "$cursor" ]; then url="$url&cursor=$cursor" fi page=$(curl --silent --show-error --fail \ --header "Authorization: Bearer $CREATORAUDIT_API_KEY" \ "$url") || { echo "request failed" >&2; return 1; } # append this page's items jq --compact-output '.data[]' <<<"$page" >> /tmp/ca-accounts.jsonl # stop when the API says there is no next page if [ "$(jq --raw-output '.pagination.has_next' <<<"$page")" != "true" ]; then break fi cursor=$(jq --raw-output '.pagination.next_cursor' <<<"$page") done jq --slurp '.' /tmp/ca-accounts.jsonl}collect_all_accounts | jq 'length'
next_cursor is opaque — don’t construct or decode it yourself. Always pass back the
exact string the previous page returned.