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"
},
{
"key": "annual_revenue",
"label": "Annual Revenue",
"objectType": "COMPANY",
"dataType": "NUMBER"
}
]
},
"pagination": {
"nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwWiJ9"
}
}List Fields
List field schemas (key, label, object type, and value data type). Use this endpoint to discover which field keys are available for use in the fields and companyFields maps of other endpoints. Omit objectType to return fields across all object types.
Results are paginated with an opaque cursor returned as pagination.nextCursor. Pass it back as the cursor query parameter to fetch 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"
},
{
"key": "annual_revenue",
"label": "Annual Revenue",
"objectType": "COMPANY",
"dataType": "NUMBER"
}
]
},
"pagination": {
"nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwWiJ9"
}
}Authorizations
Your Conversion API key. Found in Settings > Integrations in the dashboard. Format: sk_live_<key_id>_<secret>.
Query Parameters
Filter results to a single object type (case-insensitive). Omit to return fields across all object types. An unsupported value returns an invalid_object_type error.
CONTACT, COMPANY, OPPORTUNITY, CAMPAIGN_MEMBER 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?