Delete USER_DEFINED Association By Id, deleting an association will also all the relations for that association
http
DELETE https://services.leadconnectorhq.com/associations/{associationId}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 |
|---|---|---|---|---|
associationId | string | Yes |
Responses
200 - Successful response
deleted(boolean, required): Deletion status Example:Trueid(string, required): Association Id Example:6d6f6e676f5f6576656e7473message(string, required): Example:Association deleted successfully
json
{
"deleted": true,
"id": "6d6f6e676f5f6576656e7473",
"message": "Association deleted successfully"
}400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X DELETE 'https://services.leadconnectorhq.com/associations/YOUR_associationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/associations/YOUR_associationId', {
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/associations/YOUR_associationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/associations/YOUR_associationId');
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);