Update User
PATCH
/api/v1/users/{user_id}Authorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredPath parameters
user_idstringrequiredRequest body
requiredapplication/jsonnamestring | anyShow propertiesHide properties
Any of:
string
stringany
anyrolestring | anyShow propertiesHide properties
Any of:
string
stringany
anygroupsUserGroup[] | anyShow propertiesHide properties
Any of:
UserGroup[]
Array of
UserGroupstringany
anyResponses
200Successful Response
successbooleandefault: true
dataUserSchema | anyShow propertiesHide properties
Any of:
UserSchema
idstringrequiredemailstring | anyShow propertiesHide properties
Any of:
string
stringany
anynamestring | anyShow propertiesHide properties
Any of:
string
stringany
anyimage_urlstring | anyShow propertiesHide properties
Any of:
string
stringany
anyrolestringdefault: "member"
groupsstring[]created_atstring<date-time> | anyShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anyany
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X PATCH "/api/v1/users/string" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"role": "string",
"groups": [
"motion"
]
}'const response = await fetch("/api/v1/users/string", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"role": "string",
"groups": [
"motion"
]
})
});import requests
response = requests.patch(
"/api/v1/users/string",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"name": "string",
"role": "string",
"groups": [
"motion"
]
},
)Response
{
"success": true,
"data": {
"id": "string",
"email": "string",
"name": "string",
"image_url": "string",
"role": "member",
"groups": [
"string"
],
"created_at": "2019-08-24T14:15:22Z"
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}