Update a member's role

PUT/auth/v1/memberships/{orgId}/members/{userId}/role

Updates the specified member's role within the organization.

Authorization<token>

In: header

Path Parameters

orgId*string

Organization ID

userId*string

Member user ID

Request Body

required
application/json
{
  "$ref": "#/components/schemas/internal_auth.updateRoleBody",
  "$ref-value": {
    "properties": {
      "role": {
        "enum": [
          "admin",
          "member"
        ],
        "type": "string"
      }
    },
    "required": [
      "role"
    ],
    "type": "object"
  }
}

Response Body

200application/json

OK

type: unknown

{
  "$ref": "#/components/schemas/authv1.MembershipMutation",
  "$ref-value": {
    "properties": {
      "joined_at": {
        "type": "string"
      },
      "org_id": {
        "type": "string"
      },
      "org_name": {
        "type": "string"
      },
      "role": {
        "type": "string"
      },
      "state": {
        "type": "string"
      },
      "user_id": {
        "type": "string"
      }
    },
    "type": "object"
  }
}
curl -X PUT "https://api.rixl.com/auth/v1/memberships/string/members/string/role" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "admin"
  }'

OK

application/json

{
  "$ref": "#/components/schemas/authv1.MembershipMutation",
  "$ref-value": {
    "properties": {
      "joined_at": {
        "type": "string"
      },
      "org_id": {
        "type": "string"
      },
      "org_name": {
        "type": "string"
      },
      "role": {
        "type": "string"
      },
      "state": {
        "type": "string"
      },
      "user_id": {
        "type": "string"
      }
    },
    "type": "object"
  }
}