Delete Classifier
Permanently delete a Classifier from your account. This action cannot be undone. Any future calls to Run Classification using the deleted classifier_id will return a 404 error.
API Endpoint
DELETE https://api.documentpro.ai/v1/classifiers/{classifier_id}
Path Parameters
classifier_id(required): The unique identifier of the Classifier to delete.
Headers
x-api-key(required): Your API key for authentication.
Example Implementation
Using cURL
curl --location --request DELETE 'https://api.documentpro.ai/v1/classifiers/f47ac10b-58cc-4372-a567-0e02b2c3d479' \
--header 'x-api-key: YOUR_API_KEY'
Using Python
import requests
classifier_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
url = f"https://api.documentpro.ai/v1/classifiers/{classifier_id}"
headers = {
'x-api-key': 'YOUR_API_KEY'
}
response = requests.delete(url, headers=headers)
if response.status_code == 200:
print('Classifier deleted successfully')
else:
print('Failed to delete classifier')
print(response.text)
Response
Successful Response (Status Code: 200)
{
"success": true
}
Error Response (Status Codes: 400, 403, 404, 500)
{
"success": false,
"error": "error_code",
"message": "descriptive error message"
}
Next Steps
- Create a new Classifier to replace it.
- List your Classifiers to view remaining classifiers in your account.