Modify an address book recipient
curl --request PATCH \
--url https://api-sandbox.circle.com/v1/addressBook/recipients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"nickname": "sample nickname",
"email": "satoshi@circle.com",
"bns": "sample.circle"
}
}
'import requests
url = "https://api-sandbox.circle.com/v1/addressBook/recipients/{id}"
payload = { "metadata": {
"nickname": "sample nickname",
"email": "satoshi@circle.com",
"bns": "sample.circle"
} }
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({
metadata: {nickname: 'sample nickname', email: 'satoshi@circle.com', bns: 'sample.circle'}
})
};
fetch('https://api-sandbox.circle.com/v1/addressBook/recipients/{id}', 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-sandbox.circle.com/v1/addressBook/recipients/{id}",
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([
'metadata' => [
'nickname' => 'sample nickname',
'email' => 'satoshi@circle.com',
'bns' => 'sample.circle'
]
]),
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-sandbox.circle.com/v1/addressBook/recipients/{id}"
payload := strings.NewReader("{\n \"metadata\": {\n \"nickname\": \"sample nickname\",\n \"email\": \"satoshi@circle.com\",\n \"bns\": \"sample.circle\"\n }\n}")
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://api-sandbox.circle.com/v1/addressBook/recipients/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"nickname\": \"sample nickname\",\n \"email\": \"satoshi@circle.com\",\n \"bns\": \"sample.circle\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/addressBook/recipients/{id}")
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 = "{\n \"metadata\": {\n \"nickname\": \"sample nickname\",\n \"email\": \"satoshi@circle.com\",\n \"bns\": \"sample.circle\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"accountId": 1000662322,
"clientEntityId": "a3f1b2c4-d5e6-7890-abcd-ef1234567890",
"chain": "ETH",
"address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F",
"addressTag": "123456789",
"metadata": {
"nickname": "sample nickname",
"email": "satoshi@circle.com",
"bns": "sample.circle"
},
"status": "pending",
"riskEvaluation": {
"decision": "approved",
"reason": "3000"
},
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
}
}{
"code": 2,
"message": "API parameter invalid."
}{
"code": 4,
"message": "Unauthorized."
}{
"code": 404,
"message": "Not found."
}{
"code": -1,
"message": "Something went wrong. errId: 1f0b0c455e40f753f07b4f0ae6abd4b4"
}Modify an address book recipient
Only metadata can be updated. A change sends the recipient back to pending for a new risk review, and payouts to it fail until it is active again.
PATCH
/
v1
/
addressBook
/
recipients
/
{id}
Modify an address book recipient
curl --request PATCH \
--url https://api-sandbox.circle.com/v1/addressBook/recipients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"nickname": "sample nickname",
"email": "satoshi@circle.com",
"bns": "sample.circle"
}
}
'import requests
url = "https://api-sandbox.circle.com/v1/addressBook/recipients/{id}"
payload = { "metadata": {
"nickname": "sample nickname",
"email": "satoshi@circle.com",
"bns": "sample.circle"
} }
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({
metadata: {nickname: 'sample nickname', email: 'satoshi@circle.com', bns: 'sample.circle'}
})
};
fetch('https://api-sandbox.circle.com/v1/addressBook/recipients/{id}', 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-sandbox.circle.com/v1/addressBook/recipients/{id}",
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([
'metadata' => [
'nickname' => 'sample nickname',
'email' => 'satoshi@circle.com',
'bns' => 'sample.circle'
]
]),
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-sandbox.circle.com/v1/addressBook/recipients/{id}"
payload := strings.NewReader("{\n \"metadata\": {\n \"nickname\": \"sample nickname\",\n \"email\": \"satoshi@circle.com\",\n \"bns\": \"sample.circle\"\n }\n}")
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://api-sandbox.circle.com/v1/addressBook/recipients/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"nickname\": \"sample nickname\",\n \"email\": \"satoshi@circle.com\",\n \"bns\": \"sample.circle\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/addressBook/recipients/{id}")
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 = "{\n \"metadata\": {\n \"nickname\": \"sample nickname\",\n \"email\": \"satoshi@circle.com\",\n \"bns\": \"sample.circle\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "b8627ae8-732b-4d25-b947-1df8f4007a29",
"accountId": 1000662322,
"clientEntityId": "a3f1b2c4-d5e6-7890-abcd-ef1234567890",
"chain": "ETH",
"address": "0x8381470ED67C3802402dbbFa0058E8871F017A6F",
"addressTag": "123456789",
"metadata": {
"nickname": "sample nickname",
"email": "satoshi@circle.com",
"bns": "sample.circle"
},
"status": "pending",
"riskEvaluation": {
"decision": "approved",
"reason": "3000"
},
"createDate": "2020-04-10T02:13:30.000Z",
"updateDate": "2020-04-10T02:13:30.000Z"
}
}{
"code": 2,
"message": "API parameter invalid."
}{
"code": 4,
"message": "Unauthorized."
}{
"code": 404,
"message": "Not found."
}{
"code": -1,
"message": "Something went wrong. errId: 1f0b0c455e40f753f07b4f0ae6abd4b4"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Universally unique identifier (UUID v4) of a resource.
Example:
"b3d9d2d5-4c12-4946-a09d-953e82fae2b0"
Body
application/json
Recipient metadata.
Show child attributes
Show child attributes
Response
Successfully updated the address book recipient.
An address book recipient. Use its id as destination.id when creating a crypto payout.
Show child attributes
Show child attributes
Was this page helpful?