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

Update project

Update project name. The project name is min 2 characters and max 100 characters long.

patch
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
project_idinteger · int64 · min: 1Required

Unique project ID

Example: 4032
Body
Responses
200

Returns updated project details

application/json
idintegerOptional
namestringOptional
patch/api/projects/{project_id}
curl -X PATCH https://mailtrap.io/api/projects/{project_id} \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "project": {
      "name": "Updated Project Name"
    }
  }'
{
  "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?