Update sending preferences

PATCH /api/v1/settings/sending The postal address and the default sender. Admin role required. Strict PATCH semantics: a field you omit is left untouched, a field set to null is cleared and falls back. Never resend the whole object to change one field.

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
postalAddressstringnoPhysical address printed in the footer. null clears it
senderEmailstringnoPromotes or creates the default sender address — refused unless its domain is verified and proved
senderNamestringnoDisplay name of that address

Example

bash
curl -X PATCH -H "x-api-key: $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"postalAddress": "12 rue des Lilas, 59000 Lille"}' \
  "https://www.agentsmail.io/api/v1/settings/sending"

Response

  • 200 OK — the call succeeded.
  • 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

FieldTypeDescription
successbooleanIndicates if the operation was successful
data.senderEmailstring \null
data.senderNamestring \null
data.postalAddressstring \null
data.effectiveSenderstring \null

Example response

json
{
  "success": true,
  "data": {
    "senderEmail": "hello@mail.example.com",
    "senderName": "Example",
    "postalAddress": "12 rue des Lilas, 59000 Lille",
    "effectiveSender": "Example <hello@mail.example.com>"
  }
}