curl --request PATCH \
--url https://api2.endstate.io/v1/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_redirect_url": "https://brand.example"
}
'import requests
url = "https://api2.endstate.io/v1/settings"
payload = { "default_redirect_url": "https://brand.example" }
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({default_redirect_url: 'https://brand.example'})
};
fetch('https://api2.endstate.io/v1/settings', 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://api2.endstate.io/v1/settings",
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([
'default_redirect_url' => 'https://brand.example'
]),
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://api2.endstate.io/v1/settings"
payload := strings.NewReader("{\n \"default_redirect_url\": \"https://brand.example\"\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://api2.endstate.io/v1/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_redirect_url\": \"https://brand.example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.endstate.io/v1/settings")
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 \"default_redirect_url\": \"https://brand.example\"\n}"
response = http.request(request)
puts response.read_body{
"default_redirect_url": "https://brand.example",
"default_chain_id": 84532,
"allowed_chain_ids": [
84532
]
}{
"error": {
"code": "validation.failed",
"message": "The request failed schema validation. See `error.details` for per-field issues.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/validation-failed"
}
}{
"error": {
"code": "auth.unauthorized",
"message": "Credential is missing or malformed.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-unauthorized"
}
}{
"error": {
"code": "auth.forbidden",
"message": "Credential is valid but does not have access to the requested resource or action.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-forbidden"
}
}{
"error": {
"code": "environment.invalid_configuration",
"message": "The environment configuration is invalid. Contact support before retrying.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/environment-invalid-configuration"
}
}{
"error": {
"code": "internal.error",
"message": "An unexpected server error occurred. Retry with exponential backoff and include `request_id` in any support request.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/internal-error"
}
}Update org settings
Sets the org-wide default tap redirect URL. Send null to clear. Network settings are read-only and returned for reference.
curl --request PATCH \
--url https://api2.endstate.io/v1/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_redirect_url": "https://brand.example"
}
'import requests
url = "https://api2.endstate.io/v1/settings"
payload = { "default_redirect_url": "https://brand.example" }
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({default_redirect_url: 'https://brand.example'})
};
fetch('https://api2.endstate.io/v1/settings', 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://api2.endstate.io/v1/settings",
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([
'default_redirect_url' => 'https://brand.example'
]),
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://api2.endstate.io/v1/settings"
payload := strings.NewReader("{\n \"default_redirect_url\": \"https://brand.example\"\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://api2.endstate.io/v1/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_redirect_url\": \"https://brand.example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api2.endstate.io/v1/settings")
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 \"default_redirect_url\": \"https://brand.example\"\n}"
response = http.request(request)
puts response.read_body{
"default_redirect_url": "https://brand.example",
"default_chain_id": 84532,
"allowed_chain_ids": [
84532
]
}{
"error": {
"code": "validation.failed",
"message": "The request failed schema validation. See `error.details` for per-field issues.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/validation-failed"
}
}{
"error": {
"code": "auth.unauthorized",
"message": "Credential is missing or malformed.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-unauthorized"
}
}{
"error": {
"code": "auth.forbidden",
"message": "Credential is valid but does not have access to the requested resource or action.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/auth-forbidden"
}
}{
"error": {
"code": "environment.invalid_configuration",
"message": "The environment configuration is invalid. Contact support before retrying.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/environment-invalid-configuration"
}
}{
"error": {
"code": "internal.error",
"message": "An unexpected server error occurred. Retry with exponential backoff and include `request_id` in any support request.",
"request_id": "req_8e1a7f50-90ab-4cde-f012-3456789abcde",
"doc_url": "https://docs.endstate.io/errors/internal-error"
}
}Authorizations
Use Authorization: Bearer end_sk_* for partner API keys (e.g. end_sk_AbCd_example_api_key).
Body
Org-wide default tap redirect URL, used only when no unit, product, or collection redirect applies. Send null to clear.
"https://brand.example"
Response
The updated org settings.
Org-wide default tap redirect URL, used only when no unit, product, or collection redirect applies.
"https://brand.example"
Identifier of your organization's default network - the network collections are created on when chain_id is omitted. null when no default network is configured for your organization. Read-only; configured by Endstate.
84532
Network identifiers enabled for your organization. An explicit chain_id on collection create must be one of these values. Read-only; configured by Endstate.
[84532]

