curl --request POST \
--url https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowed_redirect_urls": [
"https://myapp.example.com/cb",
"https://dcp-staging.d.atrvd.com/"
]
}
'import requests
url = "https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls"
payload = { "allowed_redirect_urls": ["https://myapp.example.com/cb", "https://dcp-staging.d.atrvd.com/"] }
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({
allowed_redirect_urls: ['https://myapp.example.com/cb', 'https://dcp-staging.d.atrvd.com/']
})
};
fetch('https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls', 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.ledgersyncappv2.com/v3/settings/redirect-urls",
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([
'allowed_redirect_urls' => [
'https://myapp.example.com/cb',
'https://dcp-staging.d.atrvd.com/'
]
]),
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.ledgersyncappv2.com/v3/settings/redirect-urls"
payload := strings.NewReader("{\n \"allowed_redirect_urls\": [\n \"https://myapp.example.com/cb\",\n \"https://dcp-staging.d.atrvd.com/\"\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-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowed_redirect_urls\": [\n \"https://myapp.example.com/cb\",\n \"https://dcp-staging.d.atrvd.com/\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls")
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 \"allowed_redirect_urls\": [\n \"https://myapp.example.com/cb\",\n \"https://dcp-staging.d.atrvd.com/\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"environment": "sandbox",
"allowed_redirect_urls": [
"https://myapp.example.com/cb"
]
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}Replace the redirect-URL allowlist for the current account + environment
Overwrites the full allowlist (no add/remove primitives, no
half-applied state). Up to 20 entries, each up to 2048 chars.
Every URL must be https://, must have a host, must not include
a userinfo (user:password@) component, and must not resolve to
a private/loopback/link-local/cloud-metadata range.
Sending an empty list stores an empty row, which the runtime
validator treats as deny-all. To remove the row entirely (and
return to the “no allowlist configured” denial shape) call
DELETE /v3/settings/redirect-urls.
curl --request POST \
--url https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowed_redirect_urls": [
"https://myapp.example.com/cb",
"https://dcp-staging.d.atrvd.com/"
]
}
'import requests
url = "https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls"
payload = { "allowed_redirect_urls": ["https://myapp.example.com/cb", "https://dcp-staging.d.atrvd.com/"] }
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({
allowed_redirect_urls: ['https://myapp.example.com/cb', 'https://dcp-staging.d.atrvd.com/']
})
};
fetch('https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls', 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.ledgersyncappv2.com/v3/settings/redirect-urls",
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([
'allowed_redirect_urls' => [
'https://myapp.example.com/cb',
'https://dcp-staging.d.atrvd.com/'
]
]),
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.ledgersyncappv2.com/v3/settings/redirect-urls"
payload := strings.NewReader("{\n \"allowed_redirect_urls\": [\n \"https://myapp.example.com/cb\",\n \"https://dcp-staging.d.atrvd.com/\"\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-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowed_redirect_urls\": [\n \"https://myapp.example.com/cb\",\n \"https://dcp-staging.d.atrvd.com/\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.ledgersyncappv2.com/v3/settings/redirect-urls")
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 \"allowed_redirect_urls\": [\n \"https://myapp.example.com/cb\",\n \"https://dcp-staging.d.atrvd.com/\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"environment": "sandbox",
"allowed_redirect_urls": [
"https://myapp.example.com/cb"
]
}{
"error": {
"code": "unknown_api_key",
"message": "The API key you presented doesn't match any active key.",
"type": "auth_error",
"doc_url": "https://portal.ledgersyncappv2.com/errors/unknown_api_key",
"category": "AUTH_ERROR",
"is_user_actionable": true,
"source_diagnostic_code": "FIN-103",
"param": "client.email",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"errors": [
{
"param": "client.email",
"message": "must be a valid email address",
"code": "invalid_email"
}
]
}
}Authorizations
Pass your secret key in the Authorization header as a Bearer
token: Authorization: Bearer sk_test_... (sandbox) or
Bearer sk_live_... (production).
Keys are created in the developer portal and the plaintext secret is shown exactly once at creation. Treat them like passwords — never embed them in mobile apps or front-end code.
Body
The full set of redirect URLs allowed for this account+environment. Each POST overwrites the previous set; an empty array stores deny-all.
20HTTPS URL with no userinfo component; rejected if it resolves to a private/loopback/cloud-metadata range.
2048