Skip to main content
Deletes an agent and all its versions.
DELETE https://services.leadconnectorhq.com/agent-studio/agent/{agentId}

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

agentId
string
default:"p1q2r3s4t5u6v7w8x9y0z1a2"
required

Query parameters

locationId
string
default:"C2QujeCh8ZnC7al2InWR"
required
source
string
default:"api"

Respuestas

success
boolean
default:"True"
required
Success status
message
string
default:"Agent deleted successfully"
required
Response message
agentId
string
default:"p1q2r3s4t5u6v7w8x9y0z1a2"
Deleted agent ID
{
  "success": true,
  "message": "Agent deleted successfully",
  "agentId": "p1q2r3s4t5u6v7w8x9y0z1a2"
}
{}
{}
{}
statusCode
number
default:"500"
message
string
default:"Internal Server Error"
{
  "statusCode": 500,
  "message": "Internal Server Error"
}

Ejemplo

curl -X DELETE 'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId', {
  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/agent-studio/agent/YOUR_agentId',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
    },
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId');
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);