Delete To-Do
Permanently delete a To-Do item. Admin access required.
POST
https://api-v3.sweeppea.com/tickets/deleteTodo
Description
This endpoint permanently deletes a To-Do item identified by its TodoToken. It is restricted to admin users only. This action cannot be undone — the document is removed from the database immediately upon success.
Authentication & Authorization
🛡️
Admin Only
This endpoint is restricted to administrator accounts. Regular users will receive a 403 Forbidden response.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
TodoToken |
string | ✅ Yes | UUID v4 of the To-Do to delete |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
TodoToken |
String | Yes | UUID v4 of the To-Do to delete |
Code Examples
curl -X POST "https://api-v3.sweeppea.com/tickets/deleteTodo" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"TodoToken": "uuid-v4-string"
}'
const response = await fetch('https://api-v3.sweeppea.com/tickets/deleteTodo', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
TodoToken: 'uuid-v4-string'
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = "https://api-v3.sweeppea.com/tickets/deleteTodo"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"TodoToken": "uuid-v4-string"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.json())
Response
{
"Response": true,
"Message": "To-Do deleted successfully"
}
Error Responses
{
"Response": false,
"Message": "Missing or Invalid TodoToken",
"Code": 400
}
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
"Code": 401
}
{
"Response": false,
"Message": "Admin Access Required",
"Code": 403
}
{
"Response": false,
"Message": "To-Do Not Found",
"Code": 404
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
"Code": 500
}