SMTP Users

Get a list of SMTP users

Retrieve information about account SMTP users with this GET request:

GET https://api.mailersend.com/v1/domains/{domain_id}/smtp-users

Request parameters

URL parameterTypeRequiredLimitationsDetails
domain_idstringyes
Query ParameterTypeRequiredLimitationsDetails
limitintnoMin: 10, Max: 100Default: 25

Responses

Valid

Response Code: 200 OK
Response Headers:
	content-type: application/json
{
  "data": [
    {
      "id": "0wkg2zj19ovx5py7",
      "name": "Support SMTP",
      "username": "MS_bGQ0nV@mailerlite.com",
      "password": "W3XCfDM6NWs69puR",
      "enabled": true,
      "accessed_at": null,
      "server": "127.0.0.1",
      "port": 465,
      "domain_id": "7nxe3yjmeq28vp0k",
    }
  ]
}

Error

Response Code: 404 Not Found

Get a single SMTP user

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

GET https://api.mailersend.com/v1/domains/{domain_id}/smtp-users/{smtp_user_id}

Request parameters

URL parameterTypeRequiredLimitationsDetails
domain_idstringyes
smtp_user_idstringyes

Responses

Valid

Response Code: 200 OK
Response Headers:
	content-type: application/json
{
  "data": {
    "id": "0wkg2zj19ovx5py7",
    "name": "Support SMTP",
    "username": "MS_bGQ0nV@mailerlite.com",
    "password": "W3XCfDM6NWs69puR",
    "enabled": true,
    "accessed_at": null,
    "server": "127.0.0.1",
    "port": 465,
    "domain_id": "7nxe3yjmeq28vp0k"
  }
}

Error

Response Code: 404 Not Found

Add SMTP user

If you want to add a SMTP user to your domain, use this POST request:

POST https://api.mailersend.com/v1/domains/{domain_id}/smtp-users

Request parameters

URL parameterTypeRequiredLimitationsDetails
domain_idstringyes

Request Parameters

JSON parameters are provided in dot notation

JSON ParameterTypeRequiredLimitationsDetails
namestringyesMax 50 characters
enabledbooleanno

Responses

Response KeyTypeDetails
dataobjectSMTP user object created.

Valid

Response Code: 201 CREATED
Response Headers:
	content-type: application/json
{
  "data": {
    "id": "480xl1qpeorzeg65",
    "name": "Support",
    "username": "MS_8PerdM@mailerlite.com",
    "password": "87GoZePLsPEKiGZR",
    "enabled": true,
    "accessed_at": null,
    "server": "127.0.0.1",
    "port": 465,
    "domain_id": "7nxe3yjmeq28vp0k"
  }
}

Invalid

Response Code: 422 Unprocessable Entity

See - Validation errors

Update SMTP user

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

PUT https://api.mailersend.com/v1/domains/{domain_id}/smtp-users/{smtp_user_id}

Request Parameters

URL parameterTypeRequiredLimitationsDetails
domain_idstringyes
smtp_user_idstringyes

JSON parameters are provided in dot notation

JSON ParameterTypeRequiredLimitationsDetails
namestringyesMax 50 characters
enabledbooleanno

Responses

Response KeyTypeDetails
dataobjectSMTP user object updated.

Valid

Response Code: 200 OK
Response Headers:
	content-type: application/json
{
  "data": {
    "id": "0z76k5jg0o3yeg2d",
    "name": "Support SMTP",
    "username": "MS_9sjABw@testing.com",
    "password": "ByeSJgB7Wc6tTm4a",
    "enabled": false,
    "accessed_at": null,
    "server": "127.0.0.1",
    "port": 465,
    "domain_id": "04mknvjymj87xp62"
  }
}

Invalid

Response Code: 422 Unprocessable Entity

See - Validation errors

Delete SMTP user

If you want to remove SMTP user, use this DELETE request:

DELETE https://api.mailersend.com/v1/domains/{domain_id}/smtp-users/{smtp_user_id}

Request parameters

URL parameterTypeRequiredLimitationsDetails
domain_idstringyes
smtp_user_idstringyes

Responses

Valid

Response Code: 204 OK

Error

Response Code: 404 Not Found
Last Updated: