Leads
Creating a lead for a specific organization
This guide explains how to create a lead for a specific organization in Command Center.
This guide assumes that you already have a service account and have authenticated. Please refer to Authentication if you haven't authorized your service account.
Introduction
Leads in Command Center are assigned to an organization, so when you create a lead via API you have two options.
- Option 1: Including the organizationID in the API request that the lead will be created and assigned to. Refer to Creating a lead for a specific organization
- Option 2: Including a locatorID value and locationSearch object in the API request that will assign the lead to an organization using the configurations of the locatorID parameter.
This article goes into depth for Option 1. (Refer to Creating a lead with a location search for option 2)
Create a lead for a specific Organization
In order to create a lead for a specific organization, you need the following to get started:
- trunkID: The ID of the brand (top-level organization)
- content: A Key/Value object of the lead form submission content
- typeKey: Machine-readable key used to categorize the lead.
- typeLabel: Human-readable label used to categorize the lead.
- status: Optionally set the status of the lead. Defaults to
open.
Request to create a lead with organizationID
Example Request
Replace < trunkID > with the trunk (brand) organization’s ID.
US Endpoint
POST https://leads.powerchord.com/v1/< trunkID >
EU Endpoint
POST https://leads.powerchord.eu/v1/< trunkID >
Replace < organizationID > with the ID of the organization the lead is being created for.
{
"organizationID": "< organizationID >",
"content": {
"name": "John Smith",
"email": "john.smith@aol.com",
"phone": "(555) 867-5309",
"postalCode": "90210"
},
"typeKey": "getintouch-example",
"typeLabel": "Get in touch"
}
Example Response
201 Created
{
"leadID": "66b9b508-a3bb-410f-9de0-911a2595c403",
"assignedOrganizationID": "00000000-623b-3502-7f37-a20001a6f4f4",
"assignedLocationName": ""
}
PowerChord Developer