core_users_create
POST/api/v3//core/users/
User Viewset
Request
- application/json
Body
required
username stringrequired
Possible values: non-empty
and <= 150 characters
name stringrequired
User's display name.
is_active Active (boolean)
Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
last_login date-timenullable
groups uuid[]
email email
Possible values: <= 254 characters
attributes
object
path string
Possible values: non-empty
type UserTypeEnum (string)
Possible values: [internal
, external
, service_account
, internal_service_account
]
Responses
- 201
- 400
- 403
- application/json
- Schema
- Example (from schema)
Schema
pk ID (integer)required
username stringrequired
Possible values: <= 150 characters
name stringrequired
User's display name.
is_active Active (boolean)
Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
last_login date-timenullable
is_superuser booleanrequired
groups uuid[]
groups_obj
object[]
nullable
required
email email
Possible values: <= 254 characters
avatar stringrequired
User's avatar, either a http/https URL or a data URI
attributes
object
uid stringrequired
path string
type UserTypeEnum (string)
Possible values: [internal
, external
, service_account
, internal_service_account
]
uuid uuidrequired
{
"pk": 0,
"username": "string",
"name": "string",
"is_active": true,
"last_login": "2024-09-27T14:26:18.115Z",
"is_superuser": true,
"groups": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"groups_obj": [
{
"pk": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"num_pk": 0,
"name": "string",
"is_superuser": true,
"parent": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"parent_name": "string",
"attributes": {}
}
],
"email": "[email protected]",
"avatar": "string",
"attributes": {},
"uid": "string",
"path": "string",
"type": "internal",
"uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
- application/json
- Schema
- Example (from schema)
Schema
non_field_errors string[]
code string
{
"non_field_errors": [
"string"
],
"code": "string"
}
- application/json
- Schema
- Example (from schema)
Schema
detail stringrequired
code string
{
"detail": "string",
"code": "string"
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST '/api/v3/core/users/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"username": "string",
"name": "string",
"is_active": true,
"last_login": "2024-09-27T14:26:17.884Z",
"groups": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"email": "[email protected]",
"attributes": {},
"path": "string",
"type": "internal"
}'