Sender Identities
Get a list of sender identities
Retrieve information about sender identities with this GET
request:
GET https://api.mailersend.com/v1/identities
Request parameters
URL parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
domain_id | string | no | ||
page | int | no | ||
limit | int | no | Min: 10 , Max: 100 | Default: 25 |
Responses
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": [
{
"id": "7nxe3yjmeq28vp0k",
"email": "john@test.com",
"name": "John Doe",
"reply_to_email": null,
"reply_to_name": null,
"is_verified": false,
"resends": 0,
"add_note": false,
"personal_note": null,
"domain": {
"id": "7nxe3yjmeq28vp0k",
"name": "test.com",
"created_at": "2022-11-29T10:43:22.000000Z",
"updated_at": "2022-11-29T10:43:32.000000Z"
}
}
]
}
Error
Response Code: 404 Not Found
Get a single sender identity
If you want to retrieve a single sender identity, use this GET
request:
GET https://api.mailersend.com/v1/identities/{identity_id}
Request parameters
URL parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
identity_id | string | yes |
Responses
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": {
"id": "7nxe3yjmeq28vp0k",
"email": "john@test.com",
"name": "John Doe",
"reply_to_email": null,
"reply_to_name": null,
"is_verified": false,
"resends": 0,
"add_note": false,
"personal_note": null,
"domain": {
"id": "7nxe3yjmeq28vp0k",
"name": "test.com",
"created_at": "2022-11-29T10:43:22.000000Z",
"updated_at": "2022-11-29T10:43:32.000000Z"
}
}
}
Error
Response Code: 404 Not Found
Add a sender identity
If you want to add a new sender identity from which you can send emails without having to verify a domain, use this POST
request:
POST https://api.mailersend.com/v1/identities
Request body
{
"domain_id": "7nxe3yjmeq28vp0k",
"email": "pedro@test.com",
"name": "Pedro Doe",
"personal_note": "Hi Pedro, please confirm this email by clicking on the link below.",
"reply_to_name": "Test Doe",
"reply_to_email": "test@test.com",
"add_note": true
}
Request Parameters
JSON parameters are provided in dot notation
JSON Parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
domain_id | string | yes | ||
name | string | yes | Max 191 characters. | |
email | string | yes | Max 191 characters, unique | |
reply_to_email | string | no | ||
reply_to_name | string | no | ||
add_note | boolean | no | ||
personal_note | string | no |
Responses
Response Key | Type | Details |
---|---|---|
data | object | Identity object created. |
Valid
Response Code: 201 CREATED
Response Headers:
Content-Type: application/json
{
"data": {
"id": "7nxe3yjmeq28vp0k",
"email": "pedro@test.com",
"name": "Pedro Doe",
"reply_to_email": "test@test.com",
"reply_to_name": "Test Doe",
"is_verified": false,
"resends": 0,
"add_note": true,
"personal_note": "Hi Pedro, please confirm this email by clicking on the link below.",
"domain": {
"id": "7nxe3yjmeq28vp0k",
"name": "test.com",
"created_at": "2022-11-29T10:43:22.000000Z",
"updated_at": "2022-11-29T10:43:32.000000Z"
}
}
}
Invalid
Response Code: 422 Unprocessable Entity
See - Validation errors
Update a sender identity
If you want to update the information of an existing sender identity, use this PUT
request:
PUT https://api.mailersend.com/v1/identities/{identity_id}
Request body
{
"name": "Pedro Doe",
"personal_note": "Hi Pedro, please confirm this email by clicking on the link below.",
"reply_to_name": "Test Doe",
"reply_to_email": "test@test.com",
"add_note": true
}
Request Parameters
URL parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
identity_id | string | yes |
JSON parameters are provided in dot notation
JSON Parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
domain_id | string | no | ||
name | string | no | Max 191 characters. | |
email | string | no | Max 191 characters, unique | |
reply_to_email | string | no | Max 191 characters. | |
reply_to_name | string | no | ||
add_note | boolean | no | ||
personal_note | string | no |
Responses
Response Key | Type | Details |
---|---|---|
data | object | Identity object updated. |
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": {
"id": "7nxe3yjmeq28vp0k",
"email": "pedro@test.com",
"name": "Pedro Doe",
"reply_to_email": "test@test.com",
"reply_to_name": "Test Doe",
"is_verified": false,
"resends": 0,
"add_note": true,
"personal_note": "Hi Pedro, please confirm this email by clicking on the link below.",
"domain": {
"id": "7nxe3yjmeq28vp0k",
"name": "test.com",
"created_at": "2022-11-29T10:43:22.000000Z",
"updated_at": "2022-11-29T10:43:32.000000Z"
}
}
}
Invalid
Response Code: 422 Unprocessable Entity
See - Validation errors
Delete a sender identity
If you want to delete a sender identity, use this DELETE
request:
DELETE https://api.mailersend.com/v1/identities/{identity_id}
Request parameters
URL parameter | Type | Required | Limitations | Details |
---|---|---|---|---|
identity_id | string | yes |
Responses
Valid
Response Code: 200 OK
Error
Response Code: 404 Not Found