API Reference

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.

GET
/v1/meta/account

Cost: 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

200 OK
{
  "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_idstringoptional

Unique identifier (UUID) for your organisation.

data.key_idstringoptional

Identifier of the API key used for this request.

data.namestringoptional

Human-readable label assigned to the key.

data.ip_scopedbooleanoptional

true when the key is restricted to an IP allowlist.

data.created_atstringoptional

ISO 8601 UTC timestamp of when the key was created.

data.last_used_atstring | nulloptional

ISO 8601 UTC timestamp of the most recent use of the key, or null if never used.

data.last_used_ipstring | nulloptional

Source IP of the most recent use, or null if never used.

data.expires_atstring | nulloptional

ISO 8601 UTC expiry timestamp, or null if the key does not expire.

data.revoked_atstring | nulloptional

ISO 8601 UTC revocation timestamp, or null if the key is active.

data.creditsintegeroptional

Integer count of credits remaining for your organisation.

data.generated_atstringoptional

ISO 8601 UTC timestamp indicating when this response was produced.

Errors

StatuserrorWhen
401invalid_authorizationThe Authorization header is missing or malformed.
401unauthorizedThe key is invalid, revoked, or the request IP is not on the allowlist.
404not_foundThe route or resource does not exist.
405method_not_allowedOnly GET and OPTIONS are accepted.
500internalAn unexpected server error occurred.

See Errors for the full error reference.