Accounts API
Account attributes
Please refer to the definition of the Account
data type in our OpenAPI documentation.
List accounts
Lists the accounts the current authenticated entity has access to.
GET /accounts
Example
curl -H 'Authorization: Bearer <token>' \
-H 'Accept: application/json' \
https://api.dnsimple.com/v2/accounts
Response
Responds with HTTP 200. Depending on how you are authenticated you will see all the accounts you have access to or the account you used to authenticate.
Example when authenticated with an Account access token
{
"data": [
{
"id": 123,
"email": "john@example.com",
"plan_identifier": "dnsimple-personal",
"created_at": "2011-09-11T17:15:58Z",
"updated_at": "2016-06-03T15:02:26Z"
}
]
}
Example when authenticated with an User access token
{
"data": [
{
"id": 123,
"email": "john@example.com",
"plan_identifier": "dnsimple-personal",
"created_at": "2011-09-11T17:15:58Z",
"updated_at": "2016-06-03T15:02:26Z"
},
{
"id": 456,
"email": "ops@company.com",
"plan_identifier": "dnsimple-professional",
"created_at": "2012-03-16T16:02:54Z",
"updated_at": "2016-06-14T11:23:16Z"
}
]
}
Errors
Responds with HTTP 401 in case of case of authentication issues.