Skip to content

Change the workspace's email senders

PATCH
/domains/senders
Code sample: Shell / cURL
curl --request PATCH \
--url https://example.com/api/v1/domains/senders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "channels": [ { "channel": "HELPDESK", "fromName": "example", "localPart": "example", "replyTo": "hello@example.com" } ], "senderName": "example" }'

Changes the sender name and the local part, name and Reply-To of the channels given. A field left out keeps its value and null clears it. The address must exist at the mail provider, or replies sent straight to it bounce. Audited with the actor. Requires settings.manage.

Media typeapplication/json

Change the sender name and the senders of the channels given; a field left out keeps its value and null clears it.

object
channels
Array<object>
<= 4 items
object
channel
required
string
Allowed values: HELPDESK SALES BILLING CLIENT_ACCOUNT
fromName
Any of:
string
<= 100 characters
localPart
Any of:
string
/^[a-z0-9](?:[a-z0-9._+-]{0,62}[a-z0-9])?$/
replyTo
Any of:
string format: email
<= 254 characters /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
senderName
Any of:
string
<= 100 characters

The updated email senders.

Media typeapplication/json
object
data
required

The workspace’s email senders, one per configurable channel. Team email has no channel and always goes out from the platform address.

object
channels
required
Array<object>

The sender one channel of email goes out as.

object
channel
required
string
Allowed values: HELPDESK SALES BILLING CLIENT_ACCOUNT
fromName
required

Display name of the channel; null uses the workspace’s sender name.

string | null
localPart
required

Local part of the channel’s address on the workspace’s email domain. Null sends the channel from the platform address.

string | null
replyTo
required

Where replies to the channel go.

string | null
senderName
required

The name every channel goes out under when it sets none; null uses the brand name.

string | null

Example

{
"data": {
"channels": [
{
"channel": "HELPDESK"
}
]
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.