Get an API key
Analytics API access requires a Pro plan.
1
Open the Analytics API integration
2
Generate a personal key
Click Generate API key. Analytics API keys start with
cak_, and cubic only shows the full value once.3
Store it securely
Save the key in your secret manager or local environment. If you revoke or regenerate the key, the previous value stops working immediately.
API keys are personal. Each team member should generate their own key, and every request is limited to the organizations and repositories that key owner can already access in cubic.
Endpoint
Use this endpoint to fetch merged pull requests that have completed cubic reviews in the selected time window.Authentication
Send the Analytics API key in theAuthorization header as a bearer token.
Example requests
Query parameters
If you do not send
startDate or endDate, cubic picks a default window based on how much data is available for that installation: the last 30 days, last 7 days, or last 24 hours.Date-only values are interpreted in UTC. For example,
endDate=2026-04-30 includes the full day through 23:59:59.999Z.startDateonly:endDatedefaults to the current timeendDateonly:startDatedefaults to the start of available data
Response format
The API returns one page of PR rows plus an optional cursor for the next page.Top-level fields
Pull request row fields
Pagination
WhennextCursor is present, send it back in the next request to continue from the previous page.