Assign a role to a user
Input
Encoding
application/jsondid
stringdid
Required
Target user DID
role
string
Required
Role to assign
Output
Encoding
application/jsonsuccess
boolean
Required
Whether the role was assigned
Errors
AuthenticationRequired
AdminRequired
InvalidRequest
Try It
Requests are sent directly from your browser. Some servers may block requests due to CORS.
View raw schema
{
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"did",
"role"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "Target user DID"
},
"role": {
"type": "string",
"description": "Role to assign",
"knownValues": [
"admin",
"moderator",
"graph-editor",
"author",
"reader",
"alpha-tester",
"premium"
]
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "AuthenticationRequired"
},
{
"name": "AdminRequired"
},
{
"name": "InvalidRequest"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"description": "Whether the role was assigned"
}
}
},
"encoding": "application/json"
},
"description": "Assign a role to a user"
}