# Update newsletter settings

Update the workspace's default newsletter sender name and reply email address.

POST https://api.brigg.app/v1/operations/newsletters.UpdateNewsletterSettings

## Access & visibility

Allow `newsletters.UpdateNewsletterSettings` on your API key.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sender_name` | string or null | No | New sender display-name override. Omit to preserve it; null or blank clears it to the workspace default. Quotes, backslashes and line breaks are removed; the saved name is trimmed to 78 characters. |
| `reply_to` | string or null | No | Single valid reply email address. Omit to preserve it; null or blank clears the saved override. This does not change the authenticated sending domain. |

## Saved settings and suggestions are different

These are workspace sender settings. Both reading and changing them require an approved owner or administrator. sender_name and reply_to are the saved overrides; null means no override is saved. default_sender_name is the workspace name used when the sender override is absent.

suggested_reply_to is the acting member’s own email address when available. It is a form suggestion, not an automatically saved setting or proof of the effective Reply-To. To use it for future newsletters, explicitly save it with [Update newsletter settings](https://developer.brigg.app/reference/newsletters/UpdateNewsletterSettings). An unset saved Reply-To uses Brigg’s workspace-mailbox fallback at send time.

These settings do not choose recipients, send a newsletter or change the authenticated sending domain. Send a test email to inspect the actual From and Reply-To before sending a campaign.

## Response

Returns **200 OK** with a JSON body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ok` | boolean | Yes | The settings were saved. Read GetNewsletterSettings for the resulting values; no email has been sent. |

## Errors & retries

Set `BRIGG_REQUEST_ID` once for each logical action. The samples send it as `Idempotency-Key`. Reuse the same value and body on retries, including after a timeout; a missing response does not prove the action failed.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. Supply a stable Idempotency-Key containing 1–200 characters. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. Reuse the original Idempotency-Key. |
| 400 | `invalid_reply_to` | Supply a single valid email address, or null to clear the override. |

## Next steps

- [Get newsletter settings](https://developer.brigg.app/reference/newsletters/GetNewsletterSettings)
- [Send newsletter test email](https://developer.brigg.app/reference/newsletters/SendNewsletterTestEmail)

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Save a team sender

Only these settings change; no campaign is sent.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/newsletters.UpdateNewsletterSettings' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $BRIGG_REQUEST_ID" \
  --data-raw '{
  "sender_name": "Northstar team",
  "reply_to": "team@example.com"
}'
```

#### TypeScript


```typescript
const requestId = process.env.BRIGG_REQUEST_ID;
if (!requestId) throw new Error("Set BRIGG_REQUEST_ID once per action and reuse it on retries.");

const response = await fetch("https://api.brigg.app/v1/operations/newsletters.UpdateNewsletterSettings", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId, // Create once per action; reuse on retries.
  },
  body: JSON.stringify({
    "sender_name": "Northstar team",
    "reply_to": "team@example.com"
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

request_id = os.environ["BRIGG_REQUEST_ID"]  # Reuse for retries of this action.
payload = {
  "sender_name": "Northstar team",
  "reply_to": "team@example.com"
}
request = Request(
    "https://api.brigg.app/v1/operations/newsletters.UpdateNewsletterSettings",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": request_id,  # Create once per action; reuse on retries.
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "ok": true
}
```

### Clear the saved overrides

Future sends use the existing workspace defaults.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/newsletters.UpdateNewsletterSettings' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $BRIGG_REQUEST_ID" \
  --data-raw '{
  "sender_name": null,
  "reply_to": null
}'
```

#### TypeScript


```typescript
const requestId = process.env.BRIGG_REQUEST_ID;
if (!requestId) throw new Error("Set BRIGG_REQUEST_ID once per action and reuse it on retries.");

const response = await fetch("https://api.brigg.app/v1/operations/newsletters.UpdateNewsletterSettings", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId, // Create once per action; reuse on retries.
  },
  body: JSON.stringify({
    "sender_name": null,
    "reply_to": null
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

request_id = os.environ["BRIGG_REQUEST_ID"]  # Reuse for retries of this action.
payload = {
  "sender_name": None,
  "reply_to": None
}
request = Request(
    "https://api.brigg.app/v1/operations/newsletters.UpdateNewsletterSettings",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": request_id,  # Create once per action; reuse on retries.
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "ok": true
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "sender_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120,
          "description": "New sender display-name override. Omit to preserve it; null or blank clears it to the workspace default. Quotes, backslashes and line breaks are removed; the saved name is trimmed to 78 characters."
        },
        {
          "type": "null",
          "description": "New sender display-name override. Omit to preserve it; null or blank clears it to the workspace default. Quotes, backslashes and line breaks are removed; the saved name is trimmed to 78 characters."
        }
      ],
      "description": "New sender display-name override. Omit to preserve it; null or blank clears it to the workspace default. Quotes, backslashes and line breaks are removed; the saved name is trimmed to 78 characters."
    },
    "reply_to": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 254,
          "description": "Single valid reply email address. Omit to preserve it; null or blank clears the saved override. This does not change the authenticated sending domain."
        },
        {
          "type": "null",
          "description": "Single valid reply email address. Omit to preserve it; null or blank clears the saved override. This does not change the authenticated sending domain."
        }
      ],
      "description": "Single valid reply email address. Omit to preserve it; null or blank clears the saved override. This does not change the authenticated sending domain."
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sender_name": "Northstar team",
      "reply_to": "team@example.com"
    }
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "The settings were saved. Read GetNewsletterSettings for the resulting values; no email has been sent."
    }
  },
  "required": [
    "ok"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "ok": true
    }
  ]
}
```

