Admin/Users

User endpoints for admins.

STAGING_URL: https://switchapi3.azurewebsites.net
LIVE_URL: https://switchapi.azurewebsites.net

Get Users list

GET https://switchapi3.azurewebsites.net/admin/users

Retrieves list of users.

Query Parameters

Name
Type
Description

blacklisted

string

Filter for blacklisted users. true or false

sales_agent_referral_code

string

Referral code of a sales agent.

is_diaspora

boolean

Filter for diasporan/non-diasporan users. true or false

search_query

string

Query string to search through users by email or name

is_verified

boolean

Filter for verified/unverified users. true or false

page

string

Defaults to 1

per_page

string

Defaults to 20

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

{
    "message": "Users retrieved successfully",
    "data": [
        {
            "id": 265,
            "switch_id": 100365,
            "first_name": "Kikelomo",
            "last_name": "Ojolowo",
            "email": "kikelomo.ojolowo@yahoo.com",
            "is_verified": false,
            "phone": "+112345678904"
        },
        {
            "id": 264,
            "switch_id": 100364,
            "first_name": "Motolani",
            "last_name": "Fayomi",
            "email": "fayomitolani@gmail.com",
            "is_verified": false,
            "phone": "+112345678907"
        },
        {
            "id": 263,
            "switch_id": 100363,
            "first_name": "Oladimeji",
            "last_name": "Durosaro",
            "email": "durosarodapo@gmail.com",
            "is_verified": false,
            "phone": "+18628734567"
        },
        {
            "id": 262,
            "switch_id": 100362,
            "first_name": "omotolani",
            "last_name": "Deji-Akintola",
            "email": "stilltolani@yahoo.com",
            "is_verified": false,
            "phone": "+443467885577"
        },
        {
            "id": 261,
            "switch_id": 100361,
            "first_name": "Francis",
            "last_name": "Ezinna",
            "email": "eegbuchu@yahoo.com",
            "is_verified": false,
            "phone": "+2348034134689"
        },
        {
            "id": 260,
            "switch_id": 100360,
            "first_name": "Okikioluwa",
            "last_name": "Oyeleke",
            "email": "prosquid1@gmail.com",
            "is_verified": false,
            "phone": "234 701 3944 773"
        },
        {
            "id": 259,
            "switch_id": 100359,
            "first_name": "Mire",
            "last_name": "Wumek",
            "email": "mirewumek@email-wizard.com",
            "is_verified": false,
            "phone": "+2348071417141"
        },
        {
            "id": 258,
            "switch_id": 100358,
            "first_name": "Taga",
            "last_name": "Wila",
            "email": "tajawila@simpleemail.info",
            "is_verified": false,
            "phone": "+2348051128114"
        },
        {
            "id": 257,
            "switch_id": 100357,
            "first_name": "Peter",
            "last_name": "Ruso",
            "email": "ruso@email-server.info",
            "is_verified": false,
            "phone": "+2348051125141"
        },
        {
            "id": 256,
            "switch_id": 100356,
            "first_name": "Esther",
            "last_name": "John-Paul",
            "email": "ecnwowo@gmail.com",
            "is_verified": false,
            "phone": "+15678654213"
        },
        {
            "id": 255,
            "switch_id": 100355,
            "first_name": "Surat",
            "last_name": "Jimoh",
            "email": "jimohsurat9@gmail.com",
            "is_verified": true,
            "phone": "+12162111155"
        },
        {
            "id": 254,
            "switch_id": 100354,
            "first_name": "Esther",
            "last_name": "Nwowo",
            "email": "esther.nwowo@sterling.ng",
            "is_verified": false,
            "phone": "+447556188094"
        },
        {
            "id": 253,
            "switch_id": 100353,
            "first_name": "samsu",
            "last_name": "salsu",
            "email": "samora@cyber-host.net",
            "is_verified": false,
            "phone": "+2348021219191"
        },
        {
            "id": 252,
            "switch_id": 100352,
            "first_name": "FAITH",
            "last_name": "OYEDOKUN",
            "email": "faithoyedokun@yahoo.co.uk",
            "is_verified": false,
            "phone": "+2348087666711"
        },
        {
            "id": 251,
            "switch_id": 100351,
            "first_name": "Yuy",
            "last_name": "Yuh",
            "email": "bigiyowor@email-wizard.com",
            "is_verified": false,
            "phone": "+16045555556"
        },
        {
            "id": 250,
            "switch_id": 100350,
            "first_name": "rfrfrf",
            "last_name": "frfrf",
            "email": "zatu@business-agent.info",
            "is_verified": false,
            "phone": "+16045555555"
        },
        {
            "id": 249,
            "switch_id": 100349,
            "first_name": "Jayx",
            "last_name": "Layx",
            "email": "yohuhirovi@business-agent.info",
            "is_verified": false,
            "phone": "+2348077929193"
        },
        {
            "id": 248,
            "switch_id": 100348,
            "first_name": "Samuel",
            "last_name": "Adebayo",
            "email": "samuel.adebayo@sterling.ng",
            "is_verified": true,
            "phone": "+2347063936467"
        },
        {
            "id": 247,
            "switch_id": 100347,
            "first_name": "Adefemi",
            "last_name": "Olafisoye",
            "email": "defemiwa@yahoo.com",
            "is_verified": false,
            "phone": "+447557376898"
        },
        {
            "id": 246,
            "switch_id": 100346,
            "first_name": "Ropa",
            "last_name": "eef",
            "email": "ropapedot@acemail.info",
            "is_verified": false,
            "phone": "+2348050019001"
        }
    ],
    "meta": {
        "total": 192,
        "per_page": 20,
        "page": 1,
        "page_count": 10
    }
}

Get User info

GET https://switchapi3.azurewebsites.net/admin/users/:user_id

Retrieve user info by id.

Path Parameters

Name
Type
Description

user_id

string

The user id

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Disable User

POST https://switchapi3.azurewebsites.net/admin/users/disable/:user_id

This endpoint is for the super-admin to directly disable a user.

Path Parameters

Name
Type
Description

user_id

string

The user's id.

Headers

Name
Type
Description

SWI-CS

string

Payload checksum

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Request Body

Name
Type
Description

reason

string

The reason for disabling the user.

Enable disabled user

POST https://switchapi3.azurewebsites.net/admin/users/enable/:user_id

This endpoint is for the super-admin to directly enable a disabled user.

Path Parameters

Name
Type
Description

user_id

string

The user id

Headers

Name
Type
Description

SWI-CS

string

Payload checksum

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Request Body

Name
Type
Description

reason

string

The reason for enabling the user.

Update user's fraud status

POST https://switchapi3.azurewebsites.net/admin/users/update_fraud_status/:user_id

This endpoint updates the user's fraud status. Only for customer success and admin.

Path Parameters

Name
Type
Description

user_id

string

The id of the user

Headers

Name
Type
Description

SWI-CS

string

Payload checksum

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Request Body

Name
Type
Description

comment

string

The admin's comments.

fraud_status

string

The user's fraud status. Can be one of the following: - whitelisted - suspicious - fraudulent

Get Users with pending verification requests

GET https://switchapi3.azurewebsites.net/admin/users/pending_verification_requests

This endpoint returns the users that have pending verification requests.

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Get User's Devices

GET https://switchapi3.azurewebsites.net/admin/users/:id/devices

This endpoint returns the list of mobile devices linked to a user's account.

Path Parameters

Name
Type
Description

id

string

The user's id.

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Delete User Device

POST https://switchapi3.azurewebsites.net/admin/users/delete/:id/devices/:device_id

This endpoint unlinks a device from a user.

Path Parameters

Name
Type
Description

id

string

The user's id.

device_id

string

The id of the device

Headers

Name
Type
Description

SWI-CS

string

Payload checksum

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Reset User Password

POST https://switchapi3.azurewebsites.net/admin/users/reset_password/:id

This endpoint resets the user's password.

Path Parameters

Name
Type
Description

id

string

The user's id

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Last updated

Was this helpful?