This route requires the subjects:provision scope. A key carrying admin also qualifies.A missing or invalid credential returns 401 authentication_error. A valid credential without the scope returns 403 permission_denied, and the problem body names the exact scope required.
This is the provisioning call, and it is idempotent. 201 the first time, 200 afterwards, with the same body either way.
Provisioning is the privileged act, not selection. Creating a subject needs subjects:provision. Acting as one afterwards needs no extra scope: any read or write key in the organization can send X-Exo-Subject.
A subject id equal to an internal user id is refused with 409 conflict, so a developer-supplied id can never shadow a real member.