Retrieve the account
GET
/account
const url = 'https://api.brrndops.com/v1/account';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.brrndops.com/v1/account \ --header 'Authorization: Bearer <token>'Returns the account the API key belongs to. Handy for checking a key works.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”The account.
Media typeapplication/json
object
object
string
id
string
livemode
false for sandbox keys.
boolean
plan
string
Example
{ "object": "account", "id": "acct_3b0c…", "plan": "growth"}Missing, invalid, expired or revoked API key.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}Production key on an account without an active plan (subscription_inactive). Sandbox keys keep working.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}The key lacks the required scope (insufficient_scope), or the business isn’t verified yet (account_not_verified, production keys only).
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}