Delete an open support ticket created by the authenticated user.
POST /tickets/delete
This endpoint permanently deletes an open support ticket. Only tickets that are open (Status = false) and created by the authenticated user can be deleted.
This endpoint requires Bearer token authentication via the Authorization header.
| Parameter | Type | Required | Description |
|---|---|---|---|
CaseId |
String | Yes | 7-digit case number of the ticket to delete |
curl -X POST "https://api-v3.sweeppea.com/tickets/delete" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"CaseId": "2531581"
}'const response = await fetch('https://api-v3.sweeppea.com/tickets/delete', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
CaseId: '2531581'
})
});
const data = await response.json();
console.log(data);import requests
url = "https://api-v3.sweeppea.com/tickets/delete"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"CaseId": "2531581"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())200 OK
{
"Response": true,
"Message": "Ticket Deleted Successfully"
}400 Bad Request
{
"Response": false,
"Message": "Missing Required Field: CaseId is required",
"Code": 400
}401 Unauthorized
{
"Response": false,
"Message": "Invalid or Missing Bearer Token",
"Code": 401
}403 Forbidden
{
"Response": false,
"Message": "Invalid API Token",
"Code": 403
}404 Not Found
{
"Response": false,
"Message": "Ticket Not Found, Already Closed, or Not Owned by User",
"Code": 404
}500 Internal Server Error
{
"Response": false,
"Message": "Internal Server Error",
"Code": 500
}- Only open tickets (Status = false) can be deleted. Closed tickets cannot be deleted.
- The ticket must have been created by the authenticated user. Tickets owned by other users will return a 404.
- This operation is permanent and cannot be undone.