Delete a tenant workspaceMenu

Delete a tenant workspace

DELETE/v1/workspaces/{externalId}

Requires an API key with the workspaces:manage scope. About keys and scopes

Partner keys only.

Safe to retry: a repeat returns the current state, or 409 once it has moved on from it. About idempotency

Deletes a tenant workspace after a grace period. Partner keys only. Sending stops at once (403 WORKSPACE_DELETION_PENDING, queued messages skipped) and the status becomes deleting. At deletesAt, after the grace period, the workspace and everything in it (contacts, history, files, sending domains) is deleted for good. Cancel before then with POST /v1/workspaces/{externalId}/cancel-deletion. Asking twice keeps the first time. Unlike other deletes, this answers 200 with the workspace rather than 204: the deletion is deferred and can be cancelled, so the body shows status: "deleting" and the deletesAt to tell your customer.

Path parameters

externalIdstringrequired

Your own id for the workspace, as given at creation.

pattern ^[A-Za-z0-9._:-]{1,128}$

Returns

Returns 200 OK with a Workspace in data. It can also return 409 Conflict; see the statuses below. Otherwise returns an error; Errors lists every code and which to retry.

  • 200 OKThe workspace, now being deleted.
  • 409 ConflictThe request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.
idstringrequired

uuid

externalIdstringrequired

Your own id for the tenant.

namestringrequired
countrystringrequired

Two-letter ISO 3166-1 country code.

2 characters

timezonestringrequired

IANA timezone; decides local-time sends and report days.

currencystringrequired

ISO 4217; the currency its revenue totals convert into.

3 characters

statusstringrequired

suspended refuses every send in the workspace until it is resumed; deleting refuses them too, and the workspace is purged unless the deletion is cancelled.

one of active, suspended, deleting

suspendedAtstring | nullrequired

When it was suspended; null if not.

date-time

deletionRequestedAtstring | nullrequired

When deletion was asked for; null if not.

date-time

deletesAtstring | nullrequired

When the workspace and everything in it is deleted for good, unless the deletion is cancelled before; null if no deletion is pending.

date-time

websitestring | nullrequired

The business's website.

uri · up to 500 characters

mailKindstring | nullrequired

What the workspace sends.

one of marketing, transactional, both

contactOptInstring | nullrequired

How its contacts agreed to hear from it: a signup form, checkout, an app.

1–1,000 characters

createdAtstringrequired

date-time