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 Authorization header).

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 to ENTERPRISE_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 memberId must correspond to an existing member in the organization.

  • The role parameter is required and must be set to a valid value (e.g., Admin).

  • Ensure the user_type query parameter is always set to ENTERPRISE_API.

  • Proper authentication is required.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required
Query Params
string
Body Params
Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json