Change someone's role
PATCH
/v1/members/{member_id}
const url = 'https://api.pensievelabs.co/v1/members/mem_maya';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role":"admin"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.pensievelabs.co/v1/members/mem_maya \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role": "admin" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”member_id
required
string
Example
mem_mayaRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
role
required
string
Example
{ "role": "admin"}Responses
Section titled “Responses”The member.
Media typeapplication/json
object
id
required
string
object
required
name
required
string | null
email
required
string
role
required
string
state
required
string
created_at
required
string format: date-time
Example
{ "id": "mem_maya", "object": "member", "role": "admin", "state": "active"}default
Section titled “default”Something went wrong; error.type says what.
Media typeapplication/json
object
error
required
object
type
required
string
message
required
string
param
The request field the error is about.
string | null
request_id
required
string
Example
{ "error": { "type": "invalid_request" }}