GET/api/safety/modeauth required
Get the send mode for a surface
Send mode is layered org → project → use case. With `useCaseId` (or `projectSlug` + `useCaseSlug`) returns the use case's mode — its own, or its project's default when it follows it. With `projectSlug` or `projectId` alone returns the project default. With neither, returns the org default: the mode new projects start in. `orgScope=1` reports the org mode for surfaces that send without a use case.
Responses
200The mode a send from this surface would use, and where it comes from.
| Field | Type | Required | Description |
|---|
| mode | string | required | ("test" | "production") |
| source | string | required | ("use_case" | "project" | "org") |
| scoped | boolean | required | |
| orgDefault | string | required | ("test" | "production") |
| projectDefault | any | required | |
| project | any | required | |
| useCase | any | required | |
| useCasesDiffering | number | optional | |
| require2faThreshold | number | required | |
| testListMaxSize | number | required | |
PUT/api/safety/modeauth required
Update a send mode
With `useCaseId`, sets that use case's own mode (`mode: null` makes it follow its project default). With `projectId`, sets the project default; `applyToUseCases` also makes every use case in the project follow it. With neither, sets the org default for new projects. Project and org writes need `safety.configure`; landing on production needs `send.production`.
Request Bodyrequired
| Field | Type | Required | Description |
|---|
| mode | any | required | |
| useCaseId | string (uuid) | optional | |
| projectId | string (uuid) | optional | |
| applyToUseCases | boolean | optional | |
Responses
200The mode the target now resolves to.
| Field | Type | Required | Description |
|---|
| mode | string | required | ("test" | "production") |
| source | string | required | ("use_case" | "project" | "org") |
| orgDefault | string | required | ("test" | "production") |
| projectDefault | string | optional | ("test" | "production") |
| useCasesReset | number | optional | |
400Invalid body: bad mode, both useCaseId and projectId, or null outside a use case
403Missing safety.configure (project/org) or send.production (going live)
404Use case or project not found in this organization
409Refused: the provider holds pending scheduled campaigns
GET/api/safety/test-listsauth required
List test email lists
Returns all test email lists for the organization. Requires safety.configure permission.
Responses
200All test email lists.
| Field | Type | Required | Description |
|---|
| lists | object[] | required | |
POST/api/safety/test-listsauth required
Create a test email list
Creates a new test email list with a name and optional email addresses. Requires safety.configure permission.
Request Bodyrequired
| Field | Type | Required | Description |
|---|
| name | string | required | |
| emails | string[] | optional | |
Responses
201The newly created test list.
| Field | Type | Required | Description |
|---|
| list | object | required | |
400Missing or invalid list name
DELETE/api/safety/test-listsauth required
Delete a test email list
Deletes a test email list by ID. Requires safety.configure permission.
Parameters
| Name | In | Type | Required | Description |
|---|
| id | query | string | required | The ID of the test list to delete. |
Responses
200Deletion confirmed.
| Field | Type | Required | Description |
|---|
| deleted | boolean | required | |