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/getEndpoint
HTTP request
https://api.diffio.ai/v1/account/settings/getUse 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
| Field | Type | Required | Description |
|---|---|---|---|
apiKeyId | string | Yes | Authenticated API key id. |
account | object | Yes | Account settings object. |
account.userId | string | Yes | Firebase user id that owns the API account. |
account.billingMode | string | Yes | Billing mode stored for the account, defaults to free when unset. |
account.billingStatus | string | Yes | Billing status stored for the account, defaults to active when unset. |
account.billingPolicy | object | Yes | Billing policy object for the account. |
account.billingPolicy.type | string | Yes | Billing policy type, usually customerStripe. |
account.currency | string | Yes | Account billing currency. |
account.updatedAt | string | No | Last 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.
