curl --request PATCH \
--url https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nameOnAccount": "<string>",
"nickname": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}"
payload = {
"nameOnAccount": "<string>",
"nickname": "<string>"
}
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({nameOnAccount: '<string>', nickname: '<string>'})
};
fetch('https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{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.tesouro.com/embedded-banking/v1/external-bank-accounts/{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([
'nameOnAccount' => '<string>',
'nickname' => '<string>'
]),
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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}"
payload := strings.NewReader("{\n \"nameOnAccount\": \"<string>\",\n \"nickname\": \"<string>\"\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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nameOnAccount\": \"<string>\",\n \"nickname\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{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 \"nameOnAccount\": \"<string>\",\n \"nickname\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountNumber": "<string>",
"accountStatus": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z",
"nameOnAccount": "<string>",
"nickname": "<string>",
"routingNumber": "<string>",
"type": "CHECKING",
"verificationStatus": "UNVERIFIED",
"accountHolderType": "INDIVIDUAL",
"microDepositVerification": {
"attemptsAllowed": 123,
"attemptsRemaining": 123,
"canAttemptAgain": true,
"isTerminal": true,
"outcome": "AMOUNTS_MATCHED"
},
"suspension": {
"suspendedAt": "2023-11-07T05:31:56Z",
"reason": "PAYMENT_RETURNED",
"returnCategory": "ACCOUNT_CLOSED"
},
"verificationFailure": {
"incorrectDetails": [
"ROUTING_NUMBER"
],
"reason": "AMOUNTS_DID_NOT_MATCH",
"returnCategory": "ACCOUNT_CLOSED"
}
}{
"errorCode": "<string>",
"detail": "<string>",
"errors": {},
"instance": "<string>",
"questionErrors": [
{
"code": "REQUIRED",
"message": "<string>",
"itemPath": "<string>",
"key": "<string>",
"ownerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"requirementsVersion": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Update external account
Updates an external bank account’s nickname and/or verification status. Updating verification status requires ‘CanSetExternalBankAccountVerification’ permission.
Token types: APP, USER | Required scopes: external_bank_account:write:org
curl --request PATCH \
--url https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nameOnAccount": "<string>",
"nickname": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}"
payload = {
"nameOnAccount": "<string>",
"nickname": "<string>"
}
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({nameOnAccount: '<string>', nickname: '<string>'})
};
fetch('https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{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.tesouro.com/embedded-banking/v1/external-bank-accounts/{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([
'nameOnAccount' => '<string>',
'nickname' => '<string>'
]),
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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}"
payload := strings.NewReader("{\n \"nameOnAccount\": \"<string>\",\n \"nickname\": \"<string>\"\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.tesouro.com/embedded-banking/v1/external-bank-accounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nameOnAccount\": \"<string>\",\n \"nickname\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/embedded-banking/v1/external-bank-accounts/{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 \"nameOnAccount\": \"<string>\",\n \"nickname\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accountNumber": "<string>",
"accountStatus": "ACTIVE",
"createdAt": "2023-11-07T05:31:56Z",
"nameOnAccount": "<string>",
"nickname": "<string>",
"routingNumber": "<string>",
"type": "CHECKING",
"verificationStatus": "UNVERIFIED",
"accountHolderType": "INDIVIDUAL",
"microDepositVerification": {
"attemptsAllowed": 123,
"attemptsRemaining": 123,
"canAttemptAgain": true,
"isTerminal": true,
"outcome": "AMOUNTS_MATCHED"
},
"suspension": {
"suspendedAt": "2023-11-07T05:31:56Z",
"reason": "PAYMENT_RETURNED",
"returnCategory": "ACCOUNT_CLOSED"
},
"verificationFailure": {
"incorrectDetails": [
"ROUTING_NUMBER"
],
"reason": "AMOUNTS_DID_NOT_MATCH",
"returnCategory": "ACCOUNT_CLOSED"
}
}{
"errorCode": "<string>",
"detail": "<string>",
"errors": {},
"instance": "<string>",
"questionErrors": [
{
"code": "REQUIRED",
"message": "<string>",
"itemPath": "<string>",
"key": "<string>",
"ownerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"requirementsVersion": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"errorCode": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Authorizations
Scopes
Headers
ID of the organization to perform this operation on behalf of. Required for BANK and PLATFORM app token callers targeting a specific organization. If omitted, the request uses the authenticated caller's own organization. Must be a valid non-empty UUID. Present but malformed values return 400.
Body
The update request.
Request to update an external bank account. These fields cannot be cleared; omit a field to keep its stored value.
Response
External bank account updated.
Response representing an external bank account.
Verification status of the external bank account. Where the bank fails verification on the first incorrect attempt, FAILED can be recovered while attempts remain. Where it fails at the attempt limit, or after a returned micro-deposit or a notification of change, FAILED is final.
UNVERIFIED, VERIFICATION_SENT, VERIFIED, FAILED Was this page helpful?