Delete Record By Id . Supported Objects are business and custom objects.
http
DELETE https://services.leadconnectorhq.com/objects/{schemaKey}/records/{id}Authorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Path parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
schemaKey | string | Yes | custom_objects.pet or business.email (for company's email) | The key of the Custom Object / Standard Object Schema. For custom objects, the key must include the “custom_objects.” prefix, while standard objects use their respective object keys. This information is available on the Custom Objects Details page under Settings. |
id | string | Yes | 632c34b4c9b7da3358ac9891 | id of the record to be updated. Available on the Record details page under the 3 dots or in the url |
Responses
200 - Successful response
id(string): id of the deleted object Example:661c06b4ffde146bdb469442success(boolean): boolean that defines if the operation was a success or not Example:True
json
{
"id": "661c06b4ffde146bdb469442",
"success": true
}400 - Bad Request
json
{}Example
curl -X DELETE 'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);