API REFERENCE
Delete Task
On this page
/api/tasksDelete an existing scheduled task by id. Returns only the delete operation status.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request DELETE \
--url 'https://api.recoupable.dev/api/tasks' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"id": "aade2bce-55c7-468e-a606-c4e76fb2ea2a"
}'Request body required
JSON object containing the task id to delete.
application/json
idstringrequiredUUID of the task to delete
format: uuid
Delete one task
{
"id": "aade2bce-55c7-468e-a606-c4e76fb2ea2a"
}Responses
200Task deleted successfully.+
application/json
statusstring · enumrequiredStatus of the delete operation
Values: "success"
400Bad request — missing id or invalid request body.+
application/json
statusstring · enumrequiredAlways error when validation fails
Values: "error"
missing_fieldsarray<one of>requiredJSON path segments to the first field that failed validation (from Zod), e.g. ["id"]
Item properties for missing_fields
oneOf · string 1
string
oneOf · integer 2
integer
errorstringrequiredValidation message for the first failing field
401Unauthorized - missing or invalid credentials+
application/json
errorintegerrequiredformat: int32
messagestringrequired403Forbidden - account_id is outside caller authorization scope+
application/json
errorintegerrequiredformat: int32
messagestringrequired404No task exists with the given id.+
application/json
statusstring · enumrequiredAlways error for this response shape
Values: "error"
errorstringrequiredHuman-readable error message (for example Task not found on 404)
Unknown task id
{
"status": "error",
"error": "Task not found"
}500Internal server error while deleting the task or deleting its Trigger.dev schedule.+
application/json
statusstring · enumrequiredAlways error for this response shape
Values: "error"
errorstringrequiredHuman-readable error message (for example Task not found on 404)
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download releases.jsonView operation source
{
"summary": "Delete scheduled task",
"description": "Delete an existing scheduled task by `id`. Returns only the delete operation status.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"requestBody": {
"description": "JSON object containing the task `id` to delete.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteTaskRequest"
},
"examples": {
"deleteTask": {
"summary": "Delete one task",
"value": {
"id": "aade2bce-55c7-468e-a606-c4e76fb2ea2a"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Task deleted successfully.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteTaskResponse"
}
}
}
},
"400": {
"description": "Bad request — missing `id` or invalid request body.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteTaskValidationErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - account_id is outside caller authorization scope",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "No task exists with the given `id`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteTaskFailureResponse"
},
"examples": {
"notFound": {
"summary": "Unknown task id",
"value": {
"status": "error",
"error": "Task not found"
}
}
}
}
}
},
"500": {
"description": "Internal server error while deleting the task or deleting its Trigger.dev schedule.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteTaskFailureResponse"
}
}
}
}
}
}