{
"success": true,
"archived": true
}
{
"error": "Offer not found",
"code": "not_found"
}
{
"error": "Invalid credentials",
"code": "invalid_credentials"
}
Offers (v2)
Delete Offer
Archive an offer (soft delete). The offer is not permanently removed.
DELETE
/
v2
/
offers
/
{id}
{
"success": true,
"archived": true
}
{
"error": "Offer not found",
"code": "not_found"
}
{
"error": "Invalid credentials",
"code": "invalid_credentials"
}
Soft-deletes an offer by setting its status to
archived. The offer is not permanently removed from the system and can be restored by updating its status back to active or paused via the Update Offer endpoint.
Archived offers are excluded from the default List Offers response unless you explicitly filter by status=archived.
Archiving an offer also changes the active and paused creatives that send it. A creative that also sends another active SMS offer is paused; every other such creative is archived. Restoring the offer does not restore those creatives: set each one back to active with Update Creative.
Path Parameters
Response Fields
Examples
cURL
curl -X DELETE "https://api.tracklysms.com/api/v2/offers/664f1a2b3c4d5e6f7a8b9c0d" \
-H "X-Api-Key: trk_your_api_key_here"
Python
import requests
offer_id = "664f1a2b3c4d5e6f7a8b9c0d"
response = requests.delete(
f"https://api.tracklysms.com/api/v2/offers/{offer_id}",
headers={"X-Api-Key": "trk_your_api_key_here"}
)
data = response.json()
print(data) # {"success": True, "archived": True}
Node.js
const offerId = "664f1a2b3c4d5e6f7a8b9c0d";
const response = await fetch(
`https://api.tracklysms.com/api/v2/offers/${offerId}`,
{
method: "DELETE",
headers: {
"X-Api-Key": "trk_your_api_key_here"
}
}
);
const data = await response.json();
console.log(data); // { success: true, archived: true }
{
"success": true,
"archived": true
}
{
"error": "Offer 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 or invalid. |
| 403 | account_suspended | Your account is suspended. Resolve outstanding billing or contact support. |
| 404 | not_found | No offer exists with the specified ID. |
| 500 | server_error | An unexpected error occurred on the server. |
Next Steps
Offers Overview
Manage offers and payouts
Record Revenue
Track offer revenue