Delete Support Ticket

Delete an open support ticket created by the authenticated user.

POST /tickets/delete

Description

This endpoint permanently deletes an open support ticket. Only tickets that are open (Status = false) and created by the authenticated user can be deleted.

Authentication

This endpoint requires Bearer token authentication via the Authorization header.

Request Body

Field Type Required Description
CaseId String Yes 7-digit case number of the ticket to delete

Code Examples

curl -X POST "https://api-v3.sweeppea.com/tickets/delete" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "CaseId": "2531581" }'

Response

200 OK

{ "Response": true, "Message": "Ticket Deleted Successfully" }

Error Responses

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 }