Create a single record in Shape. To add many at once, use Bulk Import Records.
{crmid} with your CRM ID, the Shape system ID that belongs to your API key. Send the standard headers on every request: Authorization: YOUR_API_AUTHORIZATION_KEY and Content-Type: application/json. See Authentication.Body parameters
Only firstname, lastname and email are required. Add any other fields your system supports using their exact field names.
| Field | Requirement | Description |
|---|---|---|
firstname |
Required | First name. |
lastname |
Required | Last name. |
email |
Required | Email address. |
source or leadsource |
Optional | Marketing source. If the named source doesn’t exist, Shape can create it. Defaults to Open Api. |
recordtype |
Optional | Record type; use a value returned by Get Record Types. |
| Your system’s fields | Optional | Any other field, by its exact field name. See Finding field names. |
Duplicate requests
400 {"message": "Duplicate attempts detected with same record data within 15 min"}. If a request failed with a 5xx, search for the record before you retry.Example request
curl --request POST
--url "https://secure-api.setshape.com/api/add/new/lead/YOUR_CRM_ID"
--header "Authorization: YOUR_API_AUTHORIZATION_KEY"
--header "Content-Type: application/json"
--data '{
"firstname": "Jordan",
"lastname": "Sample",
"email": "jordan.sample@example.com",
"phone": "5550100123"
}'
{
"firstname": "Jordan",
"lastname": "Sample",
"email": "jordan.sample@example.com",
"phone": "5550100123"
}
Example response
{
"message": "Record successfully received.",
"recordId": 240642,
"systemId": 1360
}
Dropdown fields
Dropdown fields only accept values that already exist as options in Shape. Requests can’t add new options to a dropdown.
On Add Records and Update Record Information, a value that doesn’t match one of the field’s options clears the field.
Send each value exactly as it appears in Shape. Matching ignores upper and lower case, so purchase matches the option Purchase. To see a dropdown’s options, open that field on any record in Shape and check its list.
Writing multiple policies (insurance systems only)
You can write up to five policies to a record in one request. Each policy field ends with a number from 1 to 5, and fields with the same number make up one policy.
| Policy detail | Field name (policy 1) |
|---|---|
| Policy type | pol_policytype1 |
| Carrier name | pol_policyCarrierName1 |
| Premium | pol_policypremium1 |
| Expiration date | pol_policyExpirationDate1 |
| Date won | pol_dateWon1 |
| Number of items | pol_policyNumberOfItems1 |
For policy 2, change the 1 to 2, and so on up to 5. Field names are case-sensitive and their capitalization varies, so copy them exactly. Dates use YYYY-MM-DD. Send the policy type and carrier name exactly as they appear in Shape; you’ll find the options in the Policy Type and Carrier fields on any record.
{
"lead_id": "493099",
"pol_policytype1": "Auto",
"pol_policyCarrierName1": "Example Insurance Co.",
"pol_policypremium1": "1000",
"pol_policyExpirationDate1": "2027-07-12",
"pol_dateWon1": "2026-07-12",
"pol_policyNumberOfItems1": "2",
"pol_policytype2": "Home",
"pol_policyCarrierName2": "Example Insurance Co.",
"pol_policypremium2": "1500",
"pol_policyExpirationDate2": "2027-07-05"
}
{delete} doesn’t remove a policy. To change or remove a policy, edit it in Shape.Linking partners and agents
To link a referral partner, buying agent or selling agent, see Link Referral Partners and Agents.
Finding field names
Field names come from your Marketing Sources settings. See Finding field names on the Introduction for the steps.