View Categories

Delete Real Estate

1 min read

The chat.smarterbot.ai API provides functionality to delete one or more real estate listings by sending a POST request to the /chat/Chatbot/RealEstateDelete endpoint.

Endpoint #

Request URL: https://chat.smarterbot.ai/chat/Chatbot/RealEstateDelete

Method: POST

Request Headers #

The API request must include the following headers:

  • Authorization: <Your-Secret-Key> – string, required – The secret key for authenticating the API request
  • Content-Type: application/json – string, required – The content type of the request payload (must be application/json)

Request Body #

The request body should contain the following parameters:

{
// string, required - The ID of the chatbot (found on the chatbot settings -> general -> chatbot ID)
"SerialNumber": "3254a9d0424c4806b9ea3d0763xxxxxx",
// array, required - Array of property identifiers to delete
"Keys": [
"PROP123456",
"PROP789012"
],
// string, required - Must be one of: [NewOaks, MLSNumber, URL]
"KeyType": "NewOaks"
}
  • SerialNumber – string, required – The ID of the chatbot (found on the chatbot settings -> general -> chatbot ID)
  • Keys – array, required – Array of property identifiers to delete
  • KeyType – string, required – Must be one of: [NewOaks, MLSNumber, URL]

Example Request #

JavaScript (Fetch API) #

const res = await fetch('https://chat.smarterbot.ai/chat/Chatbot/RealEstateDelete', {
method: 'POST',
headers: {
"chatrobot-sessionkey": "<Your-Session-Key>"
},
body: JSON.stringify({
"SerialNumber": "3254a9d0424c4806b9ea3d0763xxxxxx",
"Keys": [
"PROP123456"
],
"KeyType": "NewOaks"
})
});

const data = await res.json();
console.log(data);

Python (Requests Library) #

import requests
import json

url = 'https://chat.smarterbot.ai/chat/Chatbot/RealEstateDelete'
headers = {
"chatrobot-sessionkey": "<Your-Session-Key>"
}
data = {
"SerialNumber": "3254a9d0424c4806b9ea3d0763xxxxxx",
"Keys": [
"PROP123456"
],
"KeyType": "NewOaks"
}

response = requests.post(url, headers=headers, json=data)
data = response.json()
print(data)

cURL #

curl 'https://chat.smarterbot.ai/chat/Chatbot/RealEstateDelete' \
-X POST \
-H 'chatrobot-sessionkey: <Your-Session-Key>' \
-d '{"SerialNumber":"3254a9d0424c4806b9ea3d0763xxxxxx","Keys":["PROP123456"],"KeyType":"NewOaks"}'

HTTP Request #

POST /chat/Chatbot/RealEstateDelete HTTP/1.1
Host: chat.smarterbot.ai
chatrobot-sessionkey: <Your-Session-Key>

{
"SerialNumber": "3254a9d0424c4806b9ea3d0763xxxxxx",
"Keys": [
"PROP123456"
],
"KeyType": "NewOaks"
}

Response #

The API response will be a JSON object with the following structure:

{
// object - The deletion result
"Data": {
"SuccessCount": 1
},
// string - API version
"Version": "1.0.0",
// boolean - Operation success status
"Success": true,
// integer - HTTP status code
"Code": 200,
// string - Error message if any
"Message": ""
}

Error Handling #

If the request fails, you should: 1. Check the HTTP status code for network-level errors 2. Examine the `Code` and `Message` fields in the response for business-level errors 3. The `Message` field will contain detailed error information

Leave a Reply

Your email address will not be published. Required fields are marked *