Users

Get a list of account users

Retrieve information about account users with this GET request:

GET https://api.mailersend.com/v1/users

Responses

Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
{
  "data": [
    {
      "id": "83gwk2j7zqz1nxyd",
      "avatar": null,
      "email": "user@example.com",
      "last_name": "User",
      "name": "User",
      "2fa": false,
      "created_at": "2024-01-18T06:59:00.000000Z",
      "updated_at": "2024-01-18T07:01:26.000000Z",
      "role": "Custom User",
      "permissions": ["read-suppressions", "read-invoice", "read-own-templates"],
      "domains": [
        {
          "id": "0z76k5jg0o3yeg2d",
          "name": "example-domain.com",
          "created_at": "2024-02-20T08:13:17.000000Z",
          "updated_at": "2024-02-20T08:13:22.000000Z"
        },
        {
          "id": "9dnxr7qvdqg6pm0e",
          "name": "another-domain.com",
          "created_at": "2024-02-20T08:47:06.000000Z",
          "updated_at": "2024-02-20T08:47:11.000000Z"
        }
      ],
      "templates": [
        {
          "id": "n3k6d1jreo50x4ve",
          "name": "Template",
          "type": "gh",
          "created_at": "2024-02-23T15:40:51.000000Z"
        }
      ]
    }
  ]
}

Error

Response Code: 404 Not Found

Get a single account user

If you want to retrieve a single account user, use this GET request:

GET https://api.mailersend.com/v1/users/{user_id}

Request parameters

URL parameterTypeRequiredLimitationsDetails
user_idstringyes

Responses

Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
{
  "data": {
    "id": "83gwk2j7zqz1nxyd",
    "avatar": null,
    "email": "user@example.com",
    "last_name": "User",
    "name": "User",
    "2fa": false,
    "created_at": "2024-01-18T06:59:00.000000Z",
    "updated_at": "2024-01-18T07:01:26.000000Z",
    "role": "Custom User",
    "permissions": ["read-suppressions", "read-invoice", "read-own-templates"],
    "domains": [
      {
        "id": "0z76k5jg0o3yeg2d",
        "name": "example-domain.com",
        "created_at": "2024-02-20T08:13:17.000000Z",
        "updated_at": "2024-02-20T08:13:22.000000Z"
      },
      {
        "id": "9dnxr7qvdqg6pm0e",
        "name": "another-domain.com",
        "created_at": "2024-02-20T08:47:06.000000Z",
        "updated_at": "2024-02-20T08:47:11.000000Z"
      }
    ],
    "templates": [
      {
        "id": "n3k6d1jreo50x4ve",
        "name": "Template",
        "type": "gh",
        "created_at": "2024-02-23T15:40:51.000000Z"
      }
    ]
  }
}

Error

Response Code: 404 Not Found

Add a user to account

If you want to add a new user to your account, use this POST request:

POST https://api.mailersend.com/v1/users

Request Parameters

JSON parameters are provided in dot notation

JSON ParameterTypeRequiredLimitationsDetails
emailstringyesMax 191 characters, unique
rolestringyesMust be the name of a roleView roles
permissionsstring[]yes*Must be list of permission names*Only required if role is a Custom User. View permissions
templatesstring[]noMust be list of template IDs
domainsstring[]noMust be list of domain IDs
requires_periodic_password_changebooleanno

Responses

Response KeyTypeDetails
dataobjectUser invite object created.

Valid

Response Code: 201 CREATED
Response Headers:
	Content-Type: application/json
{
    "data": {
      "id": "n3k6d1jrveq50x4v",
      "email": "user@example.com",
      "data": null,
      "permissions": ["manage-api-token", "read-filemanager"],
      "role":  "Custom User",
      "requires_periodic_password_change": false,
      "created_at": "2024-01-24T06:40:19.000000Z",
      "updated_at": "2024-01-24T06:40:19.000000Z"
    }
}

Invalid

Response Code: 422 Unprocessable Entity

See - Validation errors

Update account user

If you want to update the information of an existing account user, use this PUT request:

PUT https://api.mailersend.com/v1/users/{user_id}

Request Parameters

URL parameterTypeRequiredLimitationsDetails
user_idstringyes

JSON parameters are provided in dot notation

JSON ParameterTypeRequiredLimitationsDetails
rolestringyesMust be the name of a roleView roles
permissionsstring[]yes*Must be list of permission names*Only required if role is a Custom User. View permissions
templatesstring[]noMust be list of template IDs
domainsstring[]noMust be list of domain IDs
requires_periodic_password_changebooleanno

Responses

Response KeyTypeDetails
dataobjectUser object updated.

Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
{
  "data": {
    "id": "4k386zo42j07xv52",
    "avatar": null,
    "email": "user@example.com",
    "last_name": "User",
    "name": "User",
    "2fa": false,
    "created_at": "2024-01-22T09:35:04.000000Z",
    "updated_at": "2024-01-22T23:40:44.000000Z",
    "role": "Manager"
  }
}

Invalid

Response Code: 422 Unprocessable Entity

See - Validation errors

Delete a user from account

If you want to delete a user from account, use this DELETE request:

DELETE https://api.mailersend.com/v1/users/{user_id}

Request parameters

URL parameterTypeRequiredLimitationsDetails
user_idstringyes

Responses

Valid

Response Code: 200 OK

Error

Response Code: 404 Not Found

Roles

NameDescription
AdminAdministrator has full access and can perform all actions in the account.
ManagerHas full access, access API and billing.
DesignerDesigners can only view and create templates.
AccountantCan only manage payments and access invoices.
Custom UserSelect the sections of your account that the user should have access to.

Permissions

NameDescriptionGroup
read-all-templatesView all templatesTemplates
read-own-templatesView specific templatesTemplates
manage-templateManage templatesTemplates
read-filemanagerView the file managerTemplates
manage-domainManage domainDomains
manage-inboundManage inbound routesDomains
manage-webhookManage webhooksDomains
control-sendingsControl sendingsDomains
control-tracking-optionsControl tracking optionDomains
access-smtp-credentialsAccess SMTP credentialsDomains
view-smtp-usersView SMTP usersDomains
manage-smtp-usersManage SMTP usersDomains
read-recipientView recipientsRecipient
read-activityView email activityActivity
read-emailView email contentActivity
read-analyticsView email analyticsAnalytics
read-sender-identitiesView sender identitiesSender identities
manage-sender-identitiesManage sender identitiesSender identities
read-email-verificationView email verifications listsEmail verification
manage-email-verificationManage email verification listsEmail verification
manage-smsManage numbersSMS
read-smsView SMS activitySMS
manage-verified-recipientsManage verified recipientsSMS
view-sms-webhooksView number webhooksSMS
manage-sms-webhooksManage number webhooksSMS
view-sms-inboundView number inbound routesSMS
manage-sms-inboundManage number inbound routesSMS
update-planManage plansPlan and Billing
manage-accountEdit account settingsPlan and Billing
read-invoiceView invoicesAccount settings
manage-api-tokenManage API tokensAccount settings
read-suppressionsView suppressions listsAccount settings
manage-suppressionsManage suppressionsAccount settings
read-ip-addressesView IP allowlistAccount settings
manage-ip-addressesManage IP allowlistAccount settings
read-error-logView error logAccount settings
Last Updated: