Accounts
This endpoint returns account details for the authenticated user. If you are using Organizations and Sub-Accounts and the API token was created at the organization level, the response will include all accounts within the organization.
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Responses
200
Returns the list of accounts to which the API token has access. access_levels can return 1000 (account owner), 100 (admin), 10 (viewer).
application/json
idintegerOptional
namestringOptional
access_levelsinteger[]Optional
401
Returns unauthorized error message. Check your credentials.
application/json
get/api/accounts
curl -X GET https://mailtrap.io/api/accounts \
-H 'Authorization: Bearer YOUR_API_KEY'
[
{
"id": 26730,
"name": "James",
"access_levels": [
100
]
},
{
"id": 26731,
"name": "John",
"access_levels": [
1000
]
}
]Last updated
Was this helpful?

