Delete job
Delete a job or sub-job by its unique ID.
DELETE /jobs/v1/jobs/{jobId}
Restrictions
WarningDeletion is permanent. Additionally:
- Cannot delete a parent job that has sub-jobs
- Cannot delete the last sub-job of a parent
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | Yes | The unique identifier of the job or sub-job to delete |
Example: Delete a Job
Request
curl -X DELETE \
'https://api.connecteam.com/jobs/v1/jobs/9fdebf1f-0c69-4914-89d2-8f86c3e5f47d' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'Response
{
"requestId": "12312321-rwwerus-1234sd",
"data": {}
}Example: Delete a Sub-Job
To delete a sub-job, pass the sub-job ID in the path. The parent job will remain with its other sub-jobs.
Request
curl -X DELETE \
'https://api.connecteam.com/jobs/v1/jobs/7c86a7c2-6736-4c91-aeec-b1beb64fb7b5' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'Error Responses
| Status | Error | Description |
|---|---|---|
| 400 | Deleting job with sub jobs is not supported | Delete sub-jobs individually first |
| 400 | Deleting the last sub-job is not supported | Parent must keep at least one sub-job |
| 404 | Job not found | The specified jobId does not exist |
Updated 23 days ago
