POST
/api/admin/cors-originsAdminAllow a CORS origin
operationId
addCorsOriginAdmin: CORSAuthentication & permissionsAdmin
Platform administrators only
- Accepted credentials
- Access token (Bearer)
Authorization: Bearer <JWT> - Access token (cookie)
cookie "access_token_schemavaults-mail"
- Access token (Bearer)
- Who may call
- Platform administrators only
Request body
Required
application/json
AddCorsOriginRequestBody
| Property | Type | Description |
|---|---|---|
| origin* | string | A web origin of the form scheme://host[:port] with no path or trailing slash. minLength: 1maxLength: 255 |
| description | string | Optional human-readable note about the origin. maxLength: 255 |
JSONExample
"origin""https://app.example.com"
"description""string"
Responses
application/json
| Property | Type | Description |
|---|---|---|
| success* | true | |
| data* | CorsAllowedOrigin | |
| cors_origin_id* | string (uuid) | |
| origin* | string | A web origin of the form scheme://host[:port] with no path or trailing slash. minLength: 1maxLength: 255 |
| description* | string | null | null | maxLength: 255 |
| created_at* | number | minimum: 0 |
| created_by_user_id* | string (uuid) | |
| message* | string |
JSONExample
"success"true
"data"
"cors_origin_id""123e4567-e89b-12d3-a456-426614174000"
"origin""https://app.example.com"
"description""string"
"created_at"1.5
"created_by_user_id""123e4567-e89b-12d3-a456-426614174000"
"message""string"
Example request
bashcurl
curl -X POST 'https://mail.schemavaults.com/api/admin/cors-origins' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{
"origin": "https://app.example.com",
"description": "string"
}'