headless lms

Change a member's role (staff)

PATCH /api/organizations/members/{id}/role. Change a member's role (staff). Headless LMS Organizations API reference.

PATCH
/api/organizations/members/{id}/role

Owner or admin only. The owner role can be neither granted nor changed (409), and only a moderator can become a student.

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/organizations/members/string/role" \  -H "Content-Type: application/json" \  -d '{    "role": "admin"  }'
{  "id": "string",  "firstName": "string",  "lastName": "string",  "email": "string",  "image": "string",  "role": "owner",  "status": "active",  "joinedAt": "string",  "invitedAt": "string"}
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}