Skip to main content
GET
/
api
/
custom-fields
Get Custom Fields
curl --request GET \
  --url https://api.automatechats.com/api/custom-fields \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.automatechats.com/api/custom-fields"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.automatechats.com/api/custom-fields', 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.automatechats.com/api/custom-fields",
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-API-Key: <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.automatechats.com/api/custom-fields"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<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.automatechats.com/api/custom-fields")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.automatechats.com/api/custom-fields")

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

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "data": [
    {
      "id": "65f12ab3c9e4f1a2b3c4d5e6",
      "name": "Company Name",
      "type": "text",
      "createdBy": "6996aeeedf12574080a99d81",
      "createdAt": "2026-05-18T15:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 25,
    "totalPages": 3
  }
}
{
"status": "error",
"code": 401,
"message": "Unauthorized access: Invalid or missing authentication credentials.",
"timestamp": "2026-05-18T15:00:00.000Z"
}
Use this endpoint to retrieve all custom fields configured in your workspace. The returned custom field IDs are required when updating a contact’s custom data.

Authorizations

X-API-Key
string
header
required

Query Parameters

page
integer
default:1

Page number for pagination (min: 1)

Required range: x >= 1
limit
integer
default:10

Number of custom fields per page (min: 1, max: 100)

Required range: 1 <= x <= 100

Search term to filter custom fields by name

createdBy
string

Filter custom fields by the ID of the user who created them

Response

Custom fields retrieved successfully

status
string
Example:

"success"

data
object[]
pagination
object