IN THIS ARTICLE:
Introduction to managing company users
If you're running an agency, you probably need to decide who and when should have the access to your client's resources.
IMPORTANT: All users in your team with admin permissions can get information about any agency client via API.
GET agency/companies/{{CID}}/users
To get a list of all users that have the access to the specific company, use the following request:
GET https://api.woodpecker.co/rest/v2/agency/companies/{{CID}}/users
where {{CID}} stands for company ID.
Sample response:
{
    "content": [ {
        "id": 1234,
        "name": "Michael Scott",
        "email": "[email protected]",
        "roles": [
            "admin"
        ],
        "guest_permissions": []
    },
    {
        "id": 1235,
        "name": "Jim Halpert",
        "email": "[email protected]",
        "roles": [
            "admin",
            "owner"
        ],
        "guest_permissions": []
    },
    {
        "id": 1236,
        "name": "Aaron Grandy",
        "email": "[email protected]",
        "roles": [
            "guest"
        ],
        "guest_permissions": [
            "mailboxes"
        ]
    }],
    {
        "id": 1237,
        "name": "Pam Beesly",
        "email": "[email protected]",
        "roles": [
            "authorized_team_member"
        ],
        "guest_permissions": []
    }],
    "pagination_data": {
        "total_elements": 89,
        "total_pages": 2,
        "current_page_number": 1,
        "page_size": 50
    }
}
Response data type:
content - JSON object, list of all users with access to the specific company.
id - number, user ID.
name - string, user name.
email - string, user email.
roles - array, list of roles assigned to the specific users. Check NOTE for more details.
pagination_data - JSON object, informations about total elements available to check, total pages etc.
Note:
Admin - set of permission that may be applied in your agency account only. Admin can get information about any agency client via API by default.
Owner - a user that can manage a given company, e.g. deactivate it, manage a user access or invite guests.
Authorized team member - a regular agency team member that has the access to the agency client's account.
Sometimes one user can have two roles: admin and owner. It means this person has the admin permissions on your main agency account and also is an owner of the given company.
POST agency/companies/{{CID}}/invite_guest
To invite guests to the specific company under your agency, use the following request:
POST https://api.woodpecker.co/rest/v2/agency/companies/{{CID}}/invite_guest
where {{CID}} stands for company ID. Remember to include the following body in your request:
{
    "guests": [ {
        "name": "Michael Scott",
        "email": "[email protected]",
        "guest_permissions": []
    },
    {
        "name": "Jimothy Halpert",
        "email": "[email protected]",
        "guest_permissions": [
            "mailboxes"
        ]
    } ]
}
You can invite up to 10 guests with one request. If you want to learn what quests can do, check this article.
Available permissions:
mailboxes - allows guests to manage email accounts.
PUT agency/companies/{{CID}}/guests/permissions
To modify guest permissions use the following request:
PUT https://api.woodpecker.co/rest/v2/agency/companies/{{CID}}/guests/permissions
where {{CID}} stands for company ID. Remember to include the following body in your request:
{
    "guests": [ {
        "id": 1234,
        "permissions": []
    },
    {
        "id": 2345,
        "permissions": [
            "mailboxes"
        ]
    } ]
}POST agency/companies/{{CID}}/invite_guest
To invite guests to Agency with a White Label add-on, use the following request:
POST https://api.woodpecker.co/rest/v2/agency/companies/{{CID}}/invite_guestwhere {{CID}} stands for company ID. Remember to include the following body in your request:
{
    "guests": [
        {
            "name": "Michael Scott",
            "email":"[email protected]",
        }
    ]
}Want to integrate with us?
If you're interested in building a native integration with Woodpecker, fill out this form and we'll get back to you.
