Change a user's role
PATCH
/v1/users/{id}
const url = 'https://api.fromenance.com/v1/users/usr_01J8Z9X0Q3K4M5N6P7R8S9T0V1';const options = { method: 'PATCH', headers: { cookie: 'fromenance.session_token=<fromenance.session_token>', 'Content-Type': 'application/json' }, body: '{"role":"owner"}'};
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.fromenance.com/v1/users/usr_01J8Z9X0Q3K4M5N6P7R8S9T0V1 \ --header 'Content-Type: application/json' \ --cookie fromenance.session_token=<fromenance.session_token> \ --data '{ "role": "owner" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
Example
usr_01J8Z9X0Q3K4M5N6P7R8S9T0V1Request Body
Section titled “Request Body”Media typeapplication/json
object
role
required
string
Responses
Section titled “ Responses ”User
Media typeapplication/json
object
id
required
string
email
required
string
name
required
string | null
role
required
string
status
required
string
invited_at
required
string | null
accepted_at
required
string | null
last_seen_at
required
string | null
created_at
required
string
Example
{ "role": "owner"}