User

Module endpoints

GET /users

GET https://api.slyk.io/users

Returns a paginated list of users.

Name

Type

Example

approved

=

filter[approved]=true

blocked

=

filter[blocked]=false

email

=

filter[email]=foo@bar.com

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.

GET /users/:id

GET https://api.slyk.io/users/:id

Gets the user details of the given id.

{
  "data": {
    "approved": true,
    "blocked": false,
    "createdAt": "2019-07-17T11:39:26.732Z",
    "customData": {},
    "email": "waldo@fred.com",
    "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.

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.

POST /users

POST https://api.slyk.io/users

Creates an user.

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.

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.

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.

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.

Field

Type

Required

Description

password

string

true

New password. It must contain: 1 capital letter; 1 lower letter; 1 digit; at least 8 characters.

POST /users/:id/unblock

POST http://api.slyk.io/users/:id/unlock

Unblocks the user of the given id.

204 No Content

Last updated