# Delete a child project

Canonical page: https://docs.ovok.com/api/slim/project/delete-a-child-project

`DELETE /v1/slim/project/child/{subProjectId}`

Deletes an empty direct child project of your current project, including the setup Ovok created with it. Use it to remove a child project that is no longer needed.

**Auth:** Bearer token for a project admin. No other role passes.
**Scope:** `subProjectId` must be a direct child of the caller's project (from the token).

## Behaviour

- The child must be empty: no `Patient`, `Device` or `Location`, and no child projects of its own. Otherwise the request is refused with 409 and nothing is changed. The 409 body has `error: "project_not_empty"`, a `counts` object per resource type and the `childProjectIds`.
- On success Ovok unlinks the child from your project, deletes its access policies, practitioners, memberships, threshold plan, client applications, top-level organizations and tenant code, deletes the project, then revokes its Signals tenant.
- User accounts are never deleted: a user can belong to other projects. Audit records (`Provenance`, `AuditEvent`) are kept.
- Two deletes of the same project cannot run at once: the second gets 409.
- The delete is safe to retry. If the Signals revoke fails, the project is already deleted and the request answers 502. Send the same request again to finish it.
- Returns `{ "success": true }`.


## Example

```bash
curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/project/child/c3499c27-2973-0a7f-807e-fb8676a92dcb' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
