put
https://{host}/api/v2/organization/members//update/role
Update Organization Member Role
This endpoint allows you to change the role of a specific member within your organization. Use it to promote a user to Admin by specifying their memberId. The memberId path variable is required and must reference a valid organization member.
HTTP Method and URL
-
Method:
PUT -
URL:
{{host}}/api/v2/organization/members/:memberId/update/role?user_type=ENTERPRISE_API
Authentication Requirements
- Requires authentication via a valid user token (e.g., Bearer Token in the
Authorizationheader).
Path and Query Parameters
- Path Parameter:
memberId(integer, required): The unique identifier of the organization member whose role is being updated.
- Query Parameter:
user_type(string, required): Must be set toENTERPRISE_API.
Request Body
-
Content-Type:
application/json -
Body Parameters:
role(string, required): The new role for the member. Allowed values:Admin.
Example:
{
"role": "Admin"
}
Example Request
PUT {{host}}/api/v2/organization/members/73/update/role?user_type=ENTERPRISE_API
Authorization: Bearer <user-token>
Content-Type: application/json
{
"role": "Admin"
}
Example Successful Response
{
"message": "",
"data": {
"id": 0,
"name": "",
"purchased_seats": 0,
"available_seats": 0,
"occupied_seats": 0,
"photo": "",
"status": ""
},
"meta": {}
}
Example Error Response
{
"message": "Invalid memberId or role.",
"data": null,
"meta": {}
}
Usage Notes
-
The
memberIdmust correspond to an existing member in the organization. -
The
roleparameter is required and must be set to a valid value (e.g.,Admin). -
Ensure the
user_typequery parameter is always set toENTERPRISE_API. -
Proper authentication is required.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
