Add a sender address

POST /api/v1/settings/identities Adds an address to the book. Admin role required. The address must sit on a domain this organization has verified and proved — not a domain someone else verified, not one still being verified. An address on an unproven domain is exactly what a spoofing attempt looks like.

Authorization

Role in the organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERRefused — 403
A key carries the role its creator holds in this organization — never a role on AgentsMail itself. See API keys.

Request body

FieldTypeRequiredDescription
senderEmailstringyesThe address to add, on a verified domain of yours
senderNamestringnoDisplay name shown in front of it
isDefaultbooleannotrue promotes it as the address that signs

Example

bash
curl -X POST -H "x-api-key: $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"senderEmail": "news@mail.example.com", "senderName": "Example News"}' \
  "https://www.agentsmail.io/api/v1/settings/identities"

Response

  • 201 Created — the created resource.
  • 400 Bad Request — validation failed; details carries the field-level issues.
  • 401 Unauthorized — missing or invalid key, or its owner left the organization.
  • 403 Forbidden — the key's owner is a member of the organization, not an admin.
  • 429 Too Many Requests — over 120 requests in a minute for this key.

Response fields

201 with the created address.
FieldTypeDescription
successbooleanIndicates if the operation was successful
data.idstringIdentifier to pass as sendingIdentityId on a campaign
data.senderEmailstringThe address
data.senderNamestring \null
data.isDefaultbooleanWhether it signs by default
data.createdAtstringISO creation date

Example response

json
{
  "success": true,
  "data": {"id": "2ad9…", "senderEmail": "news@mail.example.com", "senderName": "Example News", "isDefault": false, "createdAt": "2026-08-23T10:22:05.000Z"}
}