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

Get a list of projects

List projects and their sandboxes to which the API token has access.

get
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Responses
200

Lists project attributes and inboxes of this project with their attributes.

  • permissions returns the permissions of the token for the project
application/json
idintegerOptional
namestringOptional
get/api/projects
curl -X GET https://mailtrap.io/api/projects \
  -H 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "id": 2435,
    "name": "Viewer Project",
    "sandboxes": [],
    "permissions": {
      "can_read": true,
      "can_update": false,
      "can_destroy": false,
      "can_leave": true
    }
  },
  {
    "id": 2436,
    "name": "Admin Project",
    "share_links": {
      "admin": "https://localhost/projects/2436/share/QEVuQwEAYWN-NIhmrB8qX6ZWzToqdOE9dw1ylIfOQ-_fKwYAD_CCkhRzmAanker219x25PM75TBaHgx1I4dsv058hghY_Ewaa3Vt7ET1aeg3ufVcit919V4baPLzxV9JaRzXWSjK",
      "viewer": "https://localhost/projects/2436/share/QEVuQwEAYWN-NIhmrB8qX6ZWzToqdOE9dw1ylIfOQ-_fKwYAD_CCkhRzmAanker219x25PM7YSu12_li4QtOGl363syqCpKX7vlXvIub7b_V1BU2qypVHfspL7qfSIja0edd7hSh"
    },
    "sandboxes": [
      {
        "id": 3874,
        "name": "Admin Sandbox",
        "username": "f796d276ca4d13",
        "password": "293caeb0f100e4",
        "max_size": 0,
        "status": "active",
        "email_username": "bcf11679c1-ad3171",
        "email_username_enabled": false,
        "sent_messages_count": 316,
        "forwarded_messages_count": 0,
        "used": false,
        "forward_from_email_address": "a3343-i3874@forward.mailtrap.info",
        "project_id": 2436,
        "domain": "localhost",
        "pop3_domain": "localhost",
        "email_domain": "localhost",
        "emails_count": 0,
        "emails_unread_count": 0,
        "last_message_sent_at": null,
        "smtp_ports": [
          25,
          465,
          587,
          2525
        ],
        "pop3_ports": [
          1100,
          9950
        ],
        "max_message_size": 5242880,
        "permissions": {
          "can_read": true,
          "can_update": true,
          "can_destroy": true,
          "can_leave": false
        }
      }
    ],
    "permissions": {
      "can_read": true,
      "can_update": true,
      "can_destroy": true,
      "can_leave": true
    }
  }
]

Last updated

Was this helpful?