Skip to main content
PATCH
/
sdk
/
{environmentId}
/
businessAccounts
/
{businessAccountId}
/
members
/
{userId}
SDK — change a member's role (admin ↔ viewer)
curl --request PATCH \
  --url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/members/{userId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
import requests

url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/members/{userId}"

payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};

fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/members/{userId}', 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://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/members/{userId}",
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([

]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/members/{userId}"

payload := strings.NewReader("{}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/members/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/members/{userId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
{
  "id": "95b11417-f18f-457f-8804-68e361f9164f",
  "businessAccountId": "95b11417-f18f-457f-8804-68e361f9164f",
  "userId": "95b11417-f18f-457f-8804-68e361f9164f",
  "addedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z"
}
{
"error": "<string>"
}
{
"error": "No jwt provided!"
}
{
"error": {
"code": "<string>",
"message": "<string>"
},
"payload": {
"walletPublicKey": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"email": "jsmith@example.com"
}
}
{
"error": "Not Found",
"code": "not_found"
}
{
"error": "Conflict: invalid state transition"
}
{
"error": "Internal Server Error"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

businessAccountId
string
required

ID of the business account

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

userId
string
required
Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Body

application/json

SDK updateMemberRole body. Changes a member's role between admin and viewer. Owner is never a target — ownership moves via transferOwnership.

role
enum<string>
required
Available options:
admin,
viewer

Response

Member role updated

Admin-reach membership in a business account

id
string
required
Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

businessAccountId
string
required
Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

userId
string
required
Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

role
enum<string>
required

Role of a business account member (admin reach)

Available options:
owner,
admin,
viewer
addedByUserId
string<uuid> | null
createdAt
string<date-time>
Last modified on July 13, 2026