Skip to main content
POST
/
identity
/
account-members
Add Account Members
curl --request POST \
  --url https://api.paxos.com/v2/identity/account-members \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "account_id": "79c27a0e-46a2-4276-9769-e1ebc055fa72",
  "members": [
    {
      "identity_id": "11a3122a-0c50-4950-9934-2ad48a782b78",
      "roles": [
        "FINANCIAL_ADVISOR"
      ]
    },
    {
      "identity_id": "08ba6b70-bcc0-4e4a-a67f-1d28842dedfc",
      "roles": [
        "AUTHORIZED_USER"
      ]
    }
  ]
}
'
import requests

url = "https://api.paxos.com/v2/identity/account-members"

payload = {
    "account_id": "79c27a0e-46a2-4276-9769-e1ebc055fa72",
    "members": [
        {
            "identity_id": "11a3122a-0c50-4950-9934-2ad48a782b78",
            "roles": ["FINANCIAL_ADVISOR"]
        },
        {
            "identity_id": "08ba6b70-bcc0-4e4a-a67f-1d28842dedfc",
            "roles": ["AUTHORIZED_USER"]
        }
    ]
}
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({
    account_id: '79c27a0e-46a2-4276-9769-e1ebc055fa72',
    members: [
      {
        identity_id: '11a3122a-0c50-4950-9934-2ad48a782b78',
        roles: ['FINANCIAL_ADVISOR']
      },
      {
        identity_id: '08ba6b70-bcc0-4e4a-a67f-1d28842dedfc',
        roles: ['AUTHORIZED_USER']
      }
    ]
  })
};

fetch('https://api.paxos.com/v2/identity/account-members', 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.paxos.com/v2/identity/account-members",
  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([
    'account_id' => '79c27a0e-46a2-4276-9769-e1ebc055fa72',
    'members' => [
        [
                'identity_id' => '11a3122a-0c50-4950-9934-2ad48a782b78',
                'roles' => [
                                'FINANCIAL_ADVISOR'
                ]
        ],
        [
                'identity_id' => '08ba6b70-bcc0-4e4a-a67f-1d28842dedfc',
                'roles' => [
                                'AUTHORIZED_USER'
                ]
        ]
    ]
  ]),
  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://api.paxos.com/v2/identity/account-members"

	payload := strings.NewReader("{\n  \"account_id\": \"79c27a0e-46a2-4276-9769-e1ebc055fa72\",\n  \"members\": [\n    {\n      \"identity_id\": \"11a3122a-0c50-4950-9934-2ad48a782b78\",\n      \"roles\": [\n        \"FINANCIAL_ADVISOR\"\n      ]\n    },\n    {\n      \"identity_id\": \"08ba6b70-bcc0-4e4a-a67f-1d28842dedfc\",\n      \"roles\": [\n        \"AUTHORIZED_USER\"\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://api.paxos.com/v2/identity/account-members")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"account_id\": \"79c27a0e-46a2-4276-9769-e1ebc055fa72\",\n  \"members\": [\n    {\n      \"identity_id\": \"11a3122a-0c50-4950-9934-2ad48a782b78\",\n      \"roles\": [\n        \"FINANCIAL_ADVISOR\"\n      ]\n    },\n    {\n      \"identity_id\": \"08ba6b70-bcc0-4e4a-a67f-1d28842dedfc\",\n      \"roles\": [\n        \"AUTHORIZED_USER\"\n      ]\n    }\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.paxos.com/v2/identity/account-members")

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  \"account_id\": \"79c27a0e-46a2-4276-9769-e1ebc055fa72\",\n  \"members\": [\n    {\n      \"identity_id\": \"11a3122a-0c50-4950-9934-2ad48a782b78\",\n      \"roles\": [\n        \"FINANCIAL_ADVISOR\"\n      ]\n    },\n    {\n      \"identity_id\": \"08ba6b70-bcc0-4e4a-a67f-1d28842dedfc\",\n      \"roles\": [\n        \"AUTHORIZED_USER\"\n      ]\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
{
  "account_id": "79c27a0e-46a2-4276-9769-e1ebc055fa72",
  "members": [
    {
      "identity_id": "11a3122a-0c50-4950-9934-2ad48a782b78",
      "roles": [
        "FINANCIAL_ADVISOR"
      ],
      "id": "01516495-031a-4c6c-b277-5734ea9cb99c"
    },
    {
      "identity_id": "08ba6b70-bcc0-4e4a-a67f-1d28842dedfc",
      "roles": [
        "AUTHORIZED_USER"
      ],
      "id": "1039d953-808f-495f-902d-c15480942885"
    }
  ]
}
OAuth Scope
identity:write_account

Authorizations

Authorization
string
header
required

Paxos APIs use OAuth 2 with the client credentials grant flow.

Token URLs:

Learn more in the API credentials guide →

Body

application/json
account_id
string
required

ID of account to which members will be added.

members
object[]
required

A non-empty array of account members to be added. Account members allow additional identities to act on this account (e.g. joint accounts).

Response

200 - application/json

A successful response.

account_id
string
required

ID of account to which members were added.

members
object[]

List of account members that were added to the account.