With the new release of the lead schema, you will have to initalize, and save your API request before you go to use the API. If you recieved the error:
{
"error": "Please choose which fields you want to import and which fields are required using the API import page: https://app.pitchlane.com/campaigns/<campaign_id>/import/api"
}
Following this guide is the correct way to address and fix it.
The Endpoint
The API endpoint is the specific URL where an application sends requests to access a resource on a server. It acts as a gateway between your app and the external service or data you're trying to use. Each endpoint typically corresponds to a specific function or data set—for example, retrieving user details or submitting a form.
The Method
The API method (POST) is used to send data to a server to create or update a resource. Unlike a GET request, which only retrieves data, a POST request submits information—like a form submission or new record—and often results in a change on the server, such as adding something to a database.
The Headers
The headers in an API request are key-value pairs that provide important metadata about the request. In the case of the Pitchlane API, the header is used to pass your API key for authentication. You'll use the header x-api-key
, and set its value to the specific API key you want to use. This tells the server who you are and what you're authorized to access.
The Body
The body of an API request contains the actual data being sent to the server, usually in JSON format. It's typically used with methods like POST or PUT, where you're creating or updating resources—for example, submitting form data, user information, or a file.
Campaign Fields
Campaign Fields are the custom inputs that you define when sending data to the Pitchlane API—especially when you're using tools like Clay or Zapier. These fields let you decide what each piece of data should be called in the API request.
When you fill in the field names (e.g., "final website", "custom thing") on this page, those exact names are inserted into the JSON under the videos
array in the API request body.
So if you're using a platform like Clay or Zapier, you're essentially mapping your data source fields to the field names you define here. The values from your automation will then populate into the corresponding fields in the API request.
Example:
If you enter:
final website
as the field name
custom thing
as another field name
The API request body will look like this:
json
{
"videos": [
{
"final website": "data_goes_here",
"custom thing": "data_goes_here"
}
],
"queueAllVideosForRender": true
}
Duplicate Handling
Duplicate Handling helps prevent sending the same contact through your campaign more than once. You can choose how Pitchlane detects duplicates by selecting which field it should check against.
You can base duplicate detection on:
First Name
Last Name
Company Name
Or any custom field you’ve added (like a unique ID)
When a new record is sent via the API, Pitchlane will compare the selected field(s) to existing entries. If a match is found, the new entry will be skipped to avoid duplication.
Example:
If you set Duplicate Handling to check "Email" and a contact with that email has already been processed, the system will ignore the new request for that email.
This is especially useful when sending large volumes of contacts through automations like Clay or Zapier, where the risk of reprocessing the same person can be high.
Hit Save!
And now you’re ready to go!
You can get an example API payload in another way using the schema API endpoint found in the API docs!