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. This may be |
account | object of type AccountTeamMember object | Properties of the account associated with the team member. May be | |
role | ✔ | enum string | The role assigned to the team member. Enum |
team_id | string in EID format | The ID of the team that the team member belongs to. | |
account_id | ✔ | string in EID format | The ID of the account that's a team member. May be Deprecated Prefer the use of |
email | string | The email address of the account that's a team member. Deprecated Prefer the use of | |
name | ✔ | string | Full name associated with the team member account. May be Deprecated Prefer the use of |
Example
{
"account": {
"email": "[email protected]",
"has_password": true,
"has_sso": false,
"id": "qvcw4hylovgyzbwzp53bmmlhga",
"multi_factor_enabled": true,
"name": "Cheshire Cat"
},
"account_id": "qvcw4hylovgyzbwzp53bmmlhga",
"email": "[email protected]",
"id": "agjjwkkw56toyhxu7xw3nt56ti",
"name": "Cheshire Cat",
"role": "member",
"team_id": "eaevtjiudzeq7bsqbbpiscund4"
}
The AccountTeamMember
object
A smaller, constrained set of an account's properties suitable for returning in a list of team accounts.
Name | Nullable | Type | Description |
---|---|---|---|
id | string in EID format | Primary ID of the account. | |
email | string | Email associated with the account. | |
has_password | boolean | Indicates that the account has a password set, as opposed to being SSO-only with no usable password. It's possible for an account to have both a password and a federated identity through a provider like Google or Microsoft. | |
has_sso | boolean | Indicates that the account has a federated identity for single sign-on through an identity provider like Google or Microsoft. | |
multi_factor_enabled | boolean | Whether the account has at least one activated multi-factor source. | |
name | string | Full name associated with the account. |
List team members
List members on a team.
This endpoint's pagination may be ordered through the order_field
parameter
by id
and email
.
GET /teams/{team_id}/members
Request
Path parameters
team_id
: ID of the team for which to list members.
Query parameters
Name | Required | Type | Description |
---|---|---|---|
cursor | string | Return only items starting after this cursor ID. When paginating, pass the value of Cursor values depend on the field in | |
limit | integer | The maximum number of items to return on the page. Defaults to | |
order | string | The order of pagination. Enum | |
order_field | string | The name of the field on which to paginate like |
cURL example
curl -X GET https://api.crunchybridge.com/teams/{team_id}/members
-H "Authorization: Bearer $CRUNCHY_API_KEY"
Response
Status: 200
Response for a team member list request.
Content type: application/json
Name | Nullable | Type | Description |
---|---|---|---|
has_more | boolean | Indicates whether or not there are more resources to page through in the collection. | |
next_cursor | ✔ | string | A cursor value to pass to the endpoint to get the next page. |
team_members | array of array | List of team members on this team. |
Example
{
"has_more": false,
"next_cursor": null,
"team_members": [
{
"account": {
"email": "[email protected]",
"has_password": true,
"has_sso": false,
"id": "qvcw4hylovgyzbwzp53bmmlhga",
"multi_factor_enabled": true,
"name": "Cheshire Cat"
},
"account_id": "qvcw4hylovgyzbwzp53bmmlhga",
"email": "[email protected]",
"id": "agjjwkkw56toyhxu7xw3nt56ti",
"name": "Cheshire Cat",
"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 |
---|---|---|---|
access_group_id | string in EID format | ID of the access group which the new team member should be assigned to. Should be left blank in the case where the caller is trying to automatically join a team (i.e. | |
email | string | Email is the email address of the new team member. If left empty and the account is authenticated with SSO (single sign-on) with the right identity provider and domain, a new team member for the authenticated account is created if the team is configured to allow it. | |
role | enum string | Role assigned to the new team member. Should be left blank in the case where the caller is trying to automatically join a team (i.e. Deprecated: This property is still supported, but Enum |
Example request body
{
"access_group_id": null,
"email": "[email protected]",
"role": "member"
}
cURL example
curl -X POST https://api.crunchybridge.com/teams/{team_id}/members
-H "Authorization: Bearer $CRUNCHY_API_KEY"
-H "Content-Type: application/json"
-d '{"access_group_id":null,"email":"[email protected]","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_API_KEY"
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 |
cURL example
curl -X PUT https://api.crunchybridge.com/teams/{team_id}/members/{account_id}
-H "Authorization: Bearer $CRUNCHY_API_KEY"
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_API_KEY"
Response
Status: 200
Responds with the standard TeamMember
API resource.