{
"error": {
"message": "Invalid or revoked API key",
"code": "UNAUTHENTICATED",
"suggestion": "Send a valid `Authorization: Bearer <token>` (nex_live_/nex_pat_ key, JWT, or OAuth access token).",
"retryable": false
}
}
{
"error": {
"message": "Insufficient API key scope",
"code": "INSUFFICIENT_SCOPE",
"suggestion": "Mint or rotate a key that includes the required scope, or grant a wildcard like `resource:*`.",
"retryable": false
}
}
{
"error": {
"message": "Rate limit exceeded for this API key",
"code": "API_KEY_RATE_LIMITED",
"suggestion": "Wait until X-RateLimit-Reset before retrying, or batch operations.",
"retryable": true
}
}
Overview
Usage Analytics
Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)
{
"error": {
"message": "Invalid or revoked API key",
"code": "UNAUTHENTICATED",
"suggestion": "Send a valid `Authorization: Bearer <token>` (nex_live_/nex_pat_ key, JWT, or OAuth access token).",
"retryable": false
}
}
{
"error": {
"message": "Insufficient API key scope",
"code": "INSUFFICIENT_SCOPE",
"suggestion": "Mint or rotate a key that includes the required scope, or grant a wildcard like `resource:*`.",
"retryable": false
}
}
{
"error": {
"message": "Rate limit exceeded for this API key",
"code": "API_KEY_RATE_LIMITED",
"suggestion": "Wait until X-RateLimit-Reset before retrying, or batch operations.",
"retryable": true
}
}
All /api/api-usage/* endpoints aggregate non-sandbox usage only. Requests made with nex_test_ keys still log rows with is_sandbox = true, but those rows are not included in summary, timeseries, by-agent, by-tool, by-key, or outcome totals.See Sandbox (test API keys) for how test keys isolate data elsewhere.
Operator UI
Facility dashboard:/admin/api-usage — requires analytics.view; pass facilityId for keys scoped to that facility.
Internal platform dashboard:/admin/platform-usage — cross-facility totals (facilityId omitted) for internal operators only; same JSON endpoints and CSV export (GET /api/api-usage/export).
Outcomes
An outcome is a marker the server stamps on a usage row when a call did
something billable — it is the unit outcome-based pricing counts, so you need to
know which of your calls produce one to reconcile a usage report against your own
call log.GET /api/api-usage/outcomes groups usage rows by that marker and returns
{ data: [{ outcomeType, totalCount }], scope }, largest count first. The
outcomeCount field on /summary (and in the CSV export’s summary block) is
the number of rows in the same window carrying any marker — because a row
carries at most one marker, it equals the sum of totalCount across
/outcomes. The other breakdowns (/by-agent, /by-tool, /by-key) do not
report an outcome count.
The markers
Four are billing outcome types:
Marker
Emitted by
Verb scope
shift_filled
fillShift — a staff member is assigned to an open shift
shifts:assign
shift_filled
swapShifts — two staff are reassigned across two shifts
shifts:assign
credential_verified
verifyCredential — a credential verification completes
credentials:verify
payroll_run
runPayroll — a payroll run is committed
payroll:run
lead_qualified
qualifyLead — lead scoring and enrichment complete
crm:*
Plus one that is recorded but is not a billing outcome type:
Marker
Emitted by
composio_execution
Every successful connected-app tool execution brokered through the org’s connected accounts
composio_execution appears in the /outcomes breakdown and counts toward
outcomeCount, but it is not one of the four billing outcome types, so it is not
reported to the billing meter. Do not read it as a billable unit.
REST calls emit outcomes too
The verbs above are the MCP path. Four REST endpoints mark the same outcomes,
so a usage report mixes both surfaces:
Endpoint
Marker
When
POST /api/shifts/{id}/assign
shift_filled
Only when the assignment moves the shift to filled
POST /api/credentials/{id}/verify-external
credential_verified
On a completed verification
PUT /api/crm/leads/{id}
lead_qualified
Only on the transition intoqualified — re-saving an already-qualified lead marks nothing
POST /api/payroll/runs/{id}/approve
payroll_run
When the run is approved and submitted for processing — the approve/submit is the billable moment, not the earlier draft
A usage row is written only for API-key-authenticated traffic. Session/JWT
calls through the app UI hit the same code paths but persist no usage event and
therefore no outcome — which is why the dashboards show integration traffic, not
in-app activity.
What does and does not produce one
Only a successful mutating call. The marker is set after the write
commits — a call that is denied, errors, returns a rejection, or pauses at
pending_approval produces a usage row with no outcome.
Reads never produce one. No read-only verb or registry tool marks an
outcome.
At most one marker per request. The marker is a single value on the
request, so one HTTP request or one tools/call contributes at most one
outcome row — later marks overwrite earlier ones rather than accumulating.
swapShifts touches two shifts, and its verb definition is annotated as counting
twice, but the runtime records a singleshift_filled marker for the call
(one marker per request, quantity 1). Reconcile a swap as one shift_filled,
not two.
Deduplication over MCP
For MCP tool calls the server derives a dedupe key of
mcp:<jsonrpcId>:<toolName> from the JSON-RPC request id and the tool name, and
uses it as the billing meter event’s identifier. Retrying the same logical
invocation — same JSON-RPC id, same tool — is not metered twice. Use a fresh
JSON-RPC id per genuinely new operation and reuse it when retrying, so this
works in your favor.There is no equivalent for REST: a REST call with no MCP dedupe key falls
back to an identifier derived from its own usage-event row, so two REST calls
that both fill a shift are two metered outcomes even if you intended them as one
retry. Use an Idempotency-Key on REST mutations —
a replayed response never re-executes the write, so it never produces a second
outcome.Note that the /outcomes and outcomeCount aggregates count usage rows, not
meter events. Deduplication happens on the billing-meter side, so a
double-counted retry can appear twice in the analytics breakdown while being
billed once.
Sandbox
nex_test_ sandbox traffic is excluded from outcome totals, exactly as it is
from every other aggregate on these endpoints: sandbox rows are written with
is_sandbox = true and every aggregate filters them out. They are also skipped
when reporting to the billing meter, so a sandbox fillShift is never billed.
See Sandbox (test API keys).
Response shapes
Endpoint
Shape
GET /api/api-usage/summary
totalCalls, uniqueKeys, avgLatencyMs, p95LatencyMs, errorCount, outcomeCount, plus periodDays, from, to, scope
GET /api/api-usage/timeseries
{ granularity, data, scope }
GET /api/api-usage/by-agent
{ data, scope }
GET /api/api-usage/by-tool
{ data, scope }
GET /api/api-usage/by-key
{ data, scope }
GET /api/api-usage/outcomes
{ data, scope }
scope is { "facilityId": 3 } when you pass facilityId, and
{ "global": true } for a cross-facility internal query. granularity is
"day" (the default) or "hour". All endpoints accept days (default 30)
to set the window.
Authorizations
bearerAuthapiKeyAuth
Authorization
string
header
required
JWT token authentication
Headers
NexSpace-Version
string
Pin the request to a dated API version (e.g. 2026-05-10). Applied by app-level middleware to every /api route (server/routes/index.ts → apiVersionMiddleware), which echoes the resolved value back in the NexSpace-Version response header. Omit to get the latest version. Discover the catalog at GET /.well-known/api-versions.
Pattern: ^\d{4}-\d{2}-\d{2}$
Query Parameters
facilityId
integer
When set, restrict aggregates to API keys with this api_keys.facility_id. Required for facility-scoped sessions that are not internal cross-facility operators. Omit for platform-wide totals (internal operators only).
days
integer
default:30
Lookback period in days
Response
Usage summary
totalCalls
integer
uniqueKeys
integer
avgLatencyMs
integer
p95LatencyMs
integer
errorCount
integer
outcomeCount
integer
periodDays
integer
Echo of the days query parameter (default 30).
from
string<date-time>
Start of the aggregation window (ISO 8601).
to
string<date-time>
End of the aggregation window (ISO 8601).
scope
object
Which slice of usage the aggregate covers. Facility-scoped sessions get { facilityId }; internal cross-facility operators querying without a facilityId get { global: true }.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"NexSpace Developer Docs","colors":{"primary":"#2563EB","light":"#60A5FA","dark":"#2563EB"},"logo":{"light":"https://mintcdn.com/nexspace365llc/21j0LL11KKqoYm2B/logo/light.png?fit=max\u0026auto=format\u0026n=21j0LL11KKqoYm2B\u0026q=85\u0026s=0d9972d5ef71de66b5eb2f87e39d22db","dark":"https://mintcdn.com/nexspace365llc/21j0LL11KKqoYm2B/logo/dark.png?fit=max\u0026auto=format\u0026n=21j0LL11KKqoYm2B\u0026q=85\u0026s=d28e8c7ab6777003c6c2633f81859237"},"favicon":"https://mintcdn.com/nexspace365llc/21j0LL11KKqoYm2B/favicon.png?fit=max\u0026auto=format\u0026n=21j0LL11KKqoYm2B\u0026q=85\u0026s=870af17e66cf7713bd976289f6b96737","api":{"openapi":["https://api.nexspace365.com/api/openapi.json"],"mdx":{"auth":{"method":"bearer","name":"Authorization"},"server":"https://api.nexspace365.com"}},"navbar":{"links":[{"href":"mailto:admin@nexspace365.com","label":"Contact"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.nexspace365.com"}},"footer":{"socials":{"x":"https://x.com/nexspace365","github":"https://github.com/Nexspace365","linkedin":"https://linkedin.com/company/nexspace365"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/Nexspace365/NexSpace"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nexspace365llc","hasAudioNarration":false,"actualSubdomain":"nexspace365llc","customDomains":["developers.nexspace365.com"],"gitSource":{"type":"github","owner":"nexspace365","repo":"nexspace","deployBranch":"production","contentDirectory":"docs/developers","isPrivate":true,"mountPath":"","label":"","_id":"6b10e8c99ffae5051c41467c"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b07b2d4572bfd1099776647","clientVersion":"0.0.4448","searchFilterCounts":[{"language":"default","tag":"API Reference","count":87},{"language":"default","tag":"Endpoints","count":84},{"language":"default","tag":"Documentation","count":22},{"language":"default","tag":"Agents","count":17},{"language":"default","tag":"OAuth","count":13},{"language":"default","tag":"Core Concepts","count":12},{"language":"default","tag":"CLI","count":8},{"language":"default","tag":"Analytics","count":7},{"language":"default","tag":"Shifts","count":7},{"language":"default","tag":"Integrations","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/usage-analytics","slug":"/api-reference/usage-analytics","pageMetadata":{"title":"Usage Analytics","description":"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)","openapi":"get /api/api-usage/summary","href":"/api-reference/usage-analytics"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Note,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`All `,_jsx(_components.code,{children:`/api/api-usage/*`}),` endpoints aggregate `,_jsx(_components.strong,{children:`non-sandbox`}),` usage only. Requests made with `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`nex_test_`})}),` keys still log rows with `,_jsx(_components.code,{children:`is_sandbox = true`}),`, but those rows are `,_jsx(_components.strong,{children:`not`}),` included in summary, timeseries, by-agent, by-tool, by-key, or outcome totals.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/concepts/sandbox`,children:`Sandbox (test API keys)`}),` for how test keys isolate data elsewhere.`]}),`\n`,_jsx(Heading,{level:`2`,id:`operator-ui`,children:`Operator UI`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Facility dashboard:`}),` `,_jsx(_components.code,{children:`/admin/api-usage`}),` — requires `,_jsx(_components.code,{children:`analytics.view`}),`; pass `,_jsx(_components.code,{children:`facilityId`}),` for keys scoped to that facility.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Internal platform dashboard:`}),` `,_jsx(_components.code,{children:`/admin/platform-usage`}),` — cross-facility totals (`,_jsx(_components.code,{children:`facilityId`}),` omitted) for internal operators only; same JSON endpoints and CSV export (`,_jsx(_components.code,{children:`GET /api/api-usage/export`}),`).`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`outcomes`,children:`Outcomes`}),`\n`,_jsxs(_components.p,{children:[`An `,_jsx(_components.strong,{children:`outcome`}),` is a marker the server stamps on a usage row when a call did\nsomething billable — it is the unit outcome-based pricing counts, so you need to\nknow which of your calls produce one to reconcile a usage report against your own\ncall log.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /api/api-usage/outcomes`}),` groups usage rows by that marker and returns\n`,_jsx(_components.code,{children:`{ data: [{ outcomeType, totalCount }], scope }`}),`, largest count first. The\n`,_jsx(_components.code,{children:`outcomeCount`}),` field on `,_jsx(_components.code,{children:`/summary`}),` (and in the CSV export’s summary block) is\nthe number of rows in the same window carrying `,_jsx(_components.strong,{children:`any`}),` marker — because a row\ncarries at most one marker, it equals the sum of `,_jsx(_components.code,{children:`totalCount`}),` across\n`,_jsx(_components.code,{children:`/outcomes`}),`. The other breakdowns (`,_jsx(_components.code,{children:`/by-agent`}),`, `,_jsx(_components.code,{children:`/by-tool`}),`, `,_jsx(_components.code,{children:`/by-key`}),`) do not\nreport an outcome count.`]}),`\n`,_jsx(Heading,{level:`3`,id:`the-markers`,children:`The markers`}),`\n`,_jsx(_components.p,{children:`Four are billing outcome types:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Marker`}),_jsx(_components.th,{children:`Emitted by`}),_jsx(_components.th,{children:`Verb scope`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`shift_filled`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fillShift`}),` — a staff member is assigned to an open shift`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`shifts:assign`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`shift_filled`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`swapShifts`}),` — two staff are reassigned across two shifts`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`shifts:assign`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`credential_verified`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`verifyCredential`}),` — a credential verification completes`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`credentials:verify`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`payroll_run`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`runPayroll`}),` — a payroll run is committed`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`payroll:run`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`lead_qualified`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`qualifyLead`}),` — lead scoring and enrichment complete`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`crm:*`})})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Plus one that is recorded but is `,_jsx(_components.strong,{children:`not`}),` a billing outcome type:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Marker`}),_jsx(_components.th,{children:`Emitted by`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`composio_execution`})}),_jsxs(_components.td,{children:[`Every successful `,_jsx(_components.a,{href:`/concepts/mcp`,children:`connected-app`}),` tool execution brokered through the org’s connected accounts`]})]})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`composio_execution`}),` appears in the `,_jsx(_components.code,{children:`/outcomes`}),` breakdown and counts toward\n`,_jsx(_components.code,{children:`outcomeCount`}),`, but it is not one of the four billing outcome types, so it is not\nreported to the billing meter. Do not read it as a billable unit.`]}),`\n`,_jsx(Heading,{level:`3`,id:`rest-calls-emit-outcomes-too`,children:`REST calls emit outcomes too`}),`\n`,_jsx(_components.p,{children:`The verbs above are the MCP path. Four REST endpoints mark the same outcomes,\nso a usage report mixes both surfaces:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Marker`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/shifts/{id}/assign`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`shift_filled`})}),_jsxs(_components.td,{children:[`Only when the assignment moves the shift to `,_jsx(_components.code,{children:`filled`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/credentials/{id}/verify-external`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`credential_verified`})}),_jsx(_components.td,{children:`On a completed verification`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PUT /api/crm/leads/{id}`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`lead_qualified`})}),_jsxs(_components.td,{children:[`Only on the transition `,_jsx(_components.strong,{children:`into`}),` `,_jsx(_components.code,{children:`qualified`}),` — re-saving an already-qualified lead marks nothing`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/payroll/runs/{id}/approve`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`payroll_run`})}),_jsx(_components.td,{children:`When the run is approved and submitted for processing — the approve/submit is the billable moment, not the earlier draft`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A usage row is written only for `,_jsx(_components.strong,{children:`API-key-authenticated`}),` traffic. Session/JWT\ncalls through the app UI hit the same code paths but persist no usage event and\ntherefore no outcome — which is why the dashboards show integration traffic, not\nin-app activity.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`what-does-and-does-not-produce-one`,children:`What does and does not produce one`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Only a successful mutating call.`}),` The marker is set `,_jsx(_components.em,{children:`after`}),` the write\ncommits — a call that is denied, errors, returns a rejection, or pauses at\n`,_jsx(_components.code,{children:`pending_approval`}),` produces a usage row with no outcome.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reads never produce one.`}),` No read-only verb or registry tool marks an\noutcome.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`At most one marker per request.`}),` The marker is a single value on the\nrequest, so one HTTP request or one `,_jsx(_components.code,{children:`tools/call`}),` contributes at most one\noutcome row — later marks overwrite earlier ones rather than accumulating.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`swapShifts`}),` touches two shifts, and its verb definition is annotated as counting\ntwice, but the runtime records a `,_jsx(_components.strong,{children:`single`}),` `,_jsx(_components.code,{children:`shift_filled`}),` marker for the call\n(one marker per request, quantity 1). Reconcile a swap as one `,_jsx(_components.code,{children:`shift_filled`}),`,\nnot two.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`deduplication-over-mcp`,children:`Deduplication over MCP`}),`\n`,_jsxs(_components.p,{children:[`For MCP tool calls the server derives a dedupe key of\n`,_jsx(_components.code,{children:`mcp:\u003cjsonrpcId>:\u003ctoolName>`}),` from the JSON-RPC request id and the tool name, and\nuses it as the billing meter event’s identifier. Retrying the `,_jsx(_components.em,{children:`same`}),` logical\ninvocation — same JSON-RPC `,_jsx(_components.code,{children:`id`}),`, same tool — is not metered twice. Use a fresh\nJSON-RPC `,_jsx(_components.code,{children:`id`}),` per genuinely new operation and reuse it when retrying, so this\nworks in your favor.`]}),`\n`,_jsxs(_components.p,{children:[`There is `,_jsx(_components.strong,{children:`no equivalent for REST`}),`: a REST call with no MCP dedupe key falls\nback to an identifier derived from its own usage-event row, so two REST calls\nthat both fill a shift are two metered outcomes even if you intended them as one\nretry. Use an `,_jsx(_components.a,{href:`/concepts/idempotency`,children:_jsx(_components.code,{children:`Idempotency-Key`})}),` on REST mutations —\na replayed response never re-executes the write, so it never produces a second\noutcome.`]}),`\n`,_jsxs(_components.p,{children:[`Note that the `,_jsx(_components.code,{children:`/outcomes`}),` and `,_jsx(_components.code,{children:`outcomeCount`}),` aggregates count `,_jsx(_components.strong,{children:`usage rows`}),`, not\nmeter events. Deduplication happens on the billing-meter side, so a\ndouble-counted retry can appear twice in the analytics breakdown while being\nbilled once.`]}),`\n`,_jsx(Heading,{level:`3`,id:`sandbox`,children:`Sandbox`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`nex_test_`}),` sandbox traffic is excluded from outcome totals, exactly as it is\nfrom every other aggregate on these endpoints: sandbox rows are written with\n`,_jsx(_components.code,{children:`is_sandbox = true`}),` and every aggregate filters them out. They are also skipped\nwhen reporting to the billing meter, so a sandbox `,_jsx(_components.code,{children:`fillShift`}),` is never billed.\nSee `,_jsx(_components.a,{href:`/concepts/sandbox`,children:`Sandbox (test API keys)`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-shapes`,children:`Response shapes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Shape`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/api-usage/summary`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`totalCalls`}),`, `,_jsx(_components.code,{children:`uniqueKeys`}),`, `,_jsx(_components.code,{children:`avgLatencyMs`}),`, `,_jsx(_components.code,{children:`p95LatencyMs`}),`, `,_jsx(_components.code,{children:`errorCount`}),`, `,_jsx(_components.code,{children:`outcomeCount`}),`, plus `,_jsx(_components.code,{children:`periodDays`}),`, `,_jsx(_components.code,{children:`from`}),`, `,_jsx(_components.code,{children:`to`}),`, `,_jsx(_components.code,{children:`scope`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/api-usage/timeseries`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ granularity, data, scope }`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/api-usage/by-agent`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ data, scope }`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/api-usage/by-tool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ data, scope }`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/api-usage/by-key`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ data, scope }`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/api-usage/outcomes`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ data, scope }`})})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`scope`}),` is `,_jsx(_components.code,{children:`{ \"facilityId\": 3 }`}),` when you pass `,_jsx(_components.code,{children:`facilityId`}),`, and\n`,_jsx(_components.code,{children:`{ \"global\": true }`}),` for a cross-facility internal query. `,_jsx(_components.code,{children:`granularity`}),` is\n`,_jsx(_components.code,{children:`\"day\"`}),` (the default) or `,_jsx(_components.code,{children:`\"hour\"`}),`. All endpoints accept `,_jsx(_components.code,{children:`days`}),` (default `,_jsx(_components.code,{children:`30`}),`)\nto set the window.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Usage Analytics","description":"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)","openapi":"get /api/api-usage/summary","href":"/api-reference/usage-analytics"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Operator UI","slug":"operator-ui","depth":2,"children":[]},{"title":"Outcomes","slug":"outcomes","depth":2,"children":[{"title":"The markers","slug":"the-markers","depth":3,"children":[]},{"title":"REST calls emit outcomes too","slug":"rest-calls-emit-outcomes-too","depth":3,"children":[]},{"title":"What does and does not produce one","slug":"what-does-and-does-not-produce-one","depth":3,"children":[]},{"title":"Deduplication over MCP","slug":"deduplication-over-mcp","depth":3,"children":[]},{"title":"Sandbox","slug":"sandbox","depth":3,"children":[]}]},{"title":"Response shapes","slug":"response-shapes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"getUsageSummary","x-scopes":["analytics:read"],"tags":["Analytics"],"summary":"Usage summary statistics","description":"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)","security":["034bbdff-bd58-4414-9da4-22f0914b7777","08159f6b-af71-4d85-8774-d6b9bb4f0b05"],"parameters":["4b1f1131-2d31-4a6c-9d61-10adf24b8ede","3e4adaef-af87-4836-a37a-ef233e23088c","eeba896d-b805-4068-b779-d385caa4b55a"],"responses":{"200":"62f7d1f3-1d3c-423e-a220-3febad7b1847","401":"46db1209-a896-4b4f-a3e8-70bfdb95f841","403":"3a5ff3aa-7dbf-4f2e-9762-a52102f71f84","429":"3960e7ce-3fbd-452c-b6e1-1608356c8bbd"},"method":"get","type":"path","servers":["23f228a2-9ed2-4aee-8b02-70e1bb3089c7"],"path":"/api/api-usage/summary","baseUrlOptions":["https://api.nexspace365.com"],"title":"Usage summary statistics","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"4b1f1131-2d31-4a6c-9d61-10adf24b8ede":{"name":"NexSpace-Version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","isRequired":false,"description":"Pin the request to a dated API version (e.g. `2026-05-10`). Applied by app-level middleware to every `/api` route (`server/routes/index.ts` → `apiVersionMiddleware`), which echoes the resolved value back in the `NexSpace-Version` response header. Omit to get the latest version. Discover the catalog at `GET /.well-known/api-versions`.\n","uniqueKey":"","typeLabel":"string"},"description":"Pin the request to a dated API version (e.g. `2026-05-10`). Applied by app-level middleware to every `/api` route (`server/routes/index.ts` → `apiVersionMiddleware`), which echoes the resolved value back in the `NexSpace-Version` response header. Omit to get the latest version. Discover the catalog at `GET /.well-known/api-versions`.\n"},"3e4adaef-af87-4836-a37a-ef233e23088c":{"name":"facilityId","in":"query","required":false,"schema":{"type":"integer","isRequired":false,"description":"When set, restrict aggregates to API keys with this `api_keys.facility_id`. Required for facility-scoped sessions that are not internal cross-facility operators. Omit for platform-wide totals (internal operators only).\n","uniqueKey":"","typeLabel":"integer"},"description":"When set, restrict aggregates to API keys with this `api_keys.facility_id`. Required for facility-scoped sessions that are not internal cross-facility operators. Omit for platform-wide totals (internal operators only).\n"},"eeba896d-b805-4068-b779-d385caa4b55a":{"name":"days","in":"query","schema":{"type":"integer","default":30,"description":"Lookback period in days","uniqueKey":"","typeLabel":"integer"},"description":"Lookback period in days"}},"responses":{"62f7d1f3-1d3c-423e-a220-3febad7b1847":{"description":"Usage summary","content":{"application/json":{"schema":{"type":"object","properties":{"totalCalls":{"type":"integer","uniqueKey":"totalCalls","typeLabel":"integer"},"uniqueKeys":{"type":"integer","uniqueKey":"uniqueKeys","typeLabel":"integer"},"avgLatencyMs":{"type":"integer","uniqueKey":"avgLatencyMs","typeLabel":"integer"},"p95LatencyMs":{"type":"integer","uniqueKey":"p95LatencyMs","typeLabel":"integer"},"errorCount":{"type":"integer","uniqueKey":"errorCount","typeLabel":"integer"},"outcomeCount":{"type":"integer","uniqueKey":"outcomeCount","typeLabel":"integer"},"periodDays":{"type":"integer","description":"Echo of the `days` query parameter (default 30).","uniqueKey":"periodDays","typeLabel":"integer"},"from":{"type":"string","format":"date-time","description":"Start of the aggregation window (ISO 8601).","uniqueKey":"from","typeLabel":"string\u003cdate-time>"},"to":{"type":"string","format":"date-time","description":"End of the aggregation window (ISO 8601).","uniqueKey":"to","typeLabel":"string\u003cdate-time>"},"scope":{"type":"object","description":"Which slice of usage the aggregate covers. Facility-scoped sessions get `{ facilityId }`; internal cross-facility operators querying without a `facilityId` get `{ global: true }`.\n","properties":{"facilityId":{"type":"integer","uniqueKey":"scope.facilityId","typeLabel":"integer"},"global":{"type":"boolean","uniqueKey":"scope.global","typeLabel":"boolean"}},"uniqueKey":"scope","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"totalCalls":123,"uniqueKeys":123,"avgLatencyMs":123,"p95LatencyMs":123,"errorCount":123,"outcomeCount":123,"periodDays":123,"from":"2023-11-07T05:31:56Z","to":"2023-11-07T05:31:56Z","scope":{"facilityId":123,"global":true}}}},"exampleType":"generated"}},"exampleType":"generated"},"46db1209-a896-4b4f-a3e8-70bfdb95f841":{"description":"Missing, invalid, expired, or revoked credential.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code (e.g. VALIDATION_FAILED, NOT_FOUND)","uniqueKey":"error.code","typeLabel":"string"},"details":{"type":"object","description":"Structured details (e.g. Zod validation issues)","uniqueKey":"error.details","typeLabel":"object"},"suggestion":{"type":"string","description":"Hint for agents on how to recover","uniqueKey":"error.suggestion","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether the same request might succeed on retry","uniqueKey":"error.retryable","typeLabel":"boolean"}},"required":["message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"requestId":{"type":"string","description":"Correlation ID for logs and Sentry","uniqueKey":"requestId","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Invalid or revoked API key","code":"UNAUTHENTICATED","suggestion":"Send a valid `Authorization: Bearer \u003ctoken>` (nex_live_/nex_pat_ key, JWT, or OAuth access token).","retryable":false}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Invalid or revoked API key","code":"UNAUTHENTICATED","suggestion":"Send a valid `Authorization: Bearer \u003ctoken>` (nex_live_/nex_pat_ key, JWT, or OAuth access token).","retryable":false}}}},"exampleType":"examples"}},"exampleType":"examples"},"3a5ff3aa-7dbf-4f2e-9762-a52102f71f84":{"description":"Authenticated, but the API key's granted scopes do not include the scope this operation requires (see the operation's \"Required API-key scope\").\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code (e.g. VALIDATION_FAILED, NOT_FOUND)","uniqueKey":"error.code","typeLabel":"string"},"details":{"type":"object","description":"Structured details (e.g. Zod validation issues)","uniqueKey":"error.details","typeLabel":"object"},"suggestion":{"type":"string","description":"Hint for agents on how to recover","uniqueKey":"error.suggestion","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether the same request might succeed on retry","uniqueKey":"error.retryable","typeLabel":"boolean"}},"required":["message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"requestId":{"type":"string","description":"Correlation ID for logs and Sentry","uniqueKey":"requestId","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Insufficient API key scope","code":"INSUFFICIENT_SCOPE","suggestion":"Mint or rotate a key that includes the required scope, or grant a wildcard like `resource:*`.","retryable":false}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Insufficient API key scope","code":"INSUFFICIENT_SCOPE","suggestion":"Mint or rotate a key that includes the required scope, or grant a wildcard like `resource:*`.","retryable":false}}}},"exampleType":"examples"}},"exampleType":"examples"},"3960e7ce-3fbd-452c-b6e1-1608356c8bbd":{"description":"Per-key rate limit exceeded. Includes `Retry-After` and the full `X-RateLimit-*` set so agents can back off precisely (NEX-1659).\n","headers":{"Retry-After":{"description":"Seconds to wait before retrying (present on 429).","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window for this API key (NEX-1659).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) when the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code (e.g. VALIDATION_FAILED, NOT_FOUND)","uniqueKey":"error.code","typeLabel":"string"},"details":{"type":"object","description":"Structured details (e.g. Zod validation issues)","uniqueKey":"error.details","typeLabel":"object"},"suggestion":{"type":"string","description":"Hint for agents on how to recover","uniqueKey":"error.suggestion","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether the same request might succeed on retry","uniqueKey":"error.retryable","typeLabel":"boolean"}},"required":["message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"requestId":{"type":"string","description":"Correlation ID for logs and Sentry","uniqueKey":"requestId","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"Rate limit exceeded for this API key","code":"API_KEY_RATE_LIMITED","suggestion":"Wait until X-RateLimit-Reset before retrying, or batch operations.","retryable":true}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Rate limit exceeded for this API key","code":"API_KEY_RATE_LIMITED","suggestion":"Wait until X-RateLimit-Reset before retrying, or batch operations.","retryable":true}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"034bbdff-bd58-4414-9da4-22f0914b7777":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token authentication","scopes":[],"schemeName":"bearerAuth"}},"08159f6b-af71-4d85-8774-d6b9bb4f0b05":{"apiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"NexSpaceApiKey","description":"API key or personal access token (NEX-1042). Send as\n`Authorization: Bearer \u003ctoken>`. Token format:\n - `nex_live_…` — live API key (server-to-server)\n - `nex_test_…` — sandbox API key\n - `nex_pat_…` — personal access token (acts as the issuing user)\n\nAuthorization is decided by the key's `scopes` array, not the\nowning user's RBAC role. See `POST /api/api-keys` to mint a key.\n","scopes":[],"schemeName":"apiKeyAuth"}}},"servers":{"23f228a2-9ed2-4aee-8b02-70e1bb3089c7":{"url":"https://api.nexspace365.com","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token authentication","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"JWT token authentication","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"NexSpaceApiKey","description":"API key or personal access token (NEX-1042). Send as\n`Authorization: Bearer \u003ctoken>`. Token format:\n - `nex_live_…` — live API key (server-to-server)\n - `nex_test_…` — sandbox API key\n - `nex_pat_…` — personal access token (acts as the issuing user)\n\nAuthorization is decided by the key's `scopes` array, not the\nowning user's RBAC role. See `POST /api/api-keys` to mint a key.\n","scopes":[],"schemeName":"apiKeyAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key or personal access token (NEX-1042). Send as\n`Authorization: Bearer \u003ctoken>`. Token format:\n - `nex_live_…` — live API key (server-to-server)\n - `nex_test_…` — sandbox API key\n - `nex_pat_…` — personal access token (acts as the issuing user)\n\nAuthorization is decided by the key's `scopes` array, not the\nowning user's RBAC role. See `POST /api/api-keys` to mint a key.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKeyAuth","name":"Authorization"}],"title":"apiKeyAuth"}]},"originalFileLocation":"https://api.nexspace365.com/api/openapi.json"},"subdomain":"nexspace365llc","siteName":"NexSpace Developer Docs","title":"Usage Analytics - NexSpace Developer Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-28T18:06:33.075Z","originalFileLocation":"api-reference/usage-analytics.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)\">\u003cmeta data-mint-head name=\"application-name\" content=\"NexSpace Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Usage Analytics - NexSpace Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"NexSpace Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.nexspace365.com/api-reference/usage-analytics\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nexspace365llc.mintlify.site/_mintlify/api/og/v2?division=Overview\u0026amp;title=Usage+Analytics\u0026amp;description=Monitor+API+key+usage+and+request+metrics+%28production+traffic+only+%E2%80%94+sandbox+nex_test_+rows+excluded%29\u0026amp;theme=b6b488d5142a420cec1aa907\u0026amp;signature=70abcda66c55d1f335f0b56d7f6c271882716d2f7f680161b2f2d3d7ec3bcfd4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Usage Analytics - NexSpace Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nexspace365llc.mintlify.site/_mintlify/api/og/v2?division=Overview\u0026amp;title=Usage+Analytics\u0026amp;description=Monitor+API+key+usage+and+request+metrics+%28production+traffic+only+%E2%80%94+sandbox+nex_test_+rows+excluded%29\u0026amp;theme=b6b488d5142a420cec1aa907\u0026amp;signature=70abcda66c55d1f335f0b56d7f6c271882716d2f7f680161b2f2d3d7ec3bcfd4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nexspace365llc/i9uOvj_RbWrMRRIL/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"NexSpace Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.nexspace365.com/api-reference/usage-analytics\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/usage-analytics.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.nexspace365.com/#organization\",\"name\":\"NexSpace Developer Docs\",\"url\":\"https://developers.nexspace365.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nexspace365llc/21j0LL11KKqoYm2B/logo/light.png?fit=max\u0026auto=format\u0026n=21j0LL11KKqoYm2B\u0026q=85\u0026s=0d9972d5ef71de66b5eb2f87e39d22db\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.nexspace365.com#website\",\"name\":\"NexSpace Developer Docs\",\"url\":\"https://developers.nexspace365.com\",\"publisher\":{\"@id\":\"https://developers.nexspace365.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.nexspace365.com/api-reference/usage-analytics#webpage\",\"url\":\"https://developers.nexspace365.com/api-reference/usage-analytics\",\"name\":\"Usage Analytics\",\"description\":\"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)\",\"dateModified\":\"2026-08-28T18:06:33.075Z\",\"isPartOf\":{\"@id\":\"https://developers.nexspace365.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.nexspace365.com/api-reference/usage-analytics#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.nexspace365.com/api-reference/usage-analytics#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Overview\",\"item\":\"https://developers.nexspace365.com/api-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Usage Analytics\",\"item\":\"https://developers.nexspace365.com/api-reference/usage-analytics\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.nexspace365.com/api-reference/usage-analytics#apireference\",\"headline\":\"Usage Analytics\",\"name\":\"Usage Analytics\",\"description\":\"Monitor API key usage and request metrics (production traffic only — sandbox nex_test_ rows excluded)\",\"url\":\"https://developers.nexspace365.com/api-reference/usage-analytics\",\"mainEntityOfPage\":{\"@id\":\"https://developers.nexspace365.com/api-reference/usage-analytics#webpage\"},\"dateModified\":\"2026-08-28T18:06:33.075Z\",\"publisher\":{\"@id\":\"https://developers.nexspace365.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.nexspace365.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"NexSpace Developer Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"NexSpace Developer Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/usage-analytics.md","siteName":"NexSpace Developer Docs","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/Nexspace365/NexSpace"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","description":"NexSpace REST API reference documentation","href":"/api-reference/overview"},{"title":"Usage Analytics","openapi":"get /api/api-usage/summary","href":"/api-reference/usage-analytics"},{"title":"Tool Catalog","description":"Every registry tool exposed over MCP, with its purpose, read/write mode, and exact required scope","href":"/api-reference/tool-catalog"}]},{"group":"Endpoints","pages":[{"group":"Authentication","pages":[{"title":"Get the authenticated identity","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/auth/me","href":"/api-reference/authentication/get-the-authenticated-identity"},{"title":"Start user impersonation","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/impersonate/start","href":"/api-reference/authentication/start-user-impersonation"},{"title":"Stop user impersonation","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/impersonation/stop","href":"/api-reference/authentication/stop-user-impersonation"},{"title":"Get impersonation status","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/impersonation/status","href":"/api-reference/authentication/get-impersonation-status"}]},{"group":"Facilities","pages":[{"title":"Get all facilities","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/facilities","href":"/api-reference/facilities/get-all-facilities"},{"title":"Create new facility","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/facilities","href":"/api-reference/facilities/create-new-facility"},{"title":"Get facility by ID","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/facilities/{id}","href":"/api-reference/facilities/get-facility-by-id"},{"title":"Deactivate facility","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json delete /api/facilities/{id}","href":"/api-reference/facilities/deactivate-facility"},{"title":"Update facility","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json patch /api/facilities/{id}","href":"/api-reference/facilities/update-facility"}]},{"group":"Staff","pages":[{"title":"Get all staff members","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/staff","href":"/api-reference/staff/get-all-staff-members"},{"title":"Create new staff member","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/staff","href":"/api-reference/staff/create-new-staff-member"},{"title":"Get staff member by ID","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/staff/{id}","href":"/api-reference/staff/get-staff-member-by-id"},{"title":"Update staff member","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json patch /api/staff/{id}","href":"/api-reference/staff/update-staff-member"}]},{"group":"Credentials","pages":[{"title":"List a staff member's credentials","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/staff/{id}/credentials","href":"/api-reference/credentials/list-a-staff-members-credentials"},{"title":"Add a credential","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/staff/{id}/credentials","href":"/api-reference/credentials/add-a-credential"},{"title":"Delete a credential","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json delete /api/credentials/{id}","href":"/api-reference/credentials/delete-a-credential"},{"title":"Update a credential","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json patch /api/credentials/{id}","href":"/api-reference/credentials/update-a-credential"}]},{"group":"Shifts","pages":[{"title":"Get all shifts","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/shifts","href":"/api-reference/shifts/get-all-shifts"},{"title":"Create new shift","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/shifts","href":"/api-reference/shifts/create-new-shift"},{"title":"Get shift by ID","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/shifts/{id}","href":"/api-reference/shifts/get-shift-by-id"},{"title":"Delete shift","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json delete /api/shifts/{id}","href":"/api-reference/shifts/delete-shift"},{"title":"Update shift","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json patch /api/shifts/{id}","href":"/api-reference/shifts/update-shift"},{"title":"Assign staff to shift","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/shifts/{id}/assign","href":"/api-reference/shifts/assign-staff-to-shift"},{"title":"Unassign staff from shift","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/shifts/{id}/unassign","href":"/api-reference/shifts/unassign-staff-from-shift"}]},{"group":"Dashboard","pages":[{"title":"Get dashboard statistics","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/dashboard/stats","href":"/api-reference/dashboard/get-dashboard-statistics"},{"title":"Get dashboard widgets","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/dashboard/widgets","href":"/api-reference/dashboard/get-dashboard-widgets"},{"title":"Save dashboard widget layout","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/dashboard/widgets","href":"/api-reference/dashboard/save-dashboard-widget-layout"},{"title":"Get the organization activity feed","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/activity","href":"/api-reference/dashboard/get-the-organization-activity-feed"},{"title":"Get recent activity (legacy)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/dashboard/recent-activity","href":"/api-reference/dashboard/get-recent-activity-legacy"}]},{"group":"API Keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-keys","href":"/api-reference/api-keys/list-api-keys"},{"title":"Create API key","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/api-keys","href":"/api-reference/api-keys/create-api-key"},{"title":"Revoke API key","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/api-keys/{id}/revoke","href":"/api-reference/api-keys/revoke-api-key"},{"title":"Rotate API key","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/api-keys/{id}/rotate","href":"/api-reference/api-keys/rotate-api-key"}]},{"group":"MCP","pages":[{"title":"MCP JSON-RPC endpoint","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /mcp","href":"/api-reference/mcp/mcp-json-rpc-endpoint"},{"title":"Resume a dropped MCP tool-call stream","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /mcp/stream/{streamId}","href":"/api-reference/mcp/resume-a-dropped-mcp-tool-call-stream"},{"title":"MCP server discovery","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /.well-known/mcp","href":"/api-reference/mcp/mcp-server-discovery"},{"title":"MCP liveness probe","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /mcp/health","href":"/api-reference/mcp/mcp-liveness-probe"},{"title":"Protected-resource metadata (RFC 9728)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /.well-known/oauth-protected-resource","href":"/api-reference/mcp/protected-resource-metadata-rfc-9728"},{"title":"Protected-resource metadata for /mcp (RFC 9728 §3.1)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /.well-known/oauth-protected-resource/mcp","href":"/api-reference/mcp/protected-resource-metadata-for-mcp-rfc-9728-§31"}]},{"group":"Agents","pages":[{"title":"List headless agent runs","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/agents/{id}/runs","href":"/api-reference/agents/list-headless-agent-runs"},{"title":"Start a headless agent run","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/agents/{id}/runs","href":"/api-reference/agents/start-a-headless-agent-run"},{"title":"Get headless agent run state","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/agents/{id}/runs/{runId}","href":"/api-reference/agents/get-headless-agent-run-state"},{"title":"Cancel a headless agent run","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json delete /api/agents/{id}/runs/{runId}","href":"/api-reference/agents/cancel-a-headless-agent-run"},{"title":"Stream a headless agent run (SSE)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/agents/{id}/runs/{runId}/stream","href":"/api-reference/agents/stream-a-headless-agent-run-sse"},{"title":"List the approvals a headless run raised","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/agents/{id}/runs/{runId}/approvals","href":"/api-reference/agents/list-the-approvals-a-headless-run-raised"},{"title":"List an agent's automation triggers","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/agent-builder/{id}/triggers","href":"/api-reference/agents/list-an-agents-automation-triggers"},{"title":"Create an automation trigger","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/agent-builder/{id}/triggers","href":"/api-reference/agents/create-an-automation-trigger"},{"title":"Delete an automation trigger","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json delete /api/agent-builder/{id}/triggers/{triggerId}","href":"/api-reference/agents/delete-an-automation-trigger"},{"title":"Update an automation trigger","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json patch /api/agent-builder/{id}/triggers/{triggerId}","href":"/api-reference/agents/update-an-automation-trigger"},{"title":"Enable or disable an automation trigger","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/agent-builder/{id}/triggers/{triggerId}/toggle","href":"/api-reference/agents/enable-or-disable-an-automation-trigger"},{"title":"Dispatch a trigger's agent immediately","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/agent-builder/{id}/triggers/{triggerId}/run-now","href":"/api-reference/agents/dispatch-a-triggers-agent-immediately"},{"title":"Approve a pending agent action (and resume its run)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/approvals/{approvalId}/approve","href":"/api-reference/agents/approve-a-pending-agent-action-and-resume-its-run"},{"title":"Reject a pending agent action (and terminate its run)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/approvals/{approvalId}/reject","href":"/api-reference/agents/reject-a-pending-agent-action-and-terminate-its-run"},{"title":"Get an approval's status (in-app card)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/ai/actions/{id}","href":"/api-reference/agents/get-an-approvals-status-in-app-card"},{"title":"Approve an action (in-app card)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/ai/actions/{id}/approve","href":"/api-reference/agents/approve-an-action-in-app-card"},{"title":"Reject an action (in-app card)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/ai/actions/{id}/reject","href":"/api-reference/agents/reject-an-action-in-app-card"}]},{"group":"OAuth","pages":[{"title":"Dynamic Client Registration (RFC 7591)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /oauth/register","href":"/api-reference/oauth/dynamic-client-registration-rfc-7591"},{"title":"Authorization endpoint","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /oauth/authorize","href":"/api-reference/oauth/authorization-endpoint"},{"title":"Consent submission","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /oauth/authorize","href":"/api-reference/oauth/consent-submission"},{"title":"Token exchange","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /oauth/token","href":"/api-reference/oauth/token-exchange"},{"title":"Token introspection (RFC 7662)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /oauth/introspect","href":"/api-reference/oauth/token-introspection-rfc-7662"},{"title":"Token revocation (RFC 7009)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /oauth/revoke","href":"/api-reference/oauth/token-revocation-rfc-7009"},{"title":"OAuth server metadata (RFC 8414)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /.well-known/oauth-authorization-server","href":"/api-reference/oauth/oauth-server-metadata-rfc-8414"},{"title":"Start device authorization (RFC 8628)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /oauth/device/code","href":"/api-reference/oauth/start-device-authorization-rfc-8628"},{"title":"Device approval page (browser)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /oauth/device","href":"/api-reference/oauth/device-approval-page-browser"},{"title":"Submit device approval","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /oauth/device","href":"/api-reference/oauth/submit-device-approval"},{"title":"List registered OAuth clients","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/oauth-clients","href":"/api-reference/oauth/list-registered-oauth-clients"},{"title":"Register an OAuth client from the dashboard","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/oauth-clients","href":"/api-reference/oauth/register-an-oauth-client-from-the-dashboard"},{"title":"Revoke an OAuth client","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json delete /api/oauth-clients/{id}","href":"/api-reference/oauth/revoke-an-oauth-client"}]},{"group":"Webhooks","pages":[{"title":"List webhook subscriptions","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/webhooks","href":"/api-reference/webhooks/list-webhook-subscriptions"},{"title":"Create webhook subscription","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/webhooks","href":"/api-reference/webhooks/create-webhook-subscription"},{"title":"Get webhook subscription with recent deliveries","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/webhooks/{id}","href":"/api-reference/webhooks/get-webhook-subscription-with-recent-deliveries"},{"title":"Delete webhook subscription","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json delete /api/webhooks/{id}","href":"/api-reference/webhooks/delete-webhook-subscription"},{"title":"Update webhook subscription","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json patch /api/webhooks/{id}","href":"/api-reference/webhooks/update-webhook-subscription"},{"title":"Send a test event to a webhook","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/webhooks/{id}/test","href":"/api-reference/webhooks/send-a-test-event-to-a-webhook"}]},{"group":"Analytics","pages":[{"title":"Usage summary statistics","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-usage/summary","href":"/api-reference/analytics/usage-summary-statistics"},{"title":"Usage timeseries","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-usage/timeseries","href":"/api-reference/analytics/usage-timeseries"},{"title":"Usage by agent client","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-usage/by-agent","href":"/api-reference/analytics/usage-by-agent-client"},{"title":"Usage by MCP tool","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-usage/by-tool","href":"/api-reference/analytics/usage-by-mcp-tool"},{"title":"Usage by API key","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-usage/by-key","href":"/api-reference/analytics/usage-by-api-key"},{"title":"Billable outcome counts","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-usage/outcomes","href":"/api-reference/analytics/billable-outcome-counts"},{"title":"Export API usage (CSV)","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /api/api-usage/export","href":"/api-reference/analytics/export-api-usage-csv"}]},{"group":"Sandbox","pages":[{"title":"Clear and re-seed a facility's sandbox data","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json post /api/sandbox/reset","href":"/api-reference/sandbox/clear-and-re-seed-a-facilitys-sandbox-data"}]},{"group":"Platform","pages":[{"title":"List available API versions","deprecated":null,"version":null,"openapi":"https://api.nexspace365.com/api/openapi.json get /.well-known/api-versions","href":"/api-reference/platform/list-available-api-versions"}]}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]}]},"basePath":"","title":"Usage Analytics - NexSpace Developer Docs","deploymentId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","buildId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BD9G1WMi.js","snippetPresets-Bcqr8I2u.js","utils-BrYn4XiY.js","style-to-object-BY3JEAdk.js","utils-CYrCnchl.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CNFO66BS.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BneVo7uA.js","_Uint8Array-n4RvRzp3.js","isObject-FP1Yky1u.js","ApiExamples-C1YMsTjy.js","usePlaygroundInputsStore-DayW4kZ9.js","shallow-DDCzdKmR.js","isEqual-CBVoazy8.js","CodeSnippets-CWandYY5.js","CodeSnippet-grFP6YU_.js","use-playground-group-access-BBqHUxQK.js","Page-DBPN_x5x.js","api-description-markdown-1J-AA_Kv.js","DynamicMarkdown-Dgh_e4rL.js","SectionHeading-BP6Np9Uh.js","MethodPill-4k_Ty_Xv.js","getPastedJson-CWUNKLcr.js","Check2Icon-Cs4FQb2J.js","axios-CsQoIw0U.js","Markdown-CR8c2fXT.js","AssistantPageLink-BBR7elHb.js","dist-DjFwSv8l.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}