Team member

Add and remove users to and from teams.

Part of the API reference collection

This page is part of the Crunchy Bridge API reference, and primarily meant to act as an exhaustive guide for technical integrations which are already in progress. To understand the basics of using the API, see API concepts and getting started.

The TeamMember API resource

A team member.

Content type: application/json

Name Nullable Type Description
id string in EID format

Primary ID of the specific team member record.

account_id string in EID format

The ID of the account that’s a team member.

email string

The email address of the account that’s a team member.

role enum string

The role assigned to the team member.

Enum admin, manager, or member.

team_id string in EID format

The ID of the team that the team member belongs to.

Example

{
    "account_id": "qvcw4hylovgyzbwzp53bmmlhga",
    "email": "[email protected]",
    "id": "af7tzsg5nin2vrh64bburelmfi",
    "role": "member",
    "team_id": "eaevtjiudzeq7bsqbbpiscund4"
}

List team members

List users on a team.

GET /teams/{team_id}/members

Request

Path parameters

  • team_id: ID of the team for which to list members.

cURL example

curl -X GET https://api.crunchybridge.com/teams/{team_id}/members
    -H "Authorization: Bearer $CRUNCHY_ACCESS_TOKEN"

Response

Status: 200

Response for a team member list request.

Content type: application/json

Name Nullable Type Description
team_members array of object of type TeamMember

List of team members on this team.

Example

{
    "team_members": [
        {
            "account_id": "qvcw4hylovgyzbwzp53bmmlhga",
            "email": "[email protected]",
            "id": "af7tzsg5nin2vrh64bburelmfi",
            "role": "member",
            "team_id": "eaevtjiudzeq7bsqbbpiscund4"
        }
    ]
}

Create team member

Add a user to team.

POST /teams/{team_id}/members

Request

Path parameters

  • team_id: ID of the team to which the new member will be added.

Request body schema

Content type: application/json

Name Required Type Description
email string

Email is the email address of the new team member.

first_name string

First name of the new team member.

last_name string

Last name is the last name of the new team member.

role enum string

Role assigned to the new team member.

Enum admin, manager, or member.

Example request body

{
    "email": "[email protected]",
    "first_name": "Cheshire",
    "last_name": "Cat",
    "role": "member"
}

cURL example

curl -X POST https://api.crunchybridge.com/teams/{team_id}/members
    -H "Authorization: Bearer $CRUNCHY_ACCESS_TOKEN"
    -H "Content-Type: application/json"
    -d '{"email":"[email protected]","first_name":"Cheshire","last_name":"Cat","role":"member"}'

Response

Status: 201

Responds with the standard TeamMember API resource.

Get team member

Get a specific team member.

GET /teams/{team_id}/members/{account_id}

Request

Path parameters

  • account_id: ID of the account associated with the team member to retrieve.
  • team_id: ID of the team associated with the team member to retrieve.

cURL example

curl -X GET https://api.crunchybridge.com/teams/{team_id}/members/{account_id}
    -H "Authorization: Bearer $CRUNCHY_ACCESS_TOKEN"

Response

Status: 200

Responds with the standard TeamMember API resource.

Update team member

Add a team member to a team, or update a team member’s role if they’re already on the team.

PUT /teams/{team_id}/members/{account_id}

Request

Path parameters

  • account_id: ID of the account that will be added to the team or updated.
  • team_id: ID of the team to which the new member will be added or updated on.

Request body schema

Content type: application/json

Name Required Type Description
role enum string

Role assigned to the team member.

Enum admin, manager, or member.

cURL example

curl -X PUT https://api.crunchybridge.com/teams/{team_id}/members/{account_id}
    -H "Authorization: Bearer $CRUNCHY_ACCESS_TOKEN"

Response

Status: 200

Responds with the standard TeamMember API resource.

Remove team member

Remove a user from a team.

DELETE /teams/{team_id}/members/{account_id}

Request

Path parameters

  • account_id: ID of the account who will be removed from the team.
  • team_id: ID of the team from which to remove the user.

cURL example

curl -X DELETE https://api.crunchybridge.com/teams/{team_id}/members/{account_id}
    -H "Authorization: Bearer $CRUNCHY_ACCESS_TOKEN"

Response

Status: 200

Responds with the standard TeamMember API resource.