{
"success": true,
"archived": true
}
{
"error": "Schedule not found",
"code": "not_found"
}
{
"error": "Invalid credentials",
"code": "invalid_credentials"
}
Schedules (v2)
Delete Schedule
Archive a schedule (soft delete). The schedule is not permanently removed.
DELETE
/
v2
/
schedules
/
{id}
{
"success": true,
"archived": true
}
{
"error": "Schedule not found",
"code": "not_found"
}
{
"error": "Invalid credentials",
"code": "invalid_credentials"
}
Soft-delete a schedule by setting its status to
archive. Archived schedules are excluded from the default List Schedules response but can still be retrieved by explicitly filtering with status=archive.
Archiving is reversible: use Update Schedule to set the status back to draft or off.
Path Parameters
string
required
The unique identifier of the schedule to archive.
Response Fields
boolean
true if the schedule was archived successfully.boolean
true confirming the schedule has been moved to archive status.Examples
cURL
curl -X DELETE "https://api.tracklysms.com/api/v2/schedules/6651a3f2e4b0a1c2d3e4f567" \
-H "X-Api-Key: trk_your_api_key_here"
Python
import requests
schedule_id = "6651a3f2e4b0a1c2d3e4f567"
response = requests.delete(
f"https://api.tracklysms.com/api/v2/schedules/{schedule_id}",
headers={"X-Api-Key": "trk_your_api_key_here"},
)
data = response.json()
if data["success"]:
print("Schedule archived successfully.")
Node.js
const scheduleId = "6651a3f2e4b0a1c2d3e4f567";
const response = await fetch(
`https://api.tracklysms.com/api/v2/schedules/${scheduleId}`,
{
method: "DELETE",
headers: {
"X-Api-Key": "trk_your_api_key_here"
}
}
);
const data = await response.json();
if (data.success) {
console.log("Schedule archived successfully.");
}
{
"success": true,
"archived": true
}
{
"error": "Schedule not found",
"code": "not_found"
}
{
"error": "Invalid credentials",
"code": "invalid_credentials"
}
Error Codes
| HTTP Status | Error Code | Description |
|---|---|---|
| 401 | invalid_credentials | API key is missing, invalid, or revoked. |
| 403 | account_suspended | Your account is suspended. Resolve outstanding billing or contact support. |
| 404 | not_found | No schedule exists with the given ID. |
| 409 | schedule_locked | The schedule is inside its execution lock window and cannot be archived until unlocksAt (also included in the response). |
Next Steps
Campaign Scheduling
Learn about scheduling
List Audiences
View audiences