Skip to main content

User

User accounts are used to identify people. They are also used to obtain tokens to use with the Azuma API.

{
"id": "Uuid", // "ee8e77d9-290e-4bb9-84a1-c2b7efb338df"
"name": "String", // "azuma"
"created_at": "Timestamp" // "2021-03-28T14:39:40.063095Z"
}

Register User​

This route is used to create a new user and get a session token for it.

Request​

POST /user/register

{
"name": "String", // "azuma"
"password": "String" // "neo"
}

Response​

{
"token": "Uuid" // "318cd399-f47f-478f-8d09-c9c414c3750d"
}

Possible Errors​

CodeMessageDescription
409 ConflictALREADY_EXISTSThis user already exists. Are you trying to login?

Login User​

This route is used to get a session token for a user that has already been created.

Request​

POST /user/login

{
"name": "String", // "azuma"
"password": "String" // "neo"
}

Response​

{
"token": "Uuid" // "c3b6f0b1-4a81-4ec8-800e-a2ad39f4d56e"
}

Possible Errors​

CodeMessageDescription
403 ForbiddenFORBIDDENThe login credentials were incorrect.
404 Not FoundNOT_FOUNDThis user does not exist, are you trying to register?

Update User​

This route is used to update the current user.

Request​

PATCH /user/update

{
"name": "String?", // "azumax"
"password": "String?" // "neox"
}

Response​

{
"id": "Uuid", // "ee8e77d9-290e-4bb9-84a1-c2b7efb338df"
"name": "String", // "azumax"
"created_at": "Timestamp" // "2021-03-28T14:39:40.063095Z"
}

Possible Errors​

CodeMessageDescription
409 ConflictALREADY_EXISTSThis username is already taken.