Skip to main content
GET
/
v2
/
fields
List Fields
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

X-API-Key
string
header
required

Your Conversion API key. Found in Settings > Integrations in the dashboard. Format: sk_live_<key_id>_<secret>.

Query Parameters

objectType
enum<string>

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.

Available options:
CONTACT,
COMPANY,
OPPORTUNITY,
CAMPAIGN_MEMBER
limit
integer
default:50

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.

Required range: 1 <= x <= 100
cursor
string

The 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.

Response

Field schemas retrieved successfully.

data
object
pagination
object