Safety
5 endpoints
GET
/api/safety/modeauth requiredGet current send mode
Returns the current send mode settings (test or production) for the authenticated user's organization.
Responses
200Current send mode settings.
| Field | Type | Required | Description |
|---|---|---|---|
| mode | string | required | ("test" | "production") |
| require2faThreshold | number | required | |
| testListMaxSize | number | required |
401Unauthorized
500Internal server error
PUT
/api/safety/modeauth requiredUpdate send mode
Switches the organization's send mode between test and production. Switching to production requires the admin role.
Request Bodyrequired
| Field | Type | Required | Description |
|---|---|---|---|
| mode | string | required | ("test" | "production") |
Responses
200Updated send mode settings.
| Field | Type | Required | Description |
|---|---|---|---|
| mode | string | required | ("test" | "production") |
| require2faThreshold | number | required | |
| testListMaxSize | number | required |
400Invalid mode or malformed request body
401Unauthorized
403Only admins can enable production mode
500Internal server error
GET
/api/safety/test-listsauth requiredList 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 |
401Unauthorized
500Internal server error
POST
/api/safety/test-listsauth requiredCreate 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
401Unauthorized
500Internal server error
DELETE
/api/safety/test-listsauth requiredDelete 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 |
400Missing list ID
401Unauthorized
500Internal server error