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 parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
user_id | string | yes |
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
Invite 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 Parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
email | string | yes | Max 191 characters, unique | |
role | string | yes | Must be the name of a role | View roles |
permissions | string[] | yes* | Must be list of permission names | *Only required if role is a Custom User . View permissions |
templates | string[] | no | Must be list of template IDs | |
domains | string[] | no | Must be list of domain IDs | |
requires_periodic_password_change | boolean | no |
Responses
Response Key | Type | Details |
---|---|---|
data | object | User 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 parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
user_id | string | yes |
JSON parameters are provided in dot notation
JSON Parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
role | string | yes | Must be the name of a role | View roles |
permissions | string[] | yes* | Must be list of permission names | *Only required if role is a Custom User . View permissions |
templates | string[] | no | Must be list of template IDs | |
domains | string[] | no | Must be list of domain IDs | |
requires_periodic_password_change | boolean | no |
Responses
Response Key | Type | Details |
---|---|---|
data | object | User 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 parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
user_id | string | yes |
Responses
Valid
Response Code: 200 OK
Error
Response Code: 404 Not Found
Get a list of invites
Retrieve information about account invited users with this GET
request:
GET https://api.mailersend.com/v1/invites
Responses
Valid
Response Code: 200 OK
Response Headers:
content-type: application/json
{
"data": [
{
"id": "dle1krod2jvn8gwm",
"email": "user@example.com",
"data": {
"domains": ["n3k6d1jrveq50x4v"],
"templates": ["0z76k5jg0o3yeg2d"]
},
"role": "Custom User",
"permissions": ["read-own-templates"],
"requires_periodic_password_change": true,
"created_at": "2024-04-25T17:09:23.000000Z",
"updated_at": "2024-04-25T17:09:23.000000Z"
}
]
}
Error
Response Code: 404 Not Found
Get a single invite
If you want to retrieve a single invite, use this GET
request:
GET https://api.mailersend.com/v1/invites/{invite_id}
Request parameters
URL parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
invite_id | string | yes |
Responses
Valid
Response Code: 200 OK
Response Headers:
content-type: application/json
{
"data": {
"id": "dle1krod2jvn8gwm",
"email": "test7@user.com",
"data": {
"domains": ["n3k6d1jrveq50x4v"],
"templates": ["0z76k5jg0o3yeg2d"]
},
"role": "Custom User",
"permissions": ["read-own-templates"],
"requires_periodic_password_change": true,
"created_at": "2024-04-25T17:09:23.000000Z",
"updated_at": "2024-04-25T17:09:23.000000Z"
}
}
Resend an invite
If you want to resend a user invite, use this POST
request:
POST https://api.mailersend.com/v1/invites/{invite_id}/resend
Request parameters
URL parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
invite_id | string | yes |
Responses
Valid
Response Code: 200 OK
Response Headers:
content-type: application/json
{
"data": {
"id": "dle1krod2jvn8gwm",
"email": "test7@user.com",
"data": {
"domains": ["n3k6d1jrveq50x4v"],
"templates": ["0z76k5jg0o3yeg2d"]
},
"role": "Custom User",
"permissions": ["read-own-templates"],
"requires_periodic_password_change": true,
"created_at": "2024-04-25T17:09:23.000000Z",
"updated_at": "2024-04-25T17:09:23.000000Z"
}
}
Error
Response Code: 404 Not Found
Cancel an invite
If you want to cancel a user invite from account, use this DELETE
request:
DELETE https://api.mailersend.com/v1/invites/{invite_id}
Request parameters
URL parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
invite_id | string | yes |
Responses
Valid
Response Code: 204 OK
Error
Response Code: 404 Not Found
Roles
Name | Description |
---|---|
Admin | Administrator has full access and can perform all actions in the account. |
Manager | Has full access, access API and billing. |
Designer | Designers can only view and create templates. |
Accountant | Can only manage payments and access invoices. |
Custom User | Select the sections of your account that the user should have access to. |
Permissions
Name | Description | Group |
---|---|---|
read-all-templates | View all templates | Templates |
read-own-templates | View specific templates | Templates |
manage-template | Manage templates | Templates |
read-filemanager | View the file manager | Templates |
manage-domain | Manage domain | Domains |
manage-inbound | Manage inbound routes | Domains |
manage-webhook | Manage webhooks | Domains |
control-sendings | Control sendings | Domains |
control-tracking-options | Control tracking option | Domains |
access-smtp-credentials | Access SMTP credentials | Domains |
view-smtp-users | View SMTP users | Domains |
manage-smtp-users | Manage SMTP users | Domains |
read-recipient | View recipients | Recipient |
read-activity | View email activity | Activity |
read-email | View email content | Activity |
read-analytics | View email analytics | Analytics |
read-sender-identities | View sender identities | Sender identities |
manage-sender-identities | Manage sender identities | Sender identities |
read-email-verification | View email verifications lists | Email verification |
manage-email-verification | Manage email verification lists | Email verification |
manage-sms | Manage numbers | SMS |
read-sms | View SMS activity | SMS |
manage-verified-recipients | Manage verified recipients | SMS |
view-sms-webhooks | View number webhooks | SMS |
manage-sms-webhooks | Manage number webhooks | SMS |
view-sms-inbound | View number inbound routes | SMS |
manage-sms-inbound | Manage number inbound routes | SMS |
update-plan | Manage plans | Plan and Billing |
manage-account | Edit account settings | Plan and Billing |
read-invoice | View invoices | Account settings |
manage-api-token | Manage API tokens | Account settings |
read-suppressions | View suppressions lists | Account settings |
manage-suppressions | Manage suppressions | Account settings |
read-ip-addresses | View IP allowlist | Account settings |
manage-ip-addresses | Manage IP allowlist | Account settings |
read-error-log | View error log | Account settings |