Skip to content
Docs
Get early access

Change a member's role

PATCH
/v1/members/{user_id}
curl --request PATCH \
--url https://api.wirevod.online/v1/members/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "role": "admin" }'

Requires the admin scope. Only owners may grant or remove the owner role (403 otherwise), and the last owner cannot lose it (409 last_owner). The member’s access tokens issued before the change are invalidated, so the new role applies at their next refresh.

user_id
required
string
Media typeapplication/json
object
role
required
string
Allowed values: owner admin member
Example
{
"role": "admin"
}

The updated member.

Media typeapplication/json
object
member
required
object
id
required
string
email
required
string format: email
name
required
string | null
role
required
string
Allowed values: owner admin member
last_login_at
required
integer | null
created_at
required
integer
Example
{
"member": {
"id": "usr_01J9Y",
"email": "teammate@example.com",
"name": "Grace Hopper",
"role": "admin",
"last_login_at": null,
"created_at": 1760000000000
}
}

The request was malformed or failed validation.

Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{
"error": "invalid_request",
"code": "invalid_request",
"message": "asset_id is required"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{
"error": "unauthorized",
"code": "unauthorized",
"message": "Authentication required"
}

The principal lacks the required scope or role (forbidden), the user must change their password before continuing (password_change_required), or the workspace is suspended (tenant_suspended; every request is refused until it is restored; contact support).

Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{
"error": "forbidden",
"code": "forbidden",
"message": "Missing required scope: write"
}

The resource does not exist in the tenant, or the route is unknown.

Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{
"error": "not_found",
"code": "not_found",
"message": "Asset not found"
}

The request conflicts with the resource’s current state.

Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{
"error": "upload_in_progress",
"code": "upload_in_progress",
"message": "An upload is already in progress for this asset"
}

Too many requests in the current window.

Media typeapplication/json
object
error
required
string
code
required
string
message
required
string
details
Example
{
"error": "rate_limited",
"code": "rate_limited",
"message": "Too many requests",
"details": {
"retry_after": 60
}
}
Retry-After
integer

Seconds to wait before retrying.