Change the organization role, scope and per-brand roles. Never leaves the organization without an owner.
PATCH
/v1/members/{id}
const url = 'https://api.replifier.com/v1/members/mem_01hx0000000000000000000000';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"orgRole":"owner","brandScope":"all","brandRoles":[{"brandId":"example","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.replifier.com/v1/members/mem_01hx0000000000000000000000 \ --header 'Content-Type: application/json' \ --data '{ "orgRole": "owner", "brandScope": "all", "brandRoles": [ { "brandId": "example", "role": "admin" } ] }'Owner and admin always see all brands (scope all). Granting, changing or removing the owner role requires being an owner. Demoting someone revokes their pending invitations they could no longer make (all of them if they become member; owner ones if they stop being owner).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
mem_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
orgRole
string
brandScope
string
brandRoles
Array<object>
object
brandId
required
string
role
required
string
Responses
Section titled “Responses”Member updated
Media typeapplication/json
object
id
required
string
userId
required
string
email
required
string
name
required
string
orgRole
required
string
brandScope
required
string
brandRoles
required
Array<object>
object
brandId
required
string
role
required
string
status
required
string
createdAt
required
string
Example
{ "orgRole": "owner", "brandScope": "all", "brandRoles": [ { "role": "admin" } ]}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Conflict
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}