Members
Methods let you add employees to your organization, change their profile info and block their access to the system.
- GET/
membersGiving a list of all participants of the organization - GET/
members/ {id}Giving an employee information by ID - POST/
membersAdding users to the organization - PUT/
members/ {id}Changing user info - DELETE/
members/ {id}Blocking a user
GET /members
Gives you a list of all participants of the organization to which the user whose name is on the request belongs. This method returns a list of all organization participants.
GET https://api.pyrus.com/v4 /members
Response body
{
"members":
[
{
"id": 123456,
"first_name": "Bruce",
"last_name": "Brown",
"email": " bruce.brown@company.com",
"type": "user",
"status": "😷Got sick",
"banned": false,
"position": "developer",
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"mobile_phone": "19991234567",
"phone": "11234567890",
"location": "138 Eldridge St Apt 2F New York, UTC+5",
"personality": " Travelling and sports ",
"personnel_number":"0000-000001",
"vacation_days": "2"
},
/*...*/
]
}
curl
curl -X GET \ 'https://api.pyrus.com/v4/members/' \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'
GET /members/{id}
Gives you an employee information by ID. This method returns an organization participant with their profile details.
GET https://api.pyrus.com/v4 /members /{id}
Response body
{
"id": 664768,
"first_name": "mna",
"last_name": "nas",
"email": "test.pyrus.account@gmail.com",
"type": "user",
"external_id": "",
"status": "😷Got sick",
"banned": true,
"fired": true,
"position": "",
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"mobile_phone": "19991234567",
"phone": "11234567890",
"location": "138 Eldridge St Apt 2F New York, UTC+5",
"personality": " Travelling and sports ",
"personnel_number":"0000-000001",
"vacation_days": "2",
"rights": 0,
"login_phone": "",
"web_session_settings": {
"life_span_hours": 8760
},
"mobile_session_settings": {},
"web_session_inactive_settings": {},
"mobile_session_inactive_settings": {},
"roles": [
1731,
21572,
5741
]
}
curl
curl -X GET \
'https://api.pyrus.com/v4/members/<MEMBER_ID>' \
-H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
-H 'Content-Type: application/json'
POST /members
Lets you add a user. This method returns the organization participant as a user.
POST https://api.pyrus.com/v4 /members
Request body
{
"first_name": "Bruce",
"last_name": "Brown",
"email": "bruce.brown@company.com",
"position": "developer",
"department_id": 123,
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"mobile_phone": "19991234567",
"phone": "11234567890",
"status": "😷Got sick",
"location": "138 Eldridge St Apt 2F New York, UTC+5",
"personality": " Travelling and sports ",
"personnel_number":"0000-000001",
"vacation_days": "2"
}
Response body
{
"id": 123456,
"first_name": "Bruce",
"last_name": "Brown",
"email": "bruce.brown@company.com",
"type": "user",
"banned": false,
"position": "developer",
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"mobile_phone": "19991234567",
"phone": "11234567890",
"location": "138 Eldridge St Apt 2F New York, UTC+5",
"personality": " Travelling and sports ",
"personnel_number":"0000-000001",
"vacation_days": "2"
}
curl
curl -X POST \
'https://api.pyrus.com/v4/members/' \
-H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "Bruce",
"last_name": "Brown",
"email": "bruce.brown@company.com",
"position": "developer",
"department_id": 123,
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"phone_number": "+11235678910"
} '
Important: to avoid misuse, the number of API calls by this method is additionally limited beyond the general limits. With proper use, even the largest organizations will not exceed the allowed limits.
PUT /members/{id}
Lets you change user ID info. This method returns the user whose profile info has been changed.
PUT https://api.pyrus.com/v4 /members /{id}
Request body
{
"first_name": "Bruce",
"last_name": "Brown",
"email": "bruce.brown@company.com",
"position": "developer",
"department_id": 123,
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"mobile_phone": "19991234567",
"phone": "+11235678910",
"banned": false,
"status": "😷Got sick",
"location": "138 Eldridge St Apt 2F New York, UTC+5",
"personality": " Travelling and sports ",
"personnel_number":"0000-000001",
"vacation_days": "2"
}
Response body
{
"id": 123456,
"first_name": "Bruce",
"last_name": "Brown",
"email": "bruce.brown@company.com",
"type": "user",
"banned": false,
"position": "developer",
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"mobile_phone": "19991234567",
"phone": "+11235678910"
}
curl
curl -X PUT \
'https://api.pyrus.com/v4/members/<MEMBER_ID>' \
-H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "Bruce",
"last_name": "Brown",
"email": "bruce.brown@company.com",
"position": "developer",
"department_id": 123,
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"phone": "+11235678910",
"banned": false
}'
Pyrus Tip: Don’t mention parameters you don’t want to change in the request, and they will stay the same.
DELETE /members/{id}
Block user ID. This method returns the user who has been blocked from Pyrus.
DELETE https://api.pyrus.com/v4 /members /{id}
Response body
{
"id": 123456,
"first_name": "John",
"last_name": "Johnson",
"email": "john.johnson@company.com",
"type": "user",
"banned": true,
"position": "developer",
"messenger": {
"type": "Telegram",
"nickname": "Jester"
},
"phone": "+11235678910"
}
curl
curl -X DELETE \ 'https://api.pyrus.com/v4/members/<MEMBER_ID>' \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -H 'Content-Type: application/json'