Create User
CreateUser creates a user. The first user of an instance becomes an admin. Otherwise, unless an admin calls it, the instance must allow user registration and password sign-up, and the new user gets the USER role.
Query Parameters
Optional. The resource ID to use for this user. If set, it must equal user.username and follow the username format. Format: ^a-zA-Z0-9?$
Optional. If set, validate the request but do not create the user.
Optional. An idempotency token. Currently ignored.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
User is an account on the instance.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/users" \ -H "Content-Type: application/json" \ -d '{ "username": "string", "role": "ROLE_UNSPECIFIED", "state": "STATE_UNSPECIFIED" }'{ "name": "string", "username": "string", "displayName": "string", "email": "string", "avatarUrl": "string", "description": "string", "password": "string", "role": "ROLE_UNSPECIFIED", "state": "STATE_UNSPECIFIED", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z"}Create Personal Access Token
CreatePersonalAccessToken creates a personal access token for a user. Only the user may call it. The token value is returned only once, in the response.
Create User Webhook
CreateUserWebhook creates a webhook for a user. Only the user may call it. The service generates a signing secret when none is given.