Delete job
Delete a job or sub-job by its unique ID.
DELETE /jobs/v1/jobs/{jobId}
Restrictions
WarningDeletion is permanent. Additionally:
- Deleting a parent job also deletes all of its sub-jobs
- Cannot delete the last sub-job of a parent on its own; delete the parent instead
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 Parent Job and Its Sub-Jobs
To delete a parent job together with all of its sub-jobs, pass the parent job ID in the path.
Request
curl -X DELETE \
'https://api.connecteam.com/jobs/v1/jobs/19cc77e2-0aab-4578-a79c-0d8160671a34' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'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 the last sub-job is not supported | Delete the parent job instead, which also deletes its sub-jobs |
| 404 | Job not found | The specified jobId does not exist |
Updated 11 days ago
Did this page help you?
