Methods let you add employees to your organization, change their profile info and block their access to the system.
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
{ "members": [ { "id": 123456, "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "type": "user", "banned": false, "position": "developer", "skype": "john.johnson", "phone": "+71234567890" } , ... ] }
curl -X GET \ 'https://api.pyrus.com/v4/members/' \ -H 'Authorization: Bearer' \ -H 'Content-Type: application/json'
lets you add a user. This method returns the organization participant as a user.
POST https://api.pyrus.com/v4/members
{ "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "position": "developer", "department_id": 123, "skype": "john.johnson", "phone": "+71234567890" }
"id": 123456, "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "type": "user", "banned": false, "position": "developer", "skype": "john.johnson", "phone": "+71234567890" }
curl -X POST \ 'https://api.pyrus.com/v4/members/' \ -H 'Authorization: Bearer' \ -H 'Content-Type: application/json' \ -d '{ "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "position": "developer", "department_id": 123, "skype": "john.johnson", "phone_number": "+71234567890" } '
Important: to avoid misuse, to the general limits, the number of API calls by this method is additionally limited.
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}
{ "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "position": "developer", "department_id": 123, "skype": "john.johnson", "phone": "+71234567890", "banned": false }
{ "id": 123456, "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "type": "user", "banned": false, "position": "developer", "skype": "john.johnson", "phone": "+71234567890" }
curl -X PUT \ 'https://api.pyrus.com/v4/members/' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "first_name": "John", "last_name": "Johnson", "email": "ivanюivanov@company.com", "position": "developer", "department_id": 123, "skype": "john.johnson", "phone": +71234567890", "banned": false }'
Pyrus Tip: Don’t mention parameters you don’t want to change in the request, and they will stay the same.
Block user ID. This method returns the user who has been blocked from Pyrus.
DELETE: https://api.pyrus.com/v4/members/{id}
{ "id": 123456, "first_name": "John", "last_name": "Johnson", "email": "john.johnson@company.com", "type": "user", "banned": true, "position": "developer", "skype": "john.johnson", "phone": "+71234567890" }
curl -X DELETE \ 'https://api.pyrus.com/v4/members/' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json'