Add New Leads

Use this API call to add new leads to Shape from a singular API call. We also support unique posting URLs

POST /add/new/lead

To create a new lead, send an authorized POST request to https://secure-api.setshape.com/api/add/new/lead

Parameters

Create leads in Shape with first name, last name, and email address + additional desired field names in the request body. To get a list of supported field names, please see the section below titled “How to Get Field Names.”

  • firstname

    The lead's first name is required to bulk import. Missing required fields may result in a failed API call response.

  • lastname

    The lead's last name is required to bulk import. Missing required fields may result in a failed API call response.

  • email

    The lead's email address is required to bulk import. Missing required fields may result in a failed API call response.

  • source

    Lead origination source Ex: LeadPops. If no source exists, one will be created in the “Marketing Sources” settings page.

  • recordtype

    The record type is required when source is not provided. Record types can be fetched from the API call /api/get/lead/types

  • Your Field Mappings*

    Find the available field mappings within the "Marketing Sources" settings page. Use the "Field Name" exactly as it appears in the field name column. If you'd like to send in custom field values, first create custom fields within your system and the custom mappings will automatically appear in your system's available field mappings.

Request Header

The authentication token must be passed in the request header for every API request. You can find and generate your authentication token in your system settings page under “API Integrations.”

Request Body

JSON request body formatting example:

{

     “firstname”: “John”,

     “lastname”: “Doe”,

     “phone”: “5555555555”,

     “email”: “johndoe@gmail.com”,

     “source”: “Website”

}

Response

Upon success, the server returns HTTP codes and messages in the header with some additional elements and properties that are set by the server, such as id.

{

     “message”: “Record successfully received.”,

     “recordId”: 123,     

     “systemId”: 6397

}

How to Get Field Names

Field names can be found within your CRM System’s settings pages under: Settings > Marketing Sources > Edit Any Marketing Source > Campaign Source Post URL Instructions.

After navigating to the marketing sources settings page and opening up a campaign, scroll to the bottom of the page to the “Campaign Source Post URL Instructions” section. Here, you will find a searchable table with a breakdown of all of the field names available for use. These field names can also be exported to a CSV via the “Export” dropdown.