Account Status
Return the caller's credit balance and API-key metadata. This endpoint is
free: it does not charge a credit, so meta.credits.charged is always
0. Use it to confirm authentication and check your remaining balance — for
example as a health check before running a workflow.
/v1/meta/accountCost: Free — no credit charged
This endpoint takes no parameters. The server derives your organisation and key context from your bearer token automatically.
Request
curl https://api.precursorintelligence.com/functions/v1/meta/account \
-H "Authorization: Bearer $PRECURSOR_API_KEY"Response
{
"data": {
"organisation_id": "5f9c2a3b-e812-4d7a-b041-2c8d9f0a1e34",
"key_id": "a1b2c3d4e5f60718",
"name": "production-pipeline",
"ip_scoped": false,
"created_at": "2026-01-12T11:00:00.000Z",
"last_used_at": "2026-05-18T10:24:00.000Z",
"last_used_ip": "203.0.113.42",
"expires_at": null,
"revoked_at": null,
"credits": 9998,
"generated_at": "2026-05-18T10:24:31.118Z"
},
"meta": {
"request_id": "8b16efb8-9a6c-4ace-b817-11cbee626d08",
"generated_at": "2026-05-18T10:24:31.118Z",
"credits": { "charged": 0, "remaining": 9998 }
}
}Response fields
data.organisation_idstringoptionalUnique identifier (UUID) for your organisation.
data.key_idstringoptionalIdentifier of the API key used for this request.
data.namestringoptionalHuman-readable label assigned to the key.
data.ip_scopedbooleanoptionaltrue when the key is restricted to an IP allowlist.
data.created_atstringoptionalISO 8601 UTC timestamp of when the key was created.
data.last_used_atstring | nulloptionalISO 8601 UTC timestamp of the most recent use of the key, or null if
never used.
data.last_used_ipstring | nulloptionalSource IP of the most recent use, or null if never used.
data.expires_atstring | nulloptionalISO 8601 UTC expiry timestamp, or null if the key does not expire.
data.revoked_atstring | nulloptionalISO 8601 UTC revocation timestamp, or null if the key is active.
data.creditsintegeroptionalInteger count of credits remaining for your organisation.
data.generated_atstringoptionalISO 8601 UTC timestamp indicating when this response was produced.
Errors
| Status | error | When |
|---|---|---|
| 401 | invalid_authorization | The Authorization header is missing or malformed. |
| 401 | unauthorized | The key is invalid, revoked, or the request IP is not on the allowlist. |
| 404 | not_found | The route or resource does not exist. |
| 405 | method_not_allowed | Only GET and OPTIONS are accepted. |
| 500 | internal | An unexpected server error occurred. |
See Errors for the full error reference.