Skip to main content
PUT
/
customfield
/
{identifier}
Update custom field
curl --request PUT \
  --url https://api.sendx.io/api/v1/rest/customfield/{identifier} \
  --header 'Content-Type: application/json' \
  --header 'X-Team-ApiKey: <api-key>' \
  --data '
{
  "name": "Customer Tier",
  "description": "Customer segmentation tier (Bronze/Silver/Gold)"
}
'
import requests

url = "https://api.sendx.io/api/v1/rest/customfield/{identifier}"

payload = {
"name": "Customer Tier",
"description": "Customer segmentation tier (Bronze/Silver/Gold)"
}
headers = {
"X-Team-ApiKey": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'X-Team-ApiKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Customer Tier',
description: 'Customer segmentation tier (Bronze/Silver/Gold)'
})
};

fetch('https://api.sendx.io/api/v1/rest/customfield/{identifier}', 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.sendx.io/api/v1/rest/customfield/{identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Customer Tier',
'description' => 'Customer segmentation tier (Bronze/Silver/Gold)'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Team-ApiKey: <api-key>"
],
]);

$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.sendx.io/api/v1/rest/customfield/{identifier}"

payload := strings.NewReader("{\n \"name\": \"Customer Tier\",\n \"description\": \"Customer segmentation tier (Bronze/Silver/Gold)\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("X-Team-ApiKey", "<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))

}
HttpResponse<String> response = Unirest.put("https://api.sendx.io/api/v1/rest/customfield/{identifier}")
.header("X-Team-ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Tier\",\n \"description\": \"Customer segmentation tier (Bronze/Silver/Gold)\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sendx.io/api/v1/rest/customfield/{identifier}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-Team-ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Tier\",\n \"description\": \"Customer segmentation tier (Bronze/Silver/Gold)\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "custom_field_abc123def456ghi789",
  "name": "Account Type",
  "type": 123,
  "description": "Customer account classification"
}
{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}
{
"status": "error",
"message": "Resource with this name already exists"
}
{
"status": "error",
"message": "Resource not found"
}
{
"status": "error",
"message": "Request body is not in proper format"
}
{
"status": "error",
"message": "Internal server error occurred"
}
๐Ÿ”„ Updatable fields:
  • Field name (must remain unique)
  • Description
  • Type
โš ๏ธ Important:
  • Existing data is preserved
  • Name changes reflect in merge tags
  • Updates donโ€™t affect historical data
๐Ÿ’ก Common Updates:
  • Clarify field descriptions
  • Rename for consistency
  • Toggle visibility in forms
  • Enable cross-team sharing

Authorizations

X-Team-ApiKey
string
header
required

Team API key for authentication. Find your API key in SendX Settings โ†’ Team API Key.

Example:

X-Team-ApiKey: your_team_api_key_here

Path Parameters

identifier
string
required

Custom field identifier to update

Pattern: ^(custom_field_)?[a-zA-Z0-9]{22}$

Body

application/json
name
string
required

Custom field name (must be unique within team)

Example:

"Account Type"

type
integer
required

Field data type.

Values:

  • 0 - Text (max 255 characters)
  • 1 - Number (integer or decimal)
  • 2 - Date (YYYY-MM-DD format)
  • 3 - Boolean (true/false)
  • 4 - Phone number (international format)
description
string
required

Field description for documentation

Example:

"Customer account classification"

Response

โœ… Custom field updated successfully

id
string

Unique field identifier with custom_field_ prefix

Pattern: ^custom_field_[a-zA-Z0-9]{22}$
Example:

"custom_field_abc123def456ghi789"

name
string

Custom field name

Example:

"Account Type"

type
integer

Field data type.

Values:

  • 0 - Text (max 255 characters)
  • 1 - Number (integer or decimal)
  • 2 - Date (YYYY-MM-DD format)
  • 3 - Boolean (true/false)
  • 4 - Phone number (international format)
description
string

Field description for documentation

Example:

"Customer account classification"