Deletes an agent and all its versions.

http
DELETE https://services.leadconnectorhq.com/agent-studio/agent/{agentId}

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Path parameters

NameTypeRequiredExampleDescription
agentIdstringYesp1q2r3s4t5u6v7w8x9y0z1a2

Query parameters

NameTypeRequiredExampleDescription
locationIdstringYesC2QujeCh8ZnC7al2InWR
sourcestringNoapi

Responses

200 - Agent deleted successfully
  • success (boolean, required): Success status Example: True

  • message (string, required): Response message Example: Agent deleted successfully

  • agentId (string): Deleted agent ID Example: p1q2r3s4t5u6v7w8x9y0z1a2

json
{
  "success": true,
  "message": "Agent deleted successfully",
  "agentId": "p1q2r3s4t5u6v7w8x9y0z1a2"
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
404 - Agent not found
422 - Unprocessable Entity
json
{}
500 - Internal Server Error
  • statusCode (number): Example: 500

  • message (string): Example: Internal Server Error

json
{
  "statusCode": 500,
  "message": "Internal Server Error"
}

Example

curl -X DELETE 'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'

Last updated October 26, 2026

Was this page helpful?