Organization
Change a team member's role
Assign a different role to an existing team member. Takes effect on their next request — no re-login needed.
Safety rails:
- You cannot change your own role (ask another admin).
- You cannot demote the last member who can manage the team.
Permissions: requires manage access to “Team & roles”.
Authentication: Accepts either Authorization: Bearer <jwt> (dashboard) or X-API-Key: hp_live_... (programmatic).
PATCH
/
v1
/
organization
/
team
/
{memberId}
Change a team member's role
curl --request PATCH \
--url https://api.hyperprop.com/platform/v1/organization/team/{memberId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"roleId": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/team/{memberId}"
payload = { "roleId": "<string>" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({roleId: '<string>'})
};
fetch('https://api.hyperprop.com/platform/v1/organization/team/{memberId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/team/{memberId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'roleId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/team/{memberId}"
payload := strings.NewReader("{\n \"roleId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hyperprop.com/platform/v1/organization/team/{memberId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"roleId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/team/{memberId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roleId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"roleId": "<string>",
"roleName": "Finance",
"permissions": {}
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "This is the last member who can manage the team. Assign another admin first.",
"code": "LAST_ADMIN"
}{
"success": false,
"statusCode": 403,
"error": "Forbidden",
"message": "Access denied",
"code": "FORBIDDEN"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found",
"code": "NOT_FOUND"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Authorizations
BearerX-API-Key
JWT Bearer token for user session auth. Format: "Bearer {token}". Used by User and Organization endpoints.
Path Parameters
Team member user ID
Body
application/json
New role to assign (from GET /organization/roles)
Related topics
Add a team member with a roleGet team members for your organizationGenerate a new temporary password for a team memberRemove a team memberList roles (system presets + your custom roles)⌘I
Change a team member's role
curl --request PATCH \
--url https://api.hyperprop.com/platform/v1/organization/team/{memberId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"roleId": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/team/{memberId}"
payload = { "roleId": "<string>" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({roleId: '<string>'})
};
fetch('https://api.hyperprop.com/platform/v1/organization/team/{memberId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/team/{memberId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'roleId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/team/{memberId}"
payload := strings.NewReader("{\n \"roleId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hyperprop.com/platform/v1/organization/team/{memberId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"roleId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/team/{memberId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"roleId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"roleId": "<string>",
"roleName": "Finance",
"permissions": {}
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "This is the last member who can manage the team. Assign another admin first.",
"code": "LAST_ADMIN"
}{
"success": false,
"statusCode": 403,
"error": "Forbidden",
"message": "Access denied",
"code": "FORBIDDEN"
}{
"success": false,
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found",
"code": "NOT_FOUND"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}