{"revision":"0ed62d2c742f8e20","language":"en","entry":{"id":"developer-account","kind":"endpoint","group":"developer","title":"Read an API owner account","method":"GET","path":"/v1/developer/accounts/{n}","paths":[],"summary":"Read shared limits, quota balances, usage, keys and private activity.","response":"owner, suspended, limits, quota, usage, history, keys, next, audit and permissions. History covers the latest 31 days. The initial key page has at most 50 rows and the audit has at most 20.","parameters":[{"name":"n","in":"path","required":true,"description":"Permanent number of the person or organisation that owns the allowance."}],"sample":"/v1/developer/accounts/1","access":"signed","base":"directory","notes":["The owner signs with an active device key. Organisation management requires an accepted owner. Bearer API keys cannot authorise this call.","The response is private and uses Cache-Control no-store.","Management writes accept at most 8 KiB and reject unknown body fields. nonce and timestamp are the common signing fields."],"errors":["400 invalid_nonce","400 invalid_parameter","400 invalid_signature_alg","400 invalid_timestamp","401 invalid_signature","401 missing_signature","401 stale_timestamp","403 identity_banned","403 key_banned","403 key_mismatch","404 not_found","409 replayed_nonce","429 rate_limited","500 internal_error","503 busy"],"related":["api-keys"],"sections":[{"kind":"code","language":"shell","code":"curl -fsS \\\n  -H \"X-Public-Key: $PUBLIC_KEY\" -H \"X-Signature: $REQUEST_SIGNATURE\" \\\n  -H \"X-Nonce: $NONCE\" -H \"X-Timestamp: $TIMESTAMP\" \\\n  \"https://veil.rip/v1/developer/accounts/1\""}],"live":false,"responses":[{"status":200,"contentType":"application/json","description":"owner, suspended, limits, quota, usage, history, keys, next, audit and permissions. History covers the latest 31 days. The initial key page has at most 50 rows and the audit has at most 20.","fields":[{"name":"owner","type":"integer","description":"Permanent owner card number."},{"name":"suspended","type":"boolean","description":"Whether the entire API account is suspended."},{"name":"limits","type":"object","description":"requestsPerMinute, verificationPerMinute and optional dailyLimit."},{"name":"quota","type":"Quota","description":"Current shared and additional balances."},{"name":"usage","type":"Usage","description":"Current UTC-day usage."},{"name":"history","type":"array<Usage>","description":"Daily rows for the latest 31 days."},{"name":"keys","type":"array<ApiKey>","description":"First page of at most 50 key metadata rows."},{"name":"next","type":"integer | null","description":"Pass as before to the keys endpoint for older keys."},{"name":"audit","type":"AuditPage","description":"Newest private receipts, at most 20 initially."},{"name":"permissions","type":"array<string>","description":"Actions the current signed caller may perform."}]}],"responseObjects":[{"id":"api-key","title":"API key metadata","fields":[{"name":"id","type":"string","description":"Public key-management ID, not the bearer secret."},{"name":"owner","type":"integer","description":"Permanent owner card number."},{"name":"label","type":"string","description":"Integration label supplied by its owner."},{"name":"prefix","type":"string","description":"Non-secret display prefix."},{"name":"scopes","type":"array<string>","description":"read and/or verify."},{"name":"state","type":"string","description":"active, expired, suspended or revoked. Account suspension is reported separately."},{"name":"createdAt","type":"string","description":"Creation time in ISO 8601 UTC."},{"name":"expiresAt","type":"string","description":"Expiry time in ISO 8601 UTC."},{"name":"revokedAt","type":"string | null","description":"Permanent revocation time."},{"name":"suspended","type":"boolean","description":"Whether this key is suspended."},{"name":"requestsPerMinute","type":"integer | null","description":"Additional per-key cap, or null."},{"name":"lastUsedAt","type":"string | null","description":"Last admitted use, or null if never used."},{"name":"requests","type":"integer","description":"Lifetime admitted requests for this key."}],"typeName":"ApiKey"},{"id":"quota","title":"Shared and additional quotas","fields":[{"name":"requests","type":"Bucket","description":"Owner’s shared request bucket."},{"name":"verification","type":"Bucket","description":"Additional shared verification bucket. Verification consumes both buckets."},{"name":"daily","type":"Bucket | null","description":"Additional daily cap, if set."},{"name":"key","type":"Bucket | null","description":"Additional per-key cap, if set."}],"typeName":"Quota"},{"id":"bucket","title":"Quota bucket","fields":[{"name":"limit","type":"integer","description":"Bucket capacity, or the UTC-day cap for a daily bucket."},{"name":"remaining","type":"integer","description":"Whole requests currently available."},{"name":"resetAt","type":"integer","description":"Unix seconds when the bucket will be full, or the next UTC midnight for a daily cap."}],"typeName":"Bucket"},{"id":"usage","title":"UTC-day usage","fields":[{"name":"day","type":"string","description":"UTC date in YYYY-MM-DD format."},{"name":"requests","type":"integer","description":"Admitted requests during the day."},{"name":"verifications","type":"integer","description":"Admitted verifications; included in requests."},{"name":"rejected","type":"integer","description":"Rejected quota admissions during the day."}],"typeName":"Usage"},{"id":"audit-page","title":"Private receipt page","fields":[{"name":"owner","type":"integer","description":"Owner card number."},{"name":"events","type":"array<AuditEvent>","description":"Newest receipts first."},{"name":"next","type":"integer | null","description":"Pass as before to read older receipts. Null ends pagination."}],"typeName":"AuditPage"},{"id":"audit-event","title":"Private management receipt","fields":[{"name":"id","type":"integer","description":"Receipt cursor."},{"name":"owner","type":"integer","description":"Permanent owner card number."},{"name":"keyId","type":"string | null","description":"Affected key, or null for an account change."},{"name":"actor","type":"integer","description":"Card that signed the management request."},{"name":"action","type":"string","description":"Management action, such as create, revoke or account_limits."},{"name":"reason","type":"string","description":"Staff reason, or an empty string for an owner action."},{"name":"details","type":"object","description":"Action-specific metadata, including before/after values for limit changes. Never contains the bearer secret."},{"name":"proof","type":"object","description":"Exact method, path, body, public key, alg and signature of the signed request."},{"name":"createdAt","type":"string","description":"Receipt time in ISO 8601 UTC."}],"typeName":"AuditEvent"}],"errorFormat":"json","errorDetails":[{"status":400,"code":"invalid_nonce","description":"The signed-request nonce has an invalid format.","action":"Generate a fresh 16 to 128-character nonce using letters, digits, _ or -.","scope":"common"},{"status":400,"code":"invalid_parameter","description":"A path, query or body field is missing, malformed or outside its accepted range.","action":"Correct the field named in `error.message` before sending again.","scope":"endpoint"},{"status":400,"code":"invalid_signature_alg","description":"`X-Signature-Alg` is unsupported.","action":"Use a supported signing algorithm and matching key/signature encoding.","scope":"common"},{"status":400,"code":"invalid_timestamp","description":"The signed-request timestamp is not Unix milliseconds.","action":"Use an integer Unix timestamp in milliseconds and sign the corrected request.","scope":"common"},{"status":401,"code":"invalid_signature","description":"The HTTP request signature does not verify.","action":"Sign the exact method, path and body bytes, without changing them afterwards.","scope":"common"},{"status":401,"code":"missing_signature","description":"The request requires a device signature and its headers are missing or unreadable.","action":"Send `X-Public-Key`, `X-Signature` and the signed-request metadata. An API key does not replace a device signature.","scope":"common"},{"status":401,"code":"stale_timestamp","description":"The signed timestamp is outside the accepted clock window.","action":"Compare the server Date header with your clock, then generate a fresh nonce, timestamp and signature.","scope":"common"},{"status":403,"code":"identity_banned","description":"The acting identity is suspended by Veil staff.","action":"Wait for the restriction to end or ask staff to review it.","scope":"endpoint"},{"status":403,"code":"key_banned","description":"The device signing key is suspended by Veil staff.","action":"Use an authorised active key or ask staff to review the restriction.","scope":"common"},{"status":403,"code":"key_mismatch","description":"The signing key does not have authority over this card or operation.","action":"Use an active device key with the required owner or member role.","scope":"endpoint"},{"status":404,"code":"not_found","description":"The requested card, key, alias, code or resource was not found.","action":"Check the identifier. Temporary codes and previews may already have expired or been used.","scope":"endpoint"},{"status":409,"code":"replayed_nonce","description":"The signing key already used this nonce.","action":"Check whether the previous request succeeded before making a fresh signed request.","scope":"common"},{"status":429,"code":"rate_limited","description":"An anonymous, signed-request or API-key allowance was exceeded.","action":"Wait at least `Retry-After` seconds. Share a queue and retry budget across your workers.","scope":"common"},{"status":500,"code":"internal_error","description":"An unexpected server error occurred. Internal details are not returned.","action":"Retry reads with bounded backoff. Check write results before sending a new signed operation.","scope":"common"},{"status":503,"code":"busy","description":"The application has reached a temporary concurrency or database limit.","action":"Wait `Retry-After` seconds and retry with bounded backoff.","scope":"common"}],"responseHeaders":[{"name":"Content-Type","value":"application/json","description":"Use the declared media type before choosing a parser."},{"name":"Date","value":"HTTP date","description":"Server time. Compare it with your clock when signing requests."},{"name":"Cache-Control","value":"no-store","description":"Do not persist private or temporary responses in a shared cache."},{"name":"Retry-After","value":"integer seconds, on rate_limited or busy","description":"Wait at least this long before retrying. Other 429/503 codes do not necessarily include it."}],"documentationUrl":"https://veil.rip/docs/developer-account","supportsBrowserFetch":false,"browserMode":"local-or-server"}}