The campaigns API allows you to query a list of all the fields defined on a specific campaign. Either a "limited" or "full access" API key can be used for these API calls (see the overview for more about API keys).
This resource lists the fields in the given campaign, including essential information about each one (see example response, below).
This resource will return the valid, acceptable values for the given field, if it's a "Text - List" field that provides those options. Requesting select options for other field types, such as "Email", will return an empty JSON array.
The campaign fields API accepts no parameters.
Issuing a request to the campaigns API returns a JSON data structure with 2 keys:
- count — the number of fields returned
- items — the details of each field. Each item represents a field. The variant attribute describes the field type: FirstName, LastName, Email, Phone, StreetAddress, City, State, ZipCode, Date, etc.
An example request: