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)required

The ID of the client to delete.

See every field of DELETE /v2/clients/{id} in the API reference
curl --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 422 and error code client_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 404 with error code client_not_found.

Errors

StatusCodeMeaning
401The API key is missing or invalid.
404client_not_foundThe client is the authenticated client, doesn't exist, was already deleted, or is outside your hierarchy.
422client_has_childrenThe client still has child clients.

On this page

DELETE/v2/clients/{id}

Run this request against the sandbox with your test key.

Open in API reference