Sign inGet started

Users

GET
/organizations/{organizationId}/users
Get a list of members for an organization.
查询参数
limit
integer
Limits the number of results to return.
pageToken
string
The cursor that keeps track of the current position in the results.
reverse
boolean
Reverses the order in which the results are returned.
preview
boolean
searchTerm
string
Search term used to filter organizations by name
userIds
array
List of user IDs.
email
string
Get an organization membership for this email address. Exact matching only.
status
string
Filter organization memberships by their status.
Possible values: banned, invited, active
role
array
Filter organization memberships by their role.
响应载荷
results
array of object
必填
显示子属性
results.user
object
必填
显示子属性
A user on the platform.
results.user.activeSessions
integer
必填
The number of logged in session for the user.
results.user.avatarUrl
string
URL to the user's profile picture.
results.user.badges
array of string
results.user.bio
string
The user's description
results.user.createdAt
string
必填
When the user was created.
results.user.defaultEmail
string
The default email of the user in the list of emails.
results.user.emails
array of object
必填
Email addresses associated with user.
显示子属性
results.user.emails.createdAt
string
必填
When this record was created.
results.user.emails.email
string
必填
The email address.
results.user.emails.id
string
必填
ID of the email record.
results.user.emails.passwordSet
boolean
必填
Whether there is a password set for this email address.
results.user.emails.tokenSet
boolean
必填
Whether there is a token set for this email address.
results.user.emails.updatedAt
string
When this record was last updated.
results.user.emails.userId
string
必填
ID of the user this record is associated with.
results.user.emails.verified
boolean
必填
Whether the email address is verified.
results.user.id
string
必填
ID of the user
results.user.identities
array of object
Third-party identities associated with user.
显示子属性
results.user.identities.avatarUrl
string
The avatar URL of the user on the third-party provider.
results.user.identities.createdAt
string
Timestamp when the identity was created.
results.user.identities.email
string
The email of the user on the third-party provider.
results.user.identities.id
string
The ID of the user on the third-party provider.
results.user.identities.name
string
The name of the user on the third-party provider.
results.user.identities.provider
string
The name of the provider
results.user.identities.updatedAt
string
Timestamp when the identity was last updated.
results.user.locale
string
results.user.name
string
必填
The display name for the user
results.user.phoneNumber
string
results.user.phoneNumbers
array of object
必填
The phone numbers associated with the user.
显示子属性
results.user.phoneNumbers.createdAt
string
必填
results.user.phoneNumbers.id
string
必填
results.user.phoneNumbers.phoneNumber
string
必填
results.user.phoneNumbers.primary
boolean
必填
results.user.phoneNumbers.updatedAt
string
必填
results.user.phoneNumbers.userId
string
必填
results.user.phoneNumbers.verified
boolean
必填
results.user.status
string
必填
The status of the user
Possible values: pending, active, deleted, invited, banned
results.user.timezone
string
The default timezone for the user.
results.user.updatedAt
string
必填
When the user was last updated.
results.user.userFraudInformation
object
显示子属性
results.user.userFraudInformation.score
number
Fraud score
results.user.userFraudInformation.userId
string
Fraud user id
results.status
string
必填
The status of user's membership on the organization.
Possible values: banned, invited, active
results.createdAt
string
必填
When the membership was created.
results.updatedAt
string
必填
When the membership was last updated.
results.attributes
object
Authorization context for the membership.
results.roleIds
array of string
IDs of IAM roles assigned to the user.
results.roleRefs
array of object
The list of roles to assign to the membership
显示子属性
results.roleRefs.id
string
必填
results.roleRefs.type
string
必填
Possible values: organization, managed
results.roleRefs.workspaces
array of string
nextPageToken
string
The token to fetch the next page of results. If empty, there are no more results to fetch.
代码示例
curl -X GET 'https://api.bird.com/organizations/{organizationId}/users' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
POST
/organizations/{organizationId}/users
Add a user to an organization. This can either be an existing user, or a new user that is invited to the platform.
请求载荷
Add an existing user to the organization
userId
string
必填
The user ID
roleRefs
array of object
The list of roles to assign to the membership
显示子参数
roleRefs.id
string
必填
roleRefs.type
string
必填
Possible values: organization, managed
roleRefs.workspaces
array of string
roleIds
array of string
The list of Role IDs to assign to the user
attributes
object
Structured attributes for organization user membership (preferred method)
显示子参数
attributes.roles
array of string
List of role slugs (consistent with workspace users)
代码示例
curl -X POST 'https://api.bird.com/organizations/{organizationId}/users' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
GET
/organizations/{organizationId}/users/{userId}
Get a single organization membership record.
查询参数
preview
boolean
响应载荷
user
object
必填
显示子属性
A user on the platform.
user.activeSessions
integer
必填
The number of logged in session for the user.
user.avatarUrl
string
URL to the user's profile picture.
user.badges
array of string
user.bio
string
The user's description
user.createdAt
string
必填
When the user was created.
user.defaultEmail
string
The default email of the user in the list of emails.
user.emails
array of object
必填
Email addresses associated with user.
显示子属性
user.emails.createdAt
string
必填
When this record was created.
user.emails.email
string
必填
The email address.
user.emails.id
string
必填
ID of the email record.
user.emails.passwordSet
boolean
必填
Whether there is a password set for this email address.
user.emails.tokenSet
boolean
必填
Whether there is a token set for this email address.
user.emails.updatedAt
string
When this record was last updated.
user.emails.userId
string
必填
ID of the user this record is associated with.
user.emails.verified
boolean
必填
Whether the email address is verified.
user.id
string
必填
ID of the user
user.identities
array of object
Third-party identities associated with user.
显示子属性
user.identities.avatarUrl
string
The avatar URL of the user on the third-party provider.
user.identities.createdAt
string
Timestamp when the identity was created.
user.identities.email
string
The email of the user on the third-party provider.
user.identities.id
string
The ID of the user on the third-party provider.
user.identities.name
string
The name of the user on the third-party provider.
user.identities.provider
string
The name of the provider
user.identities.updatedAt
string
Timestamp when the identity was last updated.
user.locale
string
user.name
string
必填
The display name for the user
user.phoneNumber
string
user.phoneNumbers
array of object
必填
The phone numbers associated with the user.
显示子属性
user.phoneNumbers.createdAt
string
必填
user.phoneNumbers.id
string
必填
user.phoneNumbers.phoneNumber
string
必填
user.phoneNumbers.primary
boolean
必填
user.phoneNumbers.updatedAt
string
必填
user.phoneNumbers.userId
string
必填
user.phoneNumbers.verified
boolean
必填
user.status
string
必填
The status of the user
Possible values: pending, active, deleted, invited, banned
user.timezone
string
The default timezone for the user.
user.updatedAt
string
必填
When the user was last updated.
user.userFraudInformation
object
显示子属性
user.userFraudInformation.score
number
Fraud score
user.userFraudInformation.userId
string
Fraud user id
status
string
必填
The status of user's membership on the organization.
Possible values: banned, invited, active
createdAt
string
必填
When the membership was created.
updatedAt
string
必填
When the membership was last updated.
roleIds
array of string
IDs of IAM roles assigned to the user.
roleRefs
array of object
The list of roles to assign to the membership
显示子属性
roleRefs.id
string
必填
roleRefs.type
string
必填
Possible values: organization, managed
roleRefs.workspaces
array of string
teamRoles
array of object
The list of roles inherited from teams
显示子属性
teamRoles.id
string
必填
teamRoles.name
string
必填
teamRoles.roleRefs
array of object
The list of roles assigned to the team
显示子属性
teamRoles.roleRefs.id
string
必填
teamRoles.roleRefs.type
string
必填
Possible values: organization, managed
teamRoles.roleRefs.workspaces
array of string
attributes
object
Additional attributes for the membership
代码示例
curl -X GET 'https://api.bird.com/organizations/{organizationId}/users/{userId}' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
DELETE
/organizations/{organizationId}/users/{userId}
Remove a user from the organization
代码示例
curl -X DELETE 'https://api.bird.com/organizations/{organizationId}/users/{userId}' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'
PATCH
/organizations/{organizationId}/users/{userId}
Update the properties of the organization membership for the user.
请求载荷
roleRefs
array of object
The list of roles to assign to the membership (legacy, use attributes instead)
显示子参数
roleRefs.id
string
必填
roleRefs.type
string
必填
Possible values: organization, managed
roleRefs.workspaces
array of string
roleIds
array of string
Roles to assign to the user (legacy, use attributes instead)
attributes
object
Structured attributes for organization user membership (preferred method)
显示子参数
attributes.roles
array of string
List of role slugs (consistent with workspace users)
roleTreatment
string
Used to allow removing the legacy roles for the user
响应载荷
user
object
必填
显示子属性
A user on the platform.
user.activeSessions
integer
必填
The number of logged in session for the user.
user.avatarUrl
string
URL to the user's profile picture.
user.badges
array of string
user.bio
string
The user's description
user.createdAt
string
必填
When the user was created.
user.defaultEmail
string
The default email of the user in the list of emails.
user.emails
array of object
必填
Email addresses associated with user.
显示子属性
user.emails.createdAt
string
必填
When this record was created.
user.emails.email
string
必填
The email address.
user.emails.id
string
必填
ID of the email record.
user.emails.passwordSet
boolean
必填
Whether there is a password set for this email address.
user.emails.tokenSet
boolean
必填
Whether there is a token set for this email address.
user.emails.updatedAt
string
When this record was last updated.
user.emails.userId
string
必填
ID of the user this record is associated with.
user.emails.verified
boolean
必填
Whether the email address is verified.
user.id
string
必填
ID of the user
user.identities
array of object
Third-party identities associated with user.
显示子属性
user.identities.avatarUrl
string
The avatar URL of the user on the third-party provider.
user.identities.createdAt
string
Timestamp when the identity was created.
user.identities.email
string
The email of the user on the third-party provider.
user.identities.id
string
The ID of the user on the third-party provider.
user.identities.name
string
The name of the user on the third-party provider.
user.identities.provider
string
The name of the provider
user.identities.updatedAt
string
Timestamp when the identity was last updated.
user.locale
string
user.name
string
必填
The display name for the user
user.phoneNumber
string
user.phoneNumbers
array of object
必填
The phone numbers associated with the user.
显示子属性
user.phoneNumbers.createdAt
string
必填
user.phoneNumbers.id
string
必填
user.phoneNumbers.phoneNumber
string
必填
user.phoneNumbers.primary
boolean
必填
user.phoneNumbers.updatedAt
string
必填
user.phoneNumbers.userId
string
必填
user.phoneNumbers.verified
boolean
必填
user.status
string
必填
The status of the user
Possible values: pending, active, deleted, invited, banned
user.timezone
string
The default timezone for the user.
user.updatedAt
string
必填
When the user was last updated.
user.userFraudInformation
object
显示子属性
user.userFraudInformation.score
number
Fraud score
user.userFraudInformation.userId
string
Fraud user id
status
string
必填
The status of user's membership on the organization.
Possible values: banned, invited, active
createdAt
string
必填
When the membership was created.
updatedAt
string
必填
When the membership was last updated.
attributes
object
Authorization context for the membership.
roleIds
array of string
IDs of IAM roles assigned to the user.
roleRefs
array of object
The list of roles to assign to the membership
显示子属性
roleRefs.id
string
必填
roleRefs.type
string
必填
Possible values: organization, managed
roleRefs.workspaces
array of string
代码示例
curl -X PATCH 'https://api.bird.com/organizations/{organizationId}/users/{userId}' \
  -H 'Authorization: AccessKey YOUR_ACCESS_KEY'