POST
/api/users
curl \
-X POST https://lztup.toil.cc/api/users \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":42,"username":"string","avatar":"string","password":"string"}'
Request example
{
"user_id": 42,
"username": "string",
"avatar": "string",
"password": "string"
}
Request examples
{
"user_id": 42,
"username": "string",
"avatar": "string",
"password": "string"
}
Response examples (201)
{
"user_id": 42,
"username": "string",
"avatar": "string",
"role_id": 42,
"created_at": 42
}
Response examples (503)
{
"detail": "Can't connect to MySQL server on '[SERVER]'"
}
Response examples (401)
{
"detail": "Couldn't validate credentials"
}
Response examples (403)
{
"detail": "Not authenticated"
}
Response examples (422)
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}