For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get resources

Get all resources in your account (Sandboxes, Projects, Domains, Email Campaigns, Billing and Account itself) to which the token has admin access.

get
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Responses
200

Returns the resources nested according to their hierarchy.

  • access_level in this response represents the access level of the token used to make the request.
application/json

Nested resource tree for permission management. type values include account, project, sandbox, domain, email_template_permission_scope, email_campaign_permission_scope, and others.

idintegerOptional
namestringOptional
typestringOptional
access_levelintegerOptional
get/api/permissions/resources
curl -X GET https://mailtrap.io/api/permissions/resources \
  -H 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "id": 1774100,
    "name": "Account",
    "type": "account",
    "access_level": 100,
    "resources": [
      {
        "id": 1774100,
        "name": "Templates",
        "type": "email_template_permission_scope",
        "access_level": 100,
        "resources": []
      },
      {
        "id": 2550469,
        "name": "My Project",
        "type": "project",
        "access_level": 100,
        "resources": [
          {
            "id": 4117907,
            "name": "My Sandbox",
            "type": "sandbox",
            "access_level": 100,
            "resources": []
          }
        ]
      }
    ]
  }
]

Last updated

Was this helpful?