Settlement instructions Update a settlement instruction
Update a settlement instruction
Changes the details of an active settlement instruction, or makes it the default for its currency. To change the currency or type, delete it and create a new one. This route needs no Idempotency-Key.
Api-Key
Path parameters
NameDescription
idID of the settlement instruction
Body parameters
NameDescription
is_defaultaccount_nameaccount_numberbank_namebank_coderouting_numberswift_codeibancountryaddresswallet_addressnetworkmemoResponse
Returns 200 OK. The updated settlement instruction
NameDescription
dataA settlement instruction. The response leaves out empty fields.
Show 23 child attributesobject
idUse it as an FX order
destination.idtenant_idtypeThe same value as instruction_type
Possible values: bank_account, crypto_wallet
instruction_typeSend it in lower case, exactly as listed
Possible values: bank_account, crypto_wallet
account_namecurrencyis_defaultstatusAlways active; the API does not return deleted instructions
Possible values: active
account_numberbank_namebank_coderouting_numberswift_codeibancountryaddresswallet_addressnetworkmemocreated_atupdated_atdate_createddate_updatederrorErrors
| Status | Meaning |
|---|---|
| 200 | The updated settlement instruction |
| 400 | Invalid request, an unknown or deleted ID, or a failure. Not-found is a 400 here, not a 404. |
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request PATCH \
--url 'https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e' \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"account_name": "Acme Treasury Operating",
"is_default": true
}'
const response = await fetch('https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e', {
method: 'PATCH',
headers: {
'Api-Key': '<api-key>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"account_name": "Acme Treasury Operating",
"is_default": true
}),
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e"
headers = {
"Api-Key": "<api-key>",
}
payload = {
"account_name": "Acme Treasury Operating",
"is_default": True,
}
response = requests.patch(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"account_name": "Acme Treasury Operating",
"is_default": true
}`)
req, err := http.NewRequest("PATCH", "https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Api-Key", "<api-key>")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "json"
require "net/http"
require "uri"
uri = URI("https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Patch.new(uri)
request["Api-Key"] = "<api-key>"
request["Content-Type"] = "application/json"
request.body = JSON.generate({
"account_name" => "Acme Treasury Operating",
"is_default" => true,
})
response = http.request(request)
puts response.code
puts response.body
<?php
$payload = [
'account_name' => 'Acme Treasury Operating',
'is_default' => true,
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e',
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Api-Key: <api-key>',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String payload = """
{
"account_name": "Acme Treasury Operating",
"is_default": true
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e"))
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.gravv.xyz/v1/settlement-instructions/b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e");
request.Headers.TryAddWithoutValidation("Api-Key", "<api-key>");
request.Content = new StringContent(
"""
{
"account_name": "Acme Treasury Operating",
"is_default": true
}
""",
Encoding.UTF8,
"application/json");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
200400OK
{
"data": {
"id": "b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e",
"tenant_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "bank_account",
"instruction_type": "bank_account",
"account_name": "Acme Treasury LLC",
"currency": "USD",
"is_default": true,
"status": "active",
"account_number": "string",
"bank_name": "string",
"bank_code": "string",
"routing_number": "string",
"swift_code": "string",
"iban": "string",
"country": "string",
"address": {},
"wallet_address": "string",
"network": "string",
"memo": "string",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"date_created": "2026-01-01T00:00:00Z",
"date_updated": "2026-01-01T00:00:00Z"
},
"error": {}
}
{
"data": null,
"error": "settlement instruction b7e1c2d3-4f5a-4b6c-9d8e-7f6a5b4c3d2e: resource not found",
"code": "ERROR_CODE_NOT_FOUND"
}