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 organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
postalAddress | string | no | Physical address printed in the footer. null clears it |
senderEmail | string | no | Promotes or creates the default sender address — refused unless its domain is verified and proved |
senderName | string | no | Display 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;detailscarries the field-level issues.401 Unauthorized— missing or invalid key, or its owner left the organization.403 Forbidden— the key's owner is amemberof the organization, not anadmin.429 Too Many Requests— over 120 requests in a minute for this key.
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
data.senderEmail | string \ | null |
data.senderName | string \ | null |
data.postalAddress | string \ | null |
data.effectiveSender | string \ | 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>"
}
}