Skip to main content
Delete Record By Id . Supported Objects are business and custom objects.
DELETE https://services.leadconnectorhq.com/objects/{schemaKey}/records/{id}

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Path parameters

schemaKey
string
required
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
default:"632c34b4c9b7da3358ac9891"
required
id of the record to be updated. Available on the Record details page under the 3 dots or in the url

Respuestas

id
string
default:"661c06b4ffde146bdb469442"
id of the deleted object
success
boolean
default:"True"
boolean that defines if the operation was a success or not
{
  "id": "661c06b4ffde146bdb469442",
  "success": true
}
{}
{}

Ejemplo

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);