Updating a Lead
Introduction
The following fields can be updated for a Lead:
- Status
- ExternalID
- Content
Basics
A valid Bearer token must be passed in for Authorization, as outlined in the Authentication section.
To update one of the above fields for a Lead, send a PATCH request to the following endpoint- https://api.powerchord.com/v3/lead/{leadID} replacing < leadID > with a valid leadID.
Example Request
Replace < trunkID > with the trunk (brand) organization’s ID.
US Endpoint
PATCH https://api.powerchord.com/v3/lead/< leadID >
EU Endpoint
PATCH https://api.powerchord.eu/v3/lead/< leadID >
Replace < leadID > with the ID of the locator settings that will be used to assign an organization to the lead.
Updating the Status
The Status will be the most common update to a lead.
Leads in Command Center have a Status, that changes throughout the lifecycle of a Lead. For instance, a Lead will start out with a Status of new, and will end in one of the closed variants, such as Closed | Won.
Add the updated Status of the lead within a valid json body; see the following example:
{ "Status": "contacted" // status key }
Lead status key values
The following table includes lead status key values that are accepted.
| Status Label | Status Key |
|---|---|
| New | open |
| Contact Attempted | contacted |
| In Progress | inProgress |
| On Hold | onHold |
| Closed | Won | closedWon |
| Closed | Not Interested | closedNotInterested |
| Closed | Bought Used | closedBoughtUsed |
| Closed | Bought Other Brand | closedBoughtOtherBrand |
Other requests for update
ExternalID and Content are the other two fields that can be updated.
ExternalID: link an external id from a 3rd party system.
Content: an object or key/value pairs of 3rd party data. If the key within the object is not already present, then the new key/value will be added to the object and saved within the column. If the key is present, the value will be overwritten for said key.
Example Body Request
{
"ExternalID": "some-id-here",
"Content": {
"name": "Mr Test",
"email": "test@testing.com"
}
}
Example Response
200 OK
{
"ID": "e8af54d2-3dcc-4443-8cb7-2ad0520b4d7b",
"ReadOnly": false,
"CreatedAt": "2024-05-07T12:05:09.05647Z",
"UpdatedAt": "2024-05-21T13:33:37.245006Z",
"OwnerID": "00000000-641c-58ae-64a9-3200016dde67",
"Content": {
"email": "qatesting@pc.com",
"message": "QA Testing message: à, è, ì, ò, ù - À, È, Ì, Ò, Ù",
"name": "John Smith",
"phone": "8675309",
"postalCode": "90210"
},
"Impressions": 0,
"IsTestLead": false,
"Location": {
"Name": "",
"Address": ""
},
"RequestMeta": {
"ContentType": "application/json",
"Host": "leads.powerchord.com",
"IP": "10.230.15.220",
"Locale": "fr",
"URL": "https://leads.powerchord.com/v1/64120b6902845f00018eb802",
"UserAgent": "PostmanRuntime/7.38.0"
},
"Source": "lead-collector",
"Status": "contacted",
"Stage": "lead",
"TypeKey": "contact-us",
"TypeLabel": "contact-us",
"Views": 0,
"ExternalID": "",
"DisplayName": "John Smith"
}
Example cURL command-
curl --location --request PATCH 'https://api.powerchord.com/v3/lead/{leadID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {bearerToken}' \
--data '{
"Status": "open",
"ExternalID": "some-id-here",
"Content": {
"name": "Mr Test",
"email": "test@testing.com"
}
}'
PowerChord Developer