Give a member a custom role, or return them to their built-in role
PUT
/v1/workspace/memberships/{membership_id}/custom-role
const url = 'https://api.vocapable.com/v1/workspace/memberships/example/custom-role';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.vocapable.com/v1/workspace/memberships/example/custom-role \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role_id": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”membership_id
required
Membership Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
WorkspaceMemberAccess
object
membership_id
required
Membership Id
string
role
required
Role
string
custom_role
required
Any of:
WorkspaceCustomRoleTag
object
role_id
required
Role Id
string
name
required
Name
string
scope
required
Scope
string
null
capabilities
required
Capabilities
Array<string>
permissions
Permissions
Array<string>
Example
{ "role": "owner", "custom_role": { "scope": "company" }, "capabilities": [ "view_all_customers" ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}