API reference

Get account settings

Return account-level API settings for the caller. Review Diffio API behavior, response fields, setup details, and production workflows.

Return billing mode, billing status, billing policy, and currency for the API account.

POST/v1/account/settings/getPermissions: account:read

Endpoint

HTTP request

https://api.diffio.ai/v1/account/settings/get

Use POST with a JSON body.

Permissions

account:read

API keys must be active.

Authentication

Send the API key on every request using one of the supported headers.

  • Authorization: Bearer <apiKey>
  • X-Api-Key: <apiKey>
  • Xi-Api-Key: <apiKey>

Request

Send an empty JSON object. The account is inferred from the authenticated key.

This endpoint expects an empty JSON object.

cURL
curl -X POST "https://api.diffio.ai/v1/account/settings/get" \  -H "Authorization: Bearer $DIFFIO_API_KEY" \  -H "Content-Type: application/json" \  -d '{}'

Response

Returns the authenticated API key id and serialized account settings.

Response fields

FieldTypeRequiredDescription
apiKeyIdstringYesAuthenticated API key id.
accountobjectYesAccount settings object.
account.userIdstringYesFirebase user id that owns the API account.
account.billingModestringYesBilling mode stored for the account, defaults to free when unset.
account.billingStatusstringYesBilling status stored for the account, defaults to active when unset.
account.billingPolicyobjectYesBilling policy object for the account.
account.billingPolicy.typestringYesBilling policy type, usually customerStripe.
account.currencystringYesAccount billing currency.
account.updatedAtstringNoLast account update timestamp in ISO 8601 format when available.
Successful response
{  "apiKeyId": "key_123",  "account": {    "userId": "user_123",    "billingMode": "developerProgressive",    "billingStatus": "active",    "billingPolicy": {      "type": "customerStripe"    },    "currency": "usd",    "updatedAt": "2026-05-09T12:00:00Z"  }}

Return codes

  • 200Success, treated as complete.: Account settings returned.
  • 204Success, treated as empty response.: CORS preflight when method is OPTIONS.
  • 401Unauthorized, treated as auth error.: Missing API key, or invalid API key.
  • 403Forbidden, treated as permission error.: API key is not active, or missing account:read permission.
  • 405Client error, treated as fix required.: Method is not POST.
  • 500Server error, treated as retryable.: API key missing userId, or failed to initialize account settings.

Notes

  • The authenticated API key determines which account is returned.
  • When account billingPolicy is missing, the API serializes it as customerStripe.
  • Scoped keys need account:read to call this endpoint.