Skip to main content
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"
}
EOF
{
  "endpoint": "https://api.piedpiper.com/customer-data",
  "headers": {
    "Authorization": "Bearer token123"
  },
  "template": "<div>{{ customer.name }}</div>",
  "test_email": "test@customer.com",
  "is_enabled": true
}
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

X-API-Key
string
header
required

Authenticate your account by including your secret key in API requests. You can manage your API keys in the Dashboard.

Authentication to the API is performed by using the HTTP Header X-API-Key.

Body

application/json
endpoint
string<uri>

API endpoint URL (must use HTTPS in production).

Maximum string length: 250
Example:

"https://api.piedpiper.com/customer-data"

headers
object

Custom HTTP headers (max 4096 chars when serialized).

Example:
{
"Authorization": "Bearer token123",
"X-API-Key": "key456"
}
template
string

Jinja2 template for rendering (set to empty string to clear).

Maximum string length: 25000
Example:

"<div class='customer'><h2>{{ customer.name }}</h2><p>{{ customer.email }}</p></div>"

test_email
string<email>

Test email for template validation (set to empty string to clear).

Example:

"test@customer.com"

Response

Custom data configuration updated successfully.

endpoint
string<uri>
Example:

"https://api.piedpiper.com/customer-data"

headers
object
Example:
{ "Authorization": "Bearer token123" }
template
string
Example:

"<div>{{ customer.name }}</div>"

test_email
string<email>
Example:

"test@customer.com"

is_enabled
boolean
Example:

true