Change a member’s role
POST
/v1/org/update-member-role
const url = 'https://your-tenant-host/v1/org/update-member-role';const options = { method: 'POST', headers: { cookie: 'ek.session_token=<ek.session_token>', 'x-edgekit-site-id': 'site_example', 'Content-Type': 'application/json' }, body: '{"memberId":"01926f3a-8b4f-7c55-b066-6f7a8b9c0d1e","role":"admin","organizationId":"01926f3a-8b4e-7b33-a944-5e6f7a8b9c0d"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-tenant-host/v1/org/update-member-role \ --header 'Content-Type: application/json' \ --header 'x-edgekit-site-id: site_example' \ --cookie ek.session_token=<ek.session_token> \ --data '{ "memberId": "01926f3a-8b4f-7c55-b066-6f7a8b9c0d1e", "role": "admin", "organizationId": "01926f3a-8b4e-7b33-a944-5e6f7a8b9c0d" }'admin or member. owner is not assignable here: ownership transfer has its own rules, and offering it through a promotion route would let an admin hand the organization away. Safe to retry.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-edgekit-site-id
required
The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
string
Example
site_exampleThe site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
memberId
required
string format: uuid
Example
01926f3a-8b4f-7c55-b066-6f7a8b9c0d1erole
required
string
Example
memberorganizationId
string format: uuid
Example
01926f3a-8b4e-7b33-a944-5e6f7a8b9c0dResponses
Section titled “Responses”The updated membership.
Media typeapplication/json
object
id
required
string format: uuid
organizationId
required
string format: uuid
userId
required
string format: uuid
role
required
Open: accept a member not listed. Known: owner, admin, member.
string | null
createdAt
required
string | null format: date-time
user
required
object
id
required
string format: uuid
email
required
string
name
required
string | null
Example
{ "id": "01926f3a-8b4f-7c55-b066-6f7a8b9c0d1e", "organizationId": "01926f3a-8b4e-7b33-a944-5e6f7a8b9c0d", "userId": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f", "role": "owner", "createdAt": "2026-07-31T09:00:00.000Z", "user": { "id": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f", "email": "ada@example.com", "name": "Ada Lovelace" }}Invalid request.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Missing or invalid credential.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Not allowed.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Resource not found.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}