Admin
Info about admin(s)
Get admin info
GET
https://switchapi3.azurewebsites.net/admin
This endpoint retrieves the details of the admin currently logged in.
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token_string
Get admin by id
GET
https://switchapi3.azurewebsites.net/admin/:id
This endpoint retrieves the admin by searching with the id
Path Parameters
id
integer
admin id
Headers
SWI-CID
string
Client ID
Authorization
string
Format for the Authorization is Bearer token_string
Create admin
POST
https://switchapi3.azurewebsites.net/admin/new
This endpoint creates a new admin and sends a randomly generated password to the admin's email if creation is successful.
Headers
SWI-CS
string
Payload checksum
SWI-CID
string
Client ID
Authorization
string
Format for the Authorization is Bearer token_string
Request Body
string
admin email
role
string
Could be customer_success, banking_operations, admin or super_admin
Get admin list
GET
https://switchapi3.azurewebsites.net/admin/list
This endpoint retrieves the list of admins.
Query Parameters
search_query
string
Query used to search admin's emails
page
string
Defaults to 1
per_page
string
Defaults to 20
Headers
SWI-CID
string
Client ID
Authorization
string
Format for the Authorization is Bearer token_string
Disable admin
POST
https://switchapi3.azurewebsites.net/admin/disable/:id
This endpoint allows super-admins to disable admins.
Path Parameters
id
string
id of the admin
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token_string
Enable a disabled admin
POST
https://switchapi3.azurewebsites.net/admin/enable/:id
This endpoint allows superadmins to enable disabled admins.
Path Parameters
id
string
id of the admin
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token_string
Change Password
POST
https://switchapi3.azurewebsites.net/admin/update_password
Change admin password.
Headers
SWI-CS
string
Payload checksum
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token_string
Request Body
current_password
string
The admin's current password
password
string
The new password
password_confirmation
string
password confirmation
Reset Admin Password
POST
https://switchapi3.azurewebsites.net/admin/reset_password/:id
This endpoint allows a super admin to reset an admin's password. The new password (which is randomly generated) is then sent to the admin's email.
Path Parameters
id
string
The id of the admin whose password is to be reset
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token_string
Unlock Account
POST
https://switchapi3.azurewebsites.net/admin/unlock/:id
This endpoint allows a super admin to send an unlock email to the locked admin's email address.
Path Parameters
id
string
The id of the admin to be unlocked.
Headers
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token_string
Update Role
POST
https://switchapi3.azurewebsites.net/admin/role/:id
This endpoint allows a super admin to update the role of another admin.
Path Parameters
id
string
The id of the admin
Headers
SWI-CS
string
Payload checksum
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token.
Request Body
role
string
Any of customer_success, banking_operations, admin or super_admin
Last updated
Was this helpful?