curl -H "X-API-Key: $PARTICLE_API_KEY" \
"https://api.particle.pro/v1/me/usage?period=current"{
"api_key": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"key_prefix": "<string>",
"name": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
},
"billable_requests": 123,
"endpoints": [
{
"billable_requests": 123,
"endpoint": "<string>",
"errors": 123,
"method": "<string>",
"requests": 123,
"mcp_tool": "<string>"
}
],
"endpoints_truncated": true,
"errors": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"name": "current",
"source": "billing_period",
"start": "2023-11-07T05:31:56Z",
"counts_since": "2023-11-07T05:31:56Z"
},
"requests": 123,
"totals_partial": true
}{
"detail": "Property foo is required but is missing.",
"error_code": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"resolve": {
"message": "<string>",
"action": "<string>",
"endpoint": "<string>",
"method": "<string>",
"url": "<string>"
},
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get your API key's usage
Returns the requests this API key made in the current billing period (or today), broken down by endpoint and MCP tool, with how many bill per call. Free. Counts come from the request log, which keeps 90 days. MCP calls made through an OAuth grant are not attributed to any key.
curl -H "X-API-Key: $PARTICLE_API_KEY" \
"https://api.particle.pro/v1/me/usage?period=current"{
"api_key": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"key_prefix": "<string>",
"name": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
},
"billable_requests": 123,
"endpoints": [
{
"billable_requests": 123,
"endpoint": "<string>",
"errors": 123,
"method": "<string>",
"requests": 123,
"mcp_tool": "<string>"
}
],
"endpoints_truncated": true,
"errors": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"name": "current",
"source": "billing_period",
"start": "2023-11-07T05:31:56Z",
"counts_since": "2023-11-07T05:31:56Z"
},
"requests": 123,
"totals_partial": true
}{
"detail": "Property foo is required but is missing.",
"error_code": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"resolve": {
"message": "<string>",
"action": "<string>",
"endpoint": "<string>",
"method": "<string>",
"url": "<string>"
},
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
Pass your API key in the X-API-Key header (recommended).
Query Parameters
current: the organization's billing period (the UTC calendar month without a subscription). today: the current UTC day.
current, today Response
OK
The key the request authenticated with. Only its prefix is returned, never the full key.
Show child attributes
Show child attributes
Requests this key made that bill per call: successful calls to priced endpoints, and calls to paid MCP tools, which are metered when the call starts and so count even when the tool then fails or is denied. Free endpoints such as /v1/me are never counted, nor are endpoints and MCP tools billed through plan features rather than per call (alerts, the episode archive and stream), nor a retried write answered from its first response under an Idempotency-Key.
Usage by endpoint and MCP tool, busiest first, at most 100 rows.
Show child attributes
Show child attributes
True when the key called more endpoints than endpoints lists. The totals above still cover all of them unless totals_partial is set.
Requests that returned an HTTP status of 400 or above.
The window the usage covers.
Show child attributes
Show child attributes
Requests this key made in the period, including failed and free ones.
True in the rare case a key called more distinct endpoints, tools and unrouted paths than one report reads (5,000). requests still counts every request, but billable_requests and errors then cover only the busiest 5,000 of them.
Was this page helpful?