social.colibri.beta.community.setMemberRoles

colibri.social

Documentation

Sets the complete set of roles a member holds.

main procedure

Sets the complete set of roles a member holds.

Input

Encodingapplication/json
community stringdid Required

The community the member belongs to.

roles array Required

The complete new set of roles the member should hold.

subject stringdid Required

The member whose roles are being set.

Output

Encodingapplication/json

Errors

AuthRequired The request is missing, malformed, or unverifiable service auth.
Forbidden The requesting user lacks the role.manage permission.
CommunityNotFound No community exists with that DID.
MemberNotFound The subject does not hold a member record in this community.
RoleNotFound One of the requested roles does not exist.
RoleHierarchy The requesting user cannot grant or revoke a role at or above their own highest position.
CredentialsUnavailable The AppView's stored credentials for this community are missing or unusable.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "type": "procedure",
  "input": {
    "schema": {
      "type": "object",
      "required": [
        "community",
        "subject",
        "roles"
      ],
      "properties": {
        "roles": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "record-key",
            "description": "A role."
          },
          "description": "The complete new set of roles the member should hold."
        },
        "subject": {
          "type": "string",
          "format": "did",
          "description": "The member whose roles are being set."
        },
        "community": {
          "type": "string",
          "format": "did",
          "description": "The community the member belongs to."
        }
      }
    },
    "encoding": "application/json"
  },
  "errors": [
    {
      "name": "AuthRequired",
      "description": "The request is missing, malformed, or unverifiable service auth."
    },
    {
      "name": "Forbidden",
      "description": "The requesting user lacks the role.manage permission."
    },
    {
      "name": "CommunityNotFound",
      "description": "No community exists with that DID."
    },
    {
      "name": "MemberNotFound",
      "description": "The subject does not hold a member record in this community."
    },
    {
      "name": "RoleNotFound",
      "description": "One of the requested roles does not exist."
    },
    {
      "name": "RoleHierarchy",
      "description": "The requesting user cannot grant or revoke a role at or above their own highest position."
    },
    {
      "name": "CredentialsUnavailable",
      "description": "The AppView's stored credentials for this community are missing or unusable."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "member"
      ],
      "properties": {
        "member": {
          "ref": "social.colibri.beta.community.defs#memberView",
          "type": "ref",
          "description": "The updated member."
        }
      }
    },
    "encoding": "application/json"
  },
  "description": "Sets the complete set of roles a member holds."
}

Lexicon Garden

@