POST
/api/apps/{app_id}/domainsAuthenticatedAdd a domain to an app
Registers a domain for a client application in one environment. Requires management access: platform administrators, owners / admins of the owning organization, or the owning user. The body's app_id must match the path.
operationId
post_api_apps_app_id_domainsClient applicationsAuthentication & permissionsAuthenticated
Any authenticated user
- Accepted credentials
- Auth server session (refresh token cookie)
cookie "refresh_token_<auth_server_app_id>" - Access token (cookie)
cookie "access_token_<auth_server_app_id>" - Access token (Bearer)
Authorization: Bearer <JWT>
- Auth server session (refresh token cookie)
- Who may call
- Any authenticated user
Path parameters
| Name | Type | Description |
|---|---|---|
| app_id* | string | Client application id |
Request body
Required
application/json
SchemaVaultsAppDomainRef
| Property | Type | Description |
|---|---|---|
| app_domain_ref_id* | string (uuid) | |
| app_id* | string | minLength: 2maxLength: 64pattern: ^[a-z0-9_-]*$ |
| domain* | string | maxLength: 255 |
| environment* | "development" | "staging" | "test" | "production" | |
| created_at* | number | minimum: 0 |
| hardcoded* | boolean |
JSONExample
"app_domain_ref_id""123e4567-e89b-12d3-a456-426614174000"
"app_id""string"
"domain""string"
"environment""development"
"created_at"1.5
"hardcoded"true
Responses
application/json
ResourceCreationResponse
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string | |
| resource_id* | string | Identifier of the created / affected resource |
JSONExample
"success"true
"message""string"
"resource_id""string"
Example request
bashcurl
curl -X POST 'https://auth.schemavaults.com/api/apps/<app_id>/domains' \
-b 'refresh_token_<auth_server_app_id>=<value>' \
-H 'Content-Type: application/json' \
-d '{
"app_domain_ref_id": "123e4567-e89b-12d3-a456-426614174000",
"app_id": "string",
"domain": "string",
"environment": "development",
"created_at": 1.5,
"hardcoded": true
}'