Delete project subscription billing
What this endpoint does: Soft deletes a subscription billing item. The item is marked as deleted and will no longer appear in listings or be included in future invoice generation. However, the data is retained in the database for historical records and audit purposes.
What happens when deleted:
- The subscription billing item is marked with a deletedAt timestamp
- It disappears from all active listings and queries
- Already billed rows remain unchanged (historical invoices are not affected)
- Unbilled billing rows are effectively cancelled
- The item can be restored if needed (though not through this API)
Permissions required:
- Projects.edit: Ability to edit project settings
- Invoices.manage: Ability to manage invoice configurations
Use cases:
- Cancel an active subscription
- Remove a subscription that is no longer needed
- Clean up test or incorrect subscription entries
DELETE
/projects/{projectId}/subscription-billings/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredidstringrequiredResponses
200Subscription billing deleted successfully
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions (requires Projects.edit and Invoices.manage)
404Project or subscription billing not found
Request
curl -X DELETE "https://leadtime.app/api/public/projects/string/subscription-billings/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/projects/string/subscription-billings/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/projects/string/subscription-billings/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Insufficient permissions (requires Projects.edit and Invoices.manage)
Project or subscription billing not found