POST /register
Users
Object
Properties marked Private
are only visible when the user is your own.
Name | Type | Description |
---|---|---|
|
|
unique identifier |
|
|
Private |
|
|
Private |
|
|
Private Used for changing email. |
|
|
Private |
|
|
Private Code to give to users to refer them. |
|
|
Sizes: |
|
|
|
|
|
{
"id": 1,
"email": "john@gmail.com",
"is_email_confirmed": false,
"new_email": "",
"is_new_email_confirmed": false,
"referral_code": "81892308alkk&As",
"avatar": {
"full_size": "https://www.image.com/1.png",
"small": "https://www.image.com/2.png"
},
"first_name": "John",
"last_name": "Smith"
}
Create (register)
Register a new user. Returns the user object.
Input
Name | Type | Description |
---|---|---|
|
|
Required |
|
|
Required |
|
|
|
|
|
|
|
|
Referral code of the person that referred the user. |
Output
{
"id": 1,
"email": "john@gmail.com",
"is_email_confirmed": false,
"new_email": "",
"is_new_email_confirmed": false,
"referral_code": "81892308alkk&As",
"avatar": {
"full_size": "https://www.image.com/1.png",
"small": "https://www.image.com/2.png"
},
"first_name": "John",
"last_name": "Smith"
}
Retrieve
Retrieve a user.
GET /users/:id
Update
Update a user.
PATCH /users/:id
PUT /users/:id
Input
Name | Type | Description |
---|---|---|
|
|
Add a referral code for the user who referred this user. Useful for social auth or if the user forgets to enter it on signup. Only usable for 24 hours after registration. |
|
|
|
|
|
|
|
|
Example: Add who the user was referred by.
{
"referred_by_code": "8AZ7Z"
}
List
List users.
GET /users
Parameters
Name | Description |
---|---|
|
A search query. |
Login
Retrieve an auth token for the specified user. See Authentication for how to use it.
POST /login
Input
Name | Type | Description |
---|---|---|
|
|
Required |
|
|
Required |
Output
{
"token": "lkja8*lkajsd*lkjas;ldkj8asd;kJASd811"
}
Social Auth (Register / Login)
Login / register using a social account. As this can be a bit complex, see the separate page on it: Social Auth
Me
Get the currently logged in user.
GET /users/me
Change Password
Change the password of the currently logged in user.
POST /users/change-password
Input
Name | Type | Description |
---|---|---|
|
|
Required |
|
|
Required |