The identifier of the organization.
Update a member
PATCH
/admin/v1/organizations/{organizationId}/members/{userId}Updates specified organization member.
query parameters
Returns
The user.
The connected accounts.
The tenant connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The payment methods for connections that support it.
The last payment error.
This will be unset if the payment method is updated or if a payment succeeds.
Card payment method (e.g. Visa credit card).
The user's default active individual subscription.
See memberships for organization subscription and seat information.
The plan.
The user's organization memberships.
The organization.
The connected accounts.
The tenant connection.
The delegated connection.
The Amazon Cognito connection data.
The Auth0 connection data.
The Google Cloud Identity Platform (Firebase Auth) connection.
The Postmark configuration data.
The from email address.
The Postmark account must be allowed to send from this email address.
The email address (e.g.
[email protected]
).The reply to email address.
The email address (e.g.
[email protected]
).The webhooks configuration data.
The payment methods for connections that support it.
The last payment error.
This will be unset if the payment method is updated or if a payment succeeds.
Card payment method (e.g. Visa credit card).
The organization's default active subscription.
The plan.
The user's role within the organization.
The seat associated with the membership.
This will be absent if there is no active default subscription for the organization or the user has not been assigned a seat.
The user's role within the organization.
The seat associated with the member.
This will be absent if there is no active subscription for the organization or the user has not been assigned a seat.
curl https://api.userhub.com/admin/v1/organizations/org_28seyVGVL1got6/members/usr_MKFxzgJaAH8JQ4 \
-H "Authorization: Bearer $USERHUB_ADMIN_KEY" \
-X PATCH \
--json '{
"roleId": "admin"
}'
const res = await adminApi.organizations.updateMember(
"org_28seyVGVL1got6",
"usr_MKFxzgJaAH8JQ4",
{
roleId: "admin",
},
);
res, err := adminApi.Organizations().UpdateMember(
context.Background(),
"org_28seyVGVL1got6",
"usr_MKFxzgJaAH8JQ4",
&adminapi.OrganizationUpdateMemberInput{
RoleId: "admin",
},
)
$res = $adminApi->organizations->updateMember(
organizationId: 'org_28seyVGVL1got6',
userId: 'usr_MKFxzgJaAH8JQ4',
roleId: 'admin',
);
res = admin_api.organizations.update_member(
organization_id="org_28seyVGVL1got6",
user_id="usr_MKFxzgJaAH8JQ4",
role_id="admin",
)
{
"state": "ACTIVE",
"user": {
"id": "usr_MKFxzgJaAH8JQ4",
"state": "ACTIVE",
"displayName": "Jane Doe",
"email": "[email protected]",
"emailVerified": true,
"phoneNumber": "+12125550123",
"phoneNumberVerified": false,
"imageUrl": "https://example.com/jane.jpg",
"currencyCode": "USD",
"languageCode": "en",
"regionCode": "US",
"timeZone": "America/New_York",
"address": {
"lines": [
"42 West St"
],
"city": "Brooklyn",
"state": "NY",
"postalCode": "11222",
"country": "US"
},
"accountConnections": [],
"subscription": null,
"memberships": [],
"signupTime": "2024-11-15T13:00:00Z",
"createTime": "2024-11-15T13:00:00Z",
"updateTime": "2024-11-15T13:00:00Z"
},
"role": {
"id": "role_51jav4KK",
"uniqueId": "admin",
"displayName": "Admin",
"type": "MEMBER",
"description": "Can manage members of the organization",
"permissionSets": [
"billing.readonly",
"members.readwrite"
],
"default": false,
"archived": false,
"createTime": "2024-11-15T13:00:00Z",
"updateTime": "2024-11-15T13:00:00Z"
},
"seat": null,
"createTime": "2024-11-15T13:00:00Z",
"updateTime": "2024-11-15T13:00:00Z"
}