Get all custom fields
curl --request GET \
--url https://api.sendx.io/api/v1/rest/customfield \
--header 'X-Team-ApiKey: <api-key>'import requests
url = "https://api.sendx.io/api/v1/rest/customfield"
headers = {"X-Team-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Team-ApiKey': '<api-key>'}};
fetch('https://api.sendx.io/api/v1/rest/customfield', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.sendx.io/api/v1/rest/customfield"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Team-ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendx.io/api/v1/rest/customfield")
.header("X-Team-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendx.io/api/v1/rest/customfield")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Team-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "custom_field_abc123def456ghi789",
"name": "Account Type",
"type": 0,
"description": "Customer account classification"
},
{
"id": "custom_field_abc123def456ghi783",
"name": "Loyalty Points",
"type": 1,
"description": "Current loyalty program points"
},
{
"id": "custom_field_abc123def456ghi703",
"name": "Last Purchase Date",
"type": 2,
"description": "Date of most recent purchase"
}
]{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Internal server error occurred"
}Custom Field
Get all custom fields
Retrieves all custom fields defined for your team.
GET
/
customfield
Get all custom fields
curl --request GET \
--url https://api.sendx.io/api/v1/rest/customfield \
--header 'X-Team-ApiKey: <api-key>'import requests
url = "https://api.sendx.io/api/v1/rest/customfield"
headers = {"X-Team-ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Team-ApiKey': '<api-key>'}};
fetch('https://api.sendx.io/api/v1/rest/customfield', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.sendx.io/api/v1/rest/customfield"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Team-ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sendx.io/api/v1/rest/customfield")
.header("X-Team-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendx.io/api/v1/rest/customfield")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Team-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "custom_field_abc123def456ghi789",
"name": "Account Type",
"type": 0,
"description": "Customer account classification"
},
{
"id": "custom_field_abc123def456ghi783",
"name": "Loyalty Points",
"type": 1,
"description": "Current loyalty program points"
},
{
"id": "custom_field_abc123def456ghi703",
"name": "Last Purchase Date",
"type": 2,
"description": "Date of most recent purchase"
}
]{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Internal server error occurred"
}📊 Response includes:
- Field ID
- Field name and type
- Description
Authorizations
Team API key for authentication. Find your API key in SendX Settings → Team API Key.
Example:
X-Team-ApiKey: your_team_api_key_here
Query Parameters
Number of fields to skip for pagination
Required range:
x >= 0Maximum number of fields to return
Required range:
1 <= x <= 100Search custom fields by name (case-insensitive partial matching).
Examples:
points- Finds "Loyalty points", "Reward points"
Required string length:
2 - 100Response
✅ Custom fields retrieved successfully
Unique field identifier with custom_field_ prefix
Pattern:
^custom_field_[a-zA-Z0-9]{22}$Example:
"custom_field_abc123def456ghi789"
Custom field name
Example:
"Account Type"
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)
Field description for documentation
Example:
"Customer account classification"
Was this page helpful?