Skip to main content
POST
/
identity
/
institution-members
Add Institution Members
curl --request POST \
  --url https://api.paxos.com/v2/identity/institution-members \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "institution_id": "2908fa8b-427a-4089-b2cf-17654c604623",
  "members": [
    {
      "identity_id": "31abdcbd-2801-4dbc-8986-adec3828391b",
      "roles": [
        "GRANTOR"
      ]
    },
    {
      "identity_id": "58def33e-b68f-47d3-bc2b-62b1f68f21e5",
      "roles": [
        "TRUSTEE"
      ]
    }
  ]
}
'
import requests

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

payload = {
    "institution_id": "2908fa8b-427a-4089-b2cf-17654c604623",
    "members": [
        {
            "identity_id": "31abdcbd-2801-4dbc-8986-adec3828391b",
            "roles": ["GRANTOR"]
        },
        {
            "identity_id": "58def33e-b68f-47d3-bc2b-62b1f68f21e5",
            "roles": ["TRUSTEE"]
        }
    ]
}
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({
    institution_id: '2908fa8b-427a-4089-b2cf-17654c604623',
    members: [
      {identity_id: '31abdcbd-2801-4dbc-8986-adec3828391b', roles: ['GRANTOR']},
      {identity_id: '58def33e-b68f-47d3-bc2b-62b1f68f21e5', roles: ['TRUSTEE']}
    ]
  })
};

fetch('https://api.paxos.com/v2/identity/institution-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/institution-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([
    'institution_id' => '2908fa8b-427a-4089-b2cf-17654c604623',
    'members' => [
        [
                'identity_id' => '31abdcbd-2801-4dbc-8986-adec3828391b',
                'roles' => [
                                'GRANTOR'
                ]
        ],
        [
                'identity_id' => '58def33e-b68f-47d3-bc2b-62b1f68f21e5',
                'roles' => [
                                'TRUSTEE'
                ]
        ]
    ]
  ]),
  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/institution-members"

	payload := strings.NewReader("{\n  \"institution_id\": \"2908fa8b-427a-4089-b2cf-17654c604623\",\n  \"members\": [\n    {\n      \"identity_id\": \"31abdcbd-2801-4dbc-8986-adec3828391b\",\n      \"roles\": [\n        \"GRANTOR\"\n      ]\n    },\n    {\n      \"identity_id\": \"58def33e-b68f-47d3-bc2b-62b1f68f21e5\",\n      \"roles\": [\n        \"TRUSTEE\"\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/institution-members")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"institution_id\": \"2908fa8b-427a-4089-b2cf-17654c604623\",\n  \"members\": [\n    {\n      \"identity_id\": \"31abdcbd-2801-4dbc-8986-adec3828391b\",\n      \"roles\": [\n        \"GRANTOR\"\n      ]\n    },\n    {\n      \"identity_id\": \"58def33e-b68f-47d3-bc2b-62b1f68f21e5\",\n      \"roles\": [\n        \"TRUSTEE\"\n      ]\n    }\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.paxos.com/v2/identity/institution-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  \"institution_id\": \"2908fa8b-427a-4089-b2cf-17654c604623\",\n  \"members\": [\n    {\n      \"identity_id\": \"31abdcbd-2801-4dbc-8986-adec3828391b\",\n      \"roles\": [\n        \"GRANTOR\"\n      ]\n    },\n    {\n      \"identity_id\": \"58def33e-b68f-47d3-bc2b-62b1f68f21e5\",\n      \"roles\": [\n        \"TRUSTEE\"\n      ]\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
{
  "institution_id": "2908fa8b-427a-4089-b2cf-17654c604623",
  "members": [
    {
      "identity_id": "31abdcbd-2801-4dbc-8986-adec3828391b",
      "roles": [
        "GRANTOR"
      ],
      "id": "23ebbcd3-0fe6-48c8-9a2c-a35572b0e8ba"
    },
    {
      "identity_id": "58def33e-b68f-47d3-bc2b-62b1f68f21e5",
      "roles": [
        "TRUSTEE"
      ],
      "id": "a0a0d270-0dd1-40b7-85ce-de713c47bcec"
    }
  ]
}
OAuth Scope
identity:write_identity

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
institution_id
string
required

ID of institution identity to which members will be added.

members
object[]
required

A non-empty array of institution members that were added. Should always be present in practice.

Response

200 - application/json

A successful response.

institution_id
string
required

ID of institution identity to which members were added.

members
object[]

List of institution members that were added to the institution.