Create service user
Changed onCreates a new service user (a non-human identity owned by a team). Mirrors the GraphQL createServiceUser mutation; admin-only.
The returned User object is the newly created service user and is a regular User row — read it later via GET /users/{user_id}, delete it with DELETE /users/{user_id}, and manage its tags via the usual /users/{user_id}/tags endpoints.
Role grants are a separate concern. To grant a service user access to resources or groups, use POST /role-assignments (or the per-pair endpoints such as /resources/{id}/users/{id}). Keeping role assignments out of this request body means each grant stays independently addressable — the shape Terraform and other declarative clients prefer, with no field here that would silently drift when a grant is added or revoked through a different code path.
Automations are not configurable here either. The GraphQL mutation accepts a wide typed-union of automation configuration; that surface is intentionally omitted from this REST endpoint for the same reason. Service users created through this endpoint start with no automations.
Request
- Base URLhttps://api.opal.dev/v1
- AuthHTTP bearer
Request body
Example request
{
"name": "paladin-prod",
"owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8"
}Response
The created service user.
Example response
{
"user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac",
"email": "john.doe@company.dev",
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"position": "Engineer"
}Changes
- info
endpoint added
- info