/api/apps/{app_id}/service-accountAuthenticatedCreate an app's service account
Creates the client application's service account ahead of its first client_credentials grant, so its uid can be granted permissions on resource servers up front. Idempotent: an existing service account is returned with created: false and status 200. Requires management access; hardcoded apps cannot be configured.
post_api_apps_app_id_service_accountClient 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 |
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string | |
| service_account* | AppServiceAccountSummary | null | Null until the first client_credentials grant (or explicit creation) |
| uid* | string | The service account's user id ( |
| email* | string | Synthetic, undeliverable address under the reserved |
| created_at* | number | Unix epoch milliseconds |
| disabled* | boolean | A disabled service account is refused the client_credentials grant |
| created* | boolean | False when the service account already existed |
| Property | Type | Description |
|---|---|---|
| success* | true | |
| message* | string | |
| service_account* | AppServiceAccountSummary | null | Null until the first client_credentials grant (or explicit creation) |
| uid* | string | The service account's user id ( |
| email* | string | Synthetic, undeliverable address under the reserved |
| created_at* | number | Unix epoch milliseconds |
| disabled* | boolean | A disabled service account is refused the client_credentials grant |
| created* | boolean | False when the service account already existed |
Example request
curl -X POST 'https://auth.schemavaults.com/api/apps/<app_id>/service-account' \
-b 'refresh_token_<auth_server_app_id>=<value>'