Delete a client
Remove a child client without children from your hierarchy.
Soft-deletes a descendant client and removes it from your hierarchy. Only clients without children of their own can be deleted.
The Clients API must be enabled for your account. Until it is, this endpoint responds with 404.
Request
DELETE /v2/clients/{id}
idstring (UUID)requiredThe ID of the client to delete.
DELETE /v2/clients/{id} in the API referencecurl --request DELETE "https://api.sandbox.squake.earth/v2/clients/9a7c2e15-6b3d-4f80-a1c4-7e2d5b9f0c38" \
--header "Authorization: Bearer $SQUAKE_API_KEY"Response
A successful delete returns 204 No Content with an empty body. From then on, the client is no longer listed and reads of it return 404.
Rules
- Only leaf clients can be deleted. If the client still has children, SQUAKE responds with
422and error codeclient_has_children. Delete its descendants first, from the bottom of the hierarchy upwards. - The authenticated client can't delete itself.
- The authenticated client, an unknown or already deleted client, and a client outside your hierarchy all return
404with error codeclient_not_found.
Errors
| Status | Code | Meaning |
|---|---|---|
401 | The API key is missing or invalid. | |
404 | client_not_found | The client is the authenticated client, doesn't exist, was already deleted, or is outside your hierarchy. |
422 | client_has_children | The client still has child clients. |
Related
- List clients
- Delete a Client in the API reference