curl --request GET \
--url https://pub-api.conversion.ai/api/v2/fields \
--header 'X-API-Key: <api-key>'import requests
url = "https://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/fields")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pub-api.conversion.ai/api/v2/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{
"data": {
"fields": [
{
"key": "first_name",
"label": "First Name",
"objectType": "CONTACT",
"dataType": "STRING",
"readOnly": false
},
{
"key": "annual_revenue",
"label": "Annual Revenue",
"objectType": "COMPANY",
"dataType": "NUMBER",
"readOnly": false
}
]
},
"pagination": {
"nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwWiJ9"
}
}List Fields
List field definitions, including IDs, keys, data types, and relationship metadata. With no filters, returns standard-object fields. Pass customObjectId to list fields for one custom object. Requires field view permission and view access to that custom object.
Pass pagination.nextCursor as cursor for the next page. A null cursor means there are no more results.
curl --request GET \
--url https://pub-api.conversion.ai/api/v2/fields \
--header 'X-API-Key: <api-key>'import requests
url = "https://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/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://pub-api.conversion.ai/api/v2/fields")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pub-api.conversion.ai/api/v2/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{
"data": {
"fields": [
{
"key": "first_name",
"label": "First Name",
"objectType": "CONTACT",
"dataType": "STRING",
"readOnly": false
},
{
"key": "annual_revenue",
"label": "Annual Revenue",
"objectType": "COMPANY",
"dataType": "NUMBER",
"readOnly": false
}
]
},
"pagination": {
"nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwWiJ9"
}
}Authorizations
Your Conversion API key. Found in Settings > Integrations in the dashboard. Format: sk_live_<key_id>_<secret>.
Query Parameters
Optional object type, case-insensitive. CUSTOM_OBJECT requires customObjectId.
CONTACT, COMPANY, OPPORTUNITY, CAMPAIGN, CAMPAIGN_MEMBER, CUSTOM_OBJECT List fields for this custom object. Omit objectType or use CUSTOM_OBJECT.
The maximum number of fields to return per page. Defaults to 50. Values are clamped to the range [1, 100] rather than rejected; values above 100 return 100 results.
1 <= x <= 100The opaque pagination cursor returned as pagination.nextCursor by a previous call. Omit to fetch the first page. An invalid or malformed cursor returns an invalid_cursor error.
Was this page helpful?