Skip to main content
Create an account owned by a user or an organization — see Service Accounts for what that means and the full recipe from here to a working key.

POST /users/target/:target/:target_id

Path Parameters

Request Body

type is the extension point for this endpoint, not a set of endpoints. A future kind of account is a new enum value here — never a new endpoint, and never a new path.

Response

Errors

See Permissions below for who can call this endpoint at all.

Example

owner_target_target_id is an internal index key the API happens to serialize — safe to ignore.

Identifier

target_id accepts a UUID or an alias. When target=user it also accepts me.

Permissions

Creating an account is a human act: the request fails with 403 whenever there is no human behind it at all, which is what makes the last row unconditional rather than role-dependent — a service account’s key can never satisfy it, no matter what role that key carries. An acting token does satisfy it, because it names the human who minted it; reaching the owner is then the ordinary admin access check, unchanged. See The Access Perimeter for the same rule across all ten operations it governs.