Update custom data configuration
curl --request PATCH \
--url https://api.getfernand.com/organization/custom-data \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data @- <<EOF
{
"endpoint": "https://api.piedpiper.com/customer-data",
"headers": {
"Authorization": "Bearer token123",
"X-API-Key": "key456"
},
"template": "<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>",
"test_email": "test@customer.com"
}
EOFimport requests
url = "https://api.getfernand.com/organization/custom-data"
payload = {
"endpoint": "https://api.piedpiper.com/customer-data",
"headers": {
"Authorization": "Bearer token123",
"X-API-Key": "key456"
},
"template": "<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>",
"test_email": "test@customer.com"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endpoint: 'https://api.piedpiper.com/customer-data',
headers: {Authorization: 'Bearer token123', 'X-API-Key': 'key456'},
template: '<div class=\'customer\'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>',
test_email: 'test@customer.com'
})
};
fetch('https://api.getfernand.com/organization/custom-data', 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.getfernand.com/organization/custom-data",
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([
'endpoint' => 'https://api.piedpiper.com/customer-data',
'headers' => [
'Authorization' => 'Bearer token123',
'X-API-Key' => 'key456'
],
'template' => '<div class=\'customer\'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>',
'test_email' => 'test@customer.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.getfernand.com/organization/custom-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getfernand.com/organization/custom-data"
payload := strings.NewReader("{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}using RestSharp;
var options = new RestClientOptions("https://api.getfernand.com/organization/custom-data");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
request.AddJsonBody("{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);HttpResponse<String> response = Unirest.patch("https://api.getfernand.com/organization/custom-data")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}")
.asString();{
"endpoint": "https://api.piedpiper.com/customer-data",
"headers": {
"Authorization": "Bearer token123"
},
"template": "<div>{{ customer.name }}</div>",
"test_email": "test@customer.com",
"is_enabled": true
}{
"error": "<string>"
}Update custom data configuration
PATCH
/
organization
/
custom-data
Update custom data configuration
curl --request PATCH \
--url https://api.getfernand.com/organization/custom-data \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data @- <<EOF
{
"endpoint": "https://api.piedpiper.com/customer-data",
"headers": {
"Authorization": "Bearer token123",
"X-API-Key": "key456"
},
"template": "<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>",
"test_email": "test@customer.com"
}
EOFimport requests
url = "https://api.getfernand.com/organization/custom-data"
payload = {
"endpoint": "https://api.piedpiper.com/customer-data",
"headers": {
"Authorization": "Bearer token123",
"X-API-Key": "key456"
},
"template": "<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>",
"test_email": "test@customer.com"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endpoint: 'https://api.piedpiper.com/customer-data',
headers: {Authorization: 'Bearer token123', 'X-API-Key': 'key456'},
template: '<div class=\'customer\'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>',
test_email: 'test@customer.com'
})
};
fetch('https://api.getfernand.com/organization/custom-data', 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.getfernand.com/organization/custom-data",
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([
'endpoint' => 'https://api.piedpiper.com/customer-data',
'headers' => [
'Authorization' => 'Bearer token123',
'X-API-Key' => 'key456'
],
'template' => '<div class=\'customer\'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>',
'test_email' => 'test@customer.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.getfernand.com/organization/custom-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getfernand.com/organization/custom-data"
payload := strings.NewReader("{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}using RestSharp;
var options = new RestClientOptions("https://api.getfernand.com/organization/custom-data");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
request.AddJsonBody("{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);HttpResponse<String> response = Unirest.patch("https://api.getfernand.com/organization/custom-data")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"endpoint\": \"https://api.piedpiper.com/customer-data\",\n \"headers\": {\n \"Authorization\": \"Bearer token123\",\n \"X-API-Key\": \"key456\"\n },\n \"template\": \"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>\",\n \"test_email\": \"test@customer.com\"\n}")
.asString();{
"endpoint": "https://api.piedpiper.com/customer-data",
"headers": {
"Authorization": "Bearer token123"
},
"template": "<div>{{ customer.name }}</div>",
"test_email": "test@customer.com",
"is_enabled": true
}{
"error": "<string>"
}Updates the custom data settings. The template is validated for security (no includes, imports, or macros allowed) and HTML safety. Setting a new endpoint automatically disables the panel until template validation passes.
Authorizations
Body
application/json
API endpoint URL (must use HTTPS in production).
Maximum string length:
250Example:
"https://api.piedpiper.com/customer-data"
Custom HTTP headers (max 4096 chars when serialized).
Show child attributes
Show child attributes
Example:
{
"Authorization": "Bearer token123",
"X-API-Key": "key456"
}Jinja2 template for rendering (set to empty string to clear).
Maximum string length:
25000Example:
"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>"
Test email for template validation (set to empty string to clear).
Example:
"test@customer.com"
Response
Custom data configuration updated successfully.
Was this page helpful?
⌘I