Slyk
Search…
User

Module endpoints

GET /users

GET https://api.slyk.io/users
Returns a paginated list of users.
Available Filters
Available Sorts
Paginate Options
Response
Name
Type
Example
approved
=
filter[approved]=true
blocked
=
filter[blocked]=false
email
=
filter[email][email protected]
id
= in
filter[id]=in:fc78d28f-a8dd-49de-a22f-722fe3bd26c7,ba77d2f6-6a09-47ba-918c-63ef9539184f
name
like
filter[name]=foobar
phone
=
filter[phone]=+351961234567
primaryWalletId
=
filter[primaryWalletId]=d78fe2c0-7268-4796-b267-187243331efe
referralCode
=
filter[referralCode]=R12345678
referralUserId
= in
filter[referralUserId]=ba77d2f6-6a09-47ba-918c-63ef9539184f
role
=
filter[role]=user
verified
=
filter[verified]=true
The name filter performs a SQL query using the like operator.
Name
Example
createdAt
sort=createdAt sort=-createdAt
updatedAt
sort=updatedAt sort=-updatedAt
Name
Description
Example
size
Defines the number of results per page. Default = 30.
page[size]=2
number
Defines the number of the page to retrieve. Default = 1
page[number]=2
{
"data": [
{
"approved": true,
"blocked": false,
"createdAt": "2019-07-17T11:39:26.732Z",
"customData": {},
"email": "[email protected]",
"id": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
"locale": "pt",
"name": "Waldo Fred",
"phone": "+351912345678",
"primaryWalletId": "715a25e5-94d3-4142-afa9-b4b09193f618",
"referralCode": "R12345678",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-07-17T11:39:26.732Z",
"verified": true
},
{
"approved": false,
"blocked": false,
"createdAt": "2019-07-17T11:39:26.732Z",
"customData": {},
"email": "[email protected]",
"id": "8d31a884-7fa3-469a-a7cb-12f95895c487",
"locale": "en",
"name": "Corge Garply",
"phone": "+123456789",
"primaryWalletId": "f90b0f21-e0a8-43ff-81c2-da42a5a6ca6e",
"referralCode": "R87654321",
"referralUserId": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
"roles": ["user"],
"updatedAt": "2019-07-17T11:39:26.732Z",
"verified": false
}
],
"total": 2
}

GET /users/:id

GET https://api.slyk.io/users/:id
Gets the user details of the given id.
Response
{
"data": {
"approved": true,
"blocked": false,
"createdAt": "2019-07-17T11:39:26.732Z",
"customData": {},
"email": "[email protected]",
"id": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
"locale": "pt",
"name": "Waldo Fred",
"phone": "+351912345678",
"primaryWalletId": "715a25e5-94d3-4142-afa9-b4b09193f618",
"referralCode": "R12345678",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-07-17T11:39:26.732Z",
"verified": true
}
}

PATCH /users/:id

PATCH https://api.slyk.io/users/:id
Patches the user details of the given id.
Request Parameters
Request
Response
Field
Type
Required
Description
customData
string
false
Can store any additional information about the user.
locale
string
false
User locale.
name
string
false
User name.
{
"name": "Waldo G. Fred"
}
{
"data": {
"approved": true,
"blocked": false,
"createdAt": "2019-07-17T11:39:26.732Z",
"customData": {},
"email": "[email protected]",
"id": "dcdbf851-f4db-468b-9235-37ef6e6306a1",
"locale": "pt",
"name": "Waldo G. Fred",
"phone": "+351912345678",
"primaryWalletId": "715a25e5-94d3-4142-afa9-b4b09193f618",
"referralCode": "R12345678",
"referralUserId": null,
"roles": ["user"],
"updatedAt": "2019-07-17T11:39:26.732Z",
"verified": true
}
}

POST /users

POST https://api.slyk.io/users
Creates an user.
Request Parameters
Request
Response
Field
Type
Required
Description
approved
boolean
false
If provided, user is created already approved.
blocked
boolean
false
If provided, user is created as blocked.
code
string
false
Either a referralCode or an invite code.
customData
object
false
May store any additional information about the user.
email
string
true
User email.
locale
string
false
User locale.
name
string
false
User name.
password
string
true
Login password. It must contain: 1 capital letter; 1 lower letter; 1 digit; at least 8 characters.
primaryWalletId
string
false
User main wallet. Format: uuid.
verified
boolean
false
If provided, user is created already verified.
{
"email": "[email protected]",
"code": "R87654321",
"locale": "en",
"name": "Sr. Foobar",
"password": "Foobar123"
}
{
"data": {
"approved": false,
"blocked": false,
"createdAt": "2019-07-17T11:39:26.732Z",
"customData": {},
"email": "[email protected]",
"id": "689352d2-b899-4fa3-9e64-2be481545558",
"locale": "en",
"name": "Sr. Foobar",
"phone": null,
"primaryWalletId": "4b4a25b3-407b-4a08-8283-6972b0f9cf44v",
"referralCode": "R13243546",
"referralUserId": "8d31a884-7fa3-469a-a7cb-12f95895c487",
"roles": ["user"],
"updatedAt": "2019-07-17T11:39:26.732Z",
"verified": false
}
}

POST /users/:id/approve

POST https://api.slyk.io/users/:id/approve
Approves the user of the given id.
A user that is not approved is unable to login.
Response
204 No Content

POST /users/:id/block

POST https://api.slyk.io/users/:id/block
Blocks the user of the given id.
A user that is blocked is unable to login.
Response
204 No Content

POST /users/:id/change-password

POST https://api.slyk.io/users/:id/change-password
Changes the password of the user of the given id.
Request Parameters
Request
Response
Field
Type
Required
Description
password
string
true
New password. It must contain: 1 capital letter; 1 lower letter; 1 digit; at least 8 characters.
{
"password": "Foobar321"
}
204 No Content

POST /users/:id/unblock

POST http://api.slyk.io/users/:id/unlock
Unblocks the user of the given id.
Response
204 No Content
Last modified 3mo ago
Copy link
On this page
Module endpoints
GET /users
GET /users/:id
PATCH /users/:id
POST /users
POST /users/:id/approve
POST /users/:id/block
POST /users/:id/change-password
POST /users/:id/unblock