Adds a signer to a business-account wallet by running a same-parties
2/2 -> 2/2 MPC reshare ceremony. The caller must hold an active share on
the wallet (only existing share-holders can reshare). The target user
is resolved the same way as addMember and, if absent, is created and
added to the account. The response is text/event-stream (NOT JSON):
clients consume it via EventSource and receive room_created and
ceremony_complete events; the new signer share is delivered to the
initiating client (iframe) via Sodot’s relay and backed up to the
client-keyshare service on the target’s behalf.
curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientKeygenIds": [
"<string>"
],
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"initialSignerRules": [
{
"name": "<string>",
"ruleId": "95b11417-f18f-457f-8804-68e361f9164f",
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"addresses": [
"0xbF394748301603f18d953C90F0b087CBEC0E1834"
],
"chainId": 123,
"chainIds": [
123
],
"contractAbi": [
{}
],
"functionName": "<string>",
"argumentConstraints": [
{
"value": "<unknown>",
"index": 1
}
],
"valueLimit": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"maxPerCall": "<string>",
"totalLimit": "<string>"
},
"operationRestrictions": {
"blockExport": true,
"blockRevocation": true,
"blockClientSigning": true
},
"disableBlockaidSecurityChecks": true,
"modifiableBySigner": true,
"approvalRequirements": [
{
"v": 123,
"id": "<string>",
"requiredApprovals": 123,
"when": {
"minValue": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"amount": "<string>"
},
"initiatorRole": {
"roles": [
"<string>"
],
"userIds": [
"<string>"
]
},
"actionTypes": [
"<string>"
]
},
"eligibleApproverRole": "<string>",
"mandatoryApproverRole": "<string>",
"completeWithinSeconds": 123
}
]
}
]
}
'import requests
url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers"
payload = {
"clientKeygenIds": ["<string>"],
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"initialSignerRules": [
{
"name": "<string>",
"ruleId": "95b11417-f18f-457f-8804-68e361f9164f",
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"addresses": ["0xbF394748301603f18d953C90F0b087CBEC0E1834"],
"chainId": 123,
"chainIds": [123],
"contractAbi": [{}],
"functionName": "<string>",
"argumentConstraints": [
{
"value": "<unknown>",
"index": 1
}
],
"valueLimit": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"maxPerCall": "<string>",
"totalLimit": "<string>"
},
"operationRestrictions": {
"blockExport": True,
"blockRevocation": True,
"blockClientSigning": True
},
"disableBlockaidSecurityChecks": True,
"modifiableBySigner": True,
"approvalRequirements": [
{
"v": 123,
"id": "<string>",
"requiredApprovals": 123,
"when": {
"minValue": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"amount": "<string>"
},
"initiatorRole": {
"roles": ["<string>"],
"userIds": ["<string>"]
},
"actionTypes": ["<string>"]
},
"eligibleApproverRole": "<string>",
"mandatoryApproverRole": "<string>",
"completeWithinSeconds": 123
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientKeygenIds: ['<string>'],
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
initialSignerRules: [
{
name: '<string>',
ruleId: '95b11417-f18f-457f-8804-68e361f9164f',
address: '0xbF394748301603f18d953C90F0b087CBEC0E1834',
addresses: ['0xbF394748301603f18d953C90F0b087CBEC0E1834'],
chainId: 123,
chainIds: [123],
contractAbi: [{}],
functionName: '<string>',
argumentConstraints: [{value: '<unknown>', index: 1}],
valueLimit: {
asset: '0xbF394748301603f18d953C90F0b087CBEC0E1834',
maxPerCall: '<string>',
totalLimit: '<string>'
},
operationRestrictions: {blockExport: true, blockRevocation: true, blockClientSigning: true},
disableBlockaidSecurityChecks: true,
modifiableBySigner: true,
approvalRequirements: [
{
v: 123,
id: '<string>',
requiredApprovals: 123,
when: {
minValue: {asset: '0xbF394748301603f18d953C90F0b087CBEC0E1834', amount: '<string>'},
initiatorRole: {roles: ['<string>'], userIds: ['<string>']},
actionTypes: ['<string>']
},
eligibleApproverRole: '<string>',
mandatoryApproverRole: '<string>',
completeWithinSeconds: 123
}
]
}
]
})
};
fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers', 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}/wallets/{walletId}/signers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientKeygenIds' => [
'<string>'
],
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'initialSignerRules' => [
[
'name' => '<string>',
'ruleId' => '95b11417-f18f-457f-8804-68e361f9164f',
'address' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'addresses' => [
'0xbF394748301603f18d953C90F0b087CBEC0E1834'
],
'chainId' => 123,
'chainIds' => [
123
],
'contractAbi' => [
[
]
],
'functionName' => '<string>',
'argumentConstraints' => [
[
'value' => '<unknown>',
'index' => 1
]
],
'valueLimit' => [
'asset' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'maxPerCall' => '<string>',
'totalLimit' => '<string>'
],
'operationRestrictions' => [
'blockExport' => true,
'blockRevocation' => true,
'blockClientSigning' => true
],
'disableBlockaidSecurityChecks' => true,
'modifiableBySigner' => true,
'approvalRequirements' => [
[
'v' => 123,
'id' => '<string>',
'requiredApprovals' => 123,
'when' => [
'minValue' => [
'asset' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'amount' => '<string>'
],
'initiatorRole' => [
'roles' => [
'<string>'
],
'userIds' => [
'<string>'
]
],
'actionTypes' => [
'<string>'
]
],
'eligibleApproverRole' => '<string>',
'mandatoryApproverRole' => '<string>',
'completeWithinSeconds' => 123
]
]
]
]
]),
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}/wallets/{walletId}/signers"
payload := strings.NewReader("{\n \"clientKeygenIds\": [\n \"<string>\"\n ],\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"initialSignerRules\": [\n {\n \"name\": \"<string>\",\n \"ruleId\": \"95b11417-f18f-457f-8804-68e361f9164f\",\n \"address\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"addresses\": [\n \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n ],\n \"chainId\": 123,\n \"chainIds\": [\n 123\n ],\n \"contractAbi\": [\n {}\n ],\n \"functionName\": \"<string>\",\n \"argumentConstraints\": [\n {\n \"value\": \"<unknown>\",\n \"index\": 1\n }\n ],\n \"valueLimit\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"maxPerCall\": \"<string>\",\n \"totalLimit\": \"<string>\"\n },\n \"operationRestrictions\": {\n \"blockExport\": true,\n \"blockRevocation\": true,\n \"blockClientSigning\": true\n },\n \"disableBlockaidSecurityChecks\": true,\n \"modifiableBySigner\": true,\n \"approvalRequirements\": [\n {\n \"v\": 123,\n \"id\": \"<string>\",\n \"requiredApprovals\": 123,\n \"when\": {\n \"minValue\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"amount\": \"<string>\"\n },\n \"initiatorRole\": {\n \"roles\": [\n \"<string>\"\n ],\n \"userIds\": [\n \"<string>\"\n ]\n },\n \"actionTypes\": [\n \"<string>\"\n ]\n },\n \"eligibleApproverRole\": \"<string>\",\n \"mandatoryApproverRole\": \"<string>\",\n \"completeWithinSeconds\": 123\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientKeygenIds\": [\n \"<string>\"\n ],\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"initialSignerRules\": [\n {\n \"name\": \"<string>\",\n \"ruleId\": \"95b11417-f18f-457f-8804-68e361f9164f\",\n \"address\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"addresses\": [\n \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n ],\n \"chainId\": 123,\n \"chainIds\": [\n 123\n ],\n \"contractAbi\": [\n {}\n ],\n \"functionName\": \"<string>\",\n \"argumentConstraints\": [\n {\n \"value\": \"<unknown>\",\n \"index\": 1\n }\n ],\n \"valueLimit\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"maxPerCall\": \"<string>\",\n \"totalLimit\": \"<string>\"\n },\n \"operationRestrictions\": {\n \"blockExport\": true,\n \"blockRevocation\": true,\n \"blockClientSigning\": true\n },\n \"disableBlockaidSecurityChecks\": true,\n \"modifiableBySigner\": true,\n \"approvalRequirements\": [\n {\n \"v\": 123,\n \"id\": \"<string>\",\n \"requiredApprovals\": 123,\n \"when\": {\n \"minValue\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"amount\": \"<string>\"\n },\n \"initiatorRole\": {\n \"roles\": [\n \"<string>\"\n ],\n \"userIds\": [\n \"<string>\"\n ]\n },\n \"actionTypes\": [\n \"<string>\"\n ]\n },\n \"eligibleApproverRole\": \"<string>\",\n \"mandatoryApproverRole\": \"<string>\",\n \"completeWithinSeconds\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientKeygenIds\": [\n \"<string>\"\n ],\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"initialSignerRules\": [\n {\n \"name\": \"<string>\",\n \"ruleId\": \"95b11417-f18f-457f-8804-68e361f9164f\",\n \"address\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"addresses\": [\n \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n ],\n \"chainId\": 123,\n \"chainIds\": [\n 123\n ],\n \"contractAbi\": [\n {}\n ],\n \"functionName\": \"<string>\",\n \"argumentConstraints\": [\n {\n \"value\": \"<unknown>\",\n \"index\": 1\n }\n ],\n \"valueLimit\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"maxPerCall\": \"<string>\",\n \"totalLimit\": \"<string>\"\n },\n \"operationRestrictions\": {\n \"blockExport\": true,\n \"blockRevocation\": true,\n \"blockClientSigning\": true\n },\n \"disableBlockaidSecurityChecks\": true,\n \"modifiableBySigner\": true,\n \"approvalRequirements\": [\n {\n \"v\": 123,\n \"id\": \"<string>\",\n \"requiredApprovals\": 123,\n \"when\": {\n \"minValue\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"amount\": \"<string>\"\n },\n \"initiatorRole\": {\n \"roles\": [\n \"<string>\"\n ],\n \"userIds\": [\n \"<string>\"\n ]\n },\n \"actionTypes\": [\n \"<string>\"\n ]\n },\n \"eligibleApproverRole\": \"<string>\",\n \"mandatoryApproverRole\": \"<string>\",\n \"completeWithinSeconds\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"{
"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": "Internal Server Error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the environment
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
ID of the business account
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
Body
SDK addSigner body. Same user resolution shape as addMember (userId OR identifier + type), plus signerType for the signer-role enum (endUser/server). type here is the user-resolution type, NOT the signer type — signerType lives on a dedicated field. smsCountryCode is required when type is phoneNumber; socialProvider is required when type is socialUsername or socialAccountId.
The remaining fields parameterise the MPC reshare ceremony that runs during the SSE response. clientKeygenIds come from the caller's local MPC state (the JS SDK obtains them internally by calling exportID() on the existing client share); the threshold scheme fields describe the source share set (old) and the destination share set (new) that the ceremony produces.
Type of a business account signer
endUser, server Caller's MPC keygen IDs participating in the reshare.
TWO_OF_TWO, TWO_OF_THREE, THREE_OF_FIVE TWO_OF_TWO, TWO_OF_THREE, THREE_OF_FIVE email, id, externalUserId, phoneNumber, socialUsername, socialAccountId Show child attributes
Show child attributes
The 'turnkey' value is deprecated and will be removed in a future version.
emailOnly, magicLink, apple, bitbucket, coinbasesocial, discord, epicgames, facebook, farcaster, github, gitlab, google, instagram, linkedin, microsoft, twitch, twitter, blocto, banxa, coinbaseOnramp, cryptoDotCom, moonPay, dynamic, alchemy, zerodev, telegram, turnkey, coinbaseWaas, sms, spotify, tiktok, line, steam, shopify, zksync, kraken, blockaid, passkey, okta, sendgrid, resend, trmWalletScreening, chainalysisAddressScreening, gemini Optional Rules to seed the new signer's signer-Layer with at add-signer time, so the signer is restricted from its first sign. Only valid when policy composition is enabled and the wallet is a composition wallet (env/wallet Layers exist); if supplied otherwise the request is rejected with 422 rather than creating an unrestricted signer. Rule shape mirrors the signer self-service policy-layer schema.
Show child attributes
Show child attributes
Response
SSE stream for the add-signer reshare ceremony. The response is
text/event-stream (NOT JSON): clients consume it via EventSource
and receive room_created and ceremony_complete events.
The response is of type string.
Was this page helpful?
curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientKeygenIds": [
"<string>"
],
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"initialSignerRules": [
{
"name": "<string>",
"ruleId": "95b11417-f18f-457f-8804-68e361f9164f",
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"addresses": [
"0xbF394748301603f18d953C90F0b087CBEC0E1834"
],
"chainId": 123,
"chainIds": [
123
],
"contractAbi": [
{}
],
"functionName": "<string>",
"argumentConstraints": [
{
"value": "<unknown>",
"index": 1
}
],
"valueLimit": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"maxPerCall": "<string>",
"totalLimit": "<string>"
},
"operationRestrictions": {
"blockExport": true,
"blockRevocation": true,
"blockClientSigning": true
},
"disableBlockaidSecurityChecks": true,
"modifiableBySigner": true,
"approvalRequirements": [
{
"v": 123,
"id": "<string>",
"requiredApprovals": 123,
"when": {
"minValue": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"amount": "<string>"
},
"initiatorRole": {
"roles": [
"<string>"
],
"userIds": [
"<string>"
]
},
"actionTypes": [
"<string>"
]
},
"eligibleApproverRole": "<string>",
"mandatoryApproverRole": "<string>",
"completeWithinSeconds": 123
}
]
}
]
}
'import requests
url = "https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers"
payload = {
"clientKeygenIds": ["<string>"],
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"initialSignerRules": [
{
"name": "<string>",
"ruleId": "95b11417-f18f-457f-8804-68e361f9164f",
"address": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"addresses": ["0xbF394748301603f18d953C90F0b087CBEC0E1834"],
"chainId": 123,
"chainIds": [123],
"contractAbi": [{}],
"functionName": "<string>",
"argumentConstraints": [
{
"value": "<unknown>",
"index": 1
}
],
"valueLimit": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"maxPerCall": "<string>",
"totalLimit": "<string>"
},
"operationRestrictions": {
"blockExport": True,
"blockRevocation": True,
"blockClientSigning": True
},
"disableBlockaidSecurityChecks": True,
"modifiableBySigner": True,
"approvalRequirements": [
{
"v": 123,
"id": "<string>",
"requiredApprovals": 123,
"when": {
"minValue": {
"asset": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"amount": "<string>"
},
"initiatorRole": {
"roles": ["<string>"],
"userIds": ["<string>"]
},
"actionTypes": ["<string>"]
},
"eligibleApproverRole": "<string>",
"mandatoryApproverRole": "<string>",
"completeWithinSeconds": 123
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientKeygenIds: ['<string>'],
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
initialSignerRules: [
{
name: '<string>',
ruleId: '95b11417-f18f-457f-8804-68e361f9164f',
address: '0xbF394748301603f18d953C90F0b087CBEC0E1834',
addresses: ['0xbF394748301603f18d953C90F0b087CBEC0E1834'],
chainId: 123,
chainIds: [123],
contractAbi: [{}],
functionName: '<string>',
argumentConstraints: [{value: '<unknown>', index: 1}],
valueLimit: {
asset: '0xbF394748301603f18d953C90F0b087CBEC0E1834',
maxPerCall: '<string>',
totalLimit: '<string>'
},
operationRestrictions: {blockExport: true, blockRevocation: true, blockClientSigning: true},
disableBlockaidSecurityChecks: true,
modifiableBySigner: true,
approvalRequirements: [
{
v: 123,
id: '<string>',
requiredApprovals: 123,
when: {
minValue: {asset: '0xbF394748301603f18d953C90F0b087CBEC0E1834', amount: '<string>'},
initiatorRole: {roles: ['<string>'], userIds: ['<string>']},
actionTypes: ['<string>']
},
eligibleApproverRole: '<string>',
mandatoryApproverRole: '<string>',
completeWithinSeconds: 123
}
]
}
]
})
};
fetch('https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers', 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}/wallets/{walletId}/signers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientKeygenIds' => [
'<string>'
],
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'initialSignerRules' => [
[
'name' => '<string>',
'ruleId' => '95b11417-f18f-457f-8804-68e361f9164f',
'address' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'addresses' => [
'0xbF394748301603f18d953C90F0b087CBEC0E1834'
],
'chainId' => 123,
'chainIds' => [
123
],
'contractAbi' => [
[
]
],
'functionName' => '<string>',
'argumentConstraints' => [
[
'value' => '<unknown>',
'index' => 1
]
],
'valueLimit' => [
'asset' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'maxPerCall' => '<string>',
'totalLimit' => '<string>'
],
'operationRestrictions' => [
'blockExport' => true,
'blockRevocation' => true,
'blockClientSigning' => true
],
'disableBlockaidSecurityChecks' => true,
'modifiableBySigner' => true,
'approvalRequirements' => [
[
'v' => 123,
'id' => '<string>',
'requiredApprovals' => 123,
'when' => [
'minValue' => [
'asset' => '0xbF394748301603f18d953C90F0b087CBEC0E1834',
'amount' => '<string>'
],
'initiatorRole' => [
'roles' => [
'<string>'
],
'userIds' => [
'<string>'
]
],
'actionTypes' => [
'<string>'
]
],
'eligibleApproverRole' => '<string>',
'mandatoryApproverRole' => '<string>',
'completeWithinSeconds' => 123
]
]
]
]
]),
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}/wallets/{walletId}/signers"
payload := strings.NewReader("{\n \"clientKeygenIds\": [\n \"<string>\"\n ],\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"initialSignerRules\": [\n {\n \"name\": \"<string>\",\n \"ruleId\": \"95b11417-f18f-457f-8804-68e361f9164f\",\n \"address\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"addresses\": [\n \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n ],\n \"chainId\": 123,\n \"chainIds\": [\n 123\n ],\n \"contractAbi\": [\n {}\n ],\n \"functionName\": \"<string>\",\n \"argumentConstraints\": [\n {\n \"value\": \"<unknown>\",\n \"index\": 1\n }\n ],\n \"valueLimit\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"maxPerCall\": \"<string>\",\n \"totalLimit\": \"<string>\"\n },\n \"operationRestrictions\": {\n \"blockExport\": true,\n \"blockRevocation\": true,\n \"blockClientSigning\": true\n },\n \"disableBlockaidSecurityChecks\": true,\n \"modifiableBySigner\": true,\n \"approvalRequirements\": [\n {\n \"v\": 123,\n \"id\": \"<string>\",\n \"requiredApprovals\": 123,\n \"when\": {\n \"minValue\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"amount\": \"<string>\"\n },\n \"initiatorRole\": {\n \"roles\": [\n \"<string>\"\n ],\n \"userIds\": [\n \"<string>\"\n ]\n },\n \"actionTypes\": [\n \"<string>\"\n ]\n },\n \"eligibleApproverRole\": \"<string>\",\n \"mandatoryApproverRole\": \"<string>\",\n \"completeWithinSeconds\": 123\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientKeygenIds\": [\n \"<string>\"\n ],\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"initialSignerRules\": [\n {\n \"name\": \"<string>\",\n \"ruleId\": \"95b11417-f18f-457f-8804-68e361f9164f\",\n \"address\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"addresses\": [\n \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n ],\n \"chainId\": 123,\n \"chainIds\": [\n 123\n ],\n \"contractAbi\": [\n {}\n ],\n \"functionName\": \"<string>\",\n \"argumentConstraints\": [\n {\n \"value\": \"<unknown>\",\n \"index\": 1\n }\n ],\n \"valueLimit\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"maxPerCall\": \"<string>\",\n \"totalLimit\": \"<string>\"\n },\n \"operationRestrictions\": {\n \"blockExport\": true,\n \"blockRevocation\": true,\n \"blockClientSigning\": true\n },\n \"disableBlockaidSecurityChecks\": true,\n \"modifiableBySigner\": true,\n \"approvalRequirements\": [\n {\n \"v\": 123,\n \"id\": \"<string>\",\n \"requiredApprovals\": 123,\n \"when\": {\n \"minValue\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"amount\": \"<string>\"\n },\n \"initiatorRole\": {\n \"roles\": [\n \"<string>\"\n ],\n \"userIds\": [\n \"<string>\"\n ]\n },\n \"actionTypes\": [\n \"<string>\"\n ]\n },\n \"eligibleApproverRole\": \"<string>\",\n \"mandatoryApproverRole\": \"<string>\",\n \"completeWithinSeconds\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dynamicauth.com/api/v0/sdk/{environmentId}/businessAccounts/{businessAccountId}/wallets/{walletId}/signers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientKeygenIds\": [\n \"<string>\"\n ],\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"initialSignerRules\": [\n {\n \"name\": \"<string>\",\n \"ruleId\": \"95b11417-f18f-457f-8804-68e361f9164f\",\n \"address\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"addresses\": [\n \"0xbF394748301603f18d953C90F0b087CBEC0E1834\"\n ],\n \"chainId\": 123,\n \"chainIds\": [\n 123\n ],\n \"contractAbi\": [\n {}\n ],\n \"functionName\": \"<string>\",\n \"argumentConstraints\": [\n {\n \"value\": \"<unknown>\",\n \"index\": 1\n }\n ],\n \"valueLimit\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"maxPerCall\": \"<string>\",\n \"totalLimit\": \"<string>\"\n },\n \"operationRestrictions\": {\n \"blockExport\": true,\n \"blockRevocation\": true,\n \"blockClientSigning\": true\n },\n \"disableBlockaidSecurityChecks\": true,\n \"modifiableBySigner\": true,\n \"approvalRequirements\": [\n {\n \"v\": 123,\n \"id\": \"<string>\",\n \"requiredApprovals\": 123,\n \"when\": {\n \"minValue\": {\n \"asset\": \"0xbF394748301603f18d953C90F0b087CBEC0E1834\",\n \"amount\": \"<string>\"\n },\n \"initiatorRole\": {\n \"roles\": [\n \"<string>\"\n ],\n \"userIds\": [\n \"<string>\"\n ]\n },\n \"actionTypes\": [\n \"<string>\"\n ]\n },\n \"eligibleApproverRole\": \"<string>\",\n \"mandatoryApproverRole\": \"<string>\",\n \"completeWithinSeconds\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"{
"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": "Internal Server Error"
}