/v1/apps/{uid}Deletes the app and all of its component deployments, including their persistent
volumes and data. The app and its components are marked deleted straight away (billing
stops and custom domains are released), and each component's runtime is torn down by its
own delete_deployment operation, web component first.
The response is 202 Accepted with status: deleted and no operation_id. The
component operations are not returned; you can find them with
List operations. Because
the components are already deleted, they appear in the response with only role and
deployment_uid.
Concurrent deletes of the same app are serialized: while one is in progress, another
request returns 409 (app deletion is already in progress), unless it carries the same
X-Idempotency key, in which case it gets the first request's result.
Send X-Idempotency to make retries safe. The key is recorded when the delete starts,
so repeating the request with the same key returns 200 OK with is_replay: true,
is_completed: true and status: deleted instead of 404. On a replay the app is gone,
so app only carries uid, name and status. Reusing the key for a different action
or a different app returns 409 with action: idempotency_key_reused.
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Path parameters
uidstringRequiredThe app's uid.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
X-IdempotencystringOptional key that makes retries safe. Repeating a request with a key already used for
the same action returns the original result with 200 OK and is_replay: true. Reusing
it for a different action or app returns 409 with action: idempotency_key_reused.
Response
The app was deleted and component teardown was queued.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringUID of the app_provision operation. Omitted on delete.
appobjectRequiredShow attributesHide attributes
uidstringRequiredUnique identifier of the app.
namestringRequiredDisplay name.
slugstringRequiredURL-safe name, unique among the workspace's apps.
templatestringRequiredSlug of the template the app was created from.
statusstringRequiredprovisioning_database while backing services start, provisioning_app once they are
ready and the web component is starting, active when every component is ready,
failed if provisioning failed (see last_failure), deleted after deletion.
One ofprovisioning_databaseprovisioning_appactivefaileddeleted
public_urlstringURL of the app, taken from the web component (including a verified custom domain).
last_failurestringWhy provisioning failed. Omitted when there is no failure.
created_atstring (date-time)RequiredWhen the app was created.
componentsarray of objectsThe app's component deployments, in deploy order.
Show item attributesHide item attributes
rolestringRequiredRole of the component.
One ofdatabaseweb
deployment_uidstringRequiredUID of the component's deployment. Use it with the deployment endpoints.
namestringName of the component deployment. Omitted once the component is deleted.
statusstringStatus of the component deployment (see status on Get a deployment). Omitted once deleted.
plan_slugstringPlan of the component deployment. Omitted once deleted.
setup_notestringFirst-run instructions from the template, with the app's URL filled in.
env_docs_urlstringLink to the software's configuration reference.
statusstringRequiredrunning (the provisioning operation's status) on create, deleted on delete. On a replayed create, the operation's current status (running, succeeded or failed).
events_urlstringPath of the server-sent events stream with provisioning progress. Omitted on delete.
is_replaybooleanRequiredtrue when an X-Idempotency key was reused and the original result is returned.
is_completedbooleantrue when a replayed operation has already finished (always on a replayed delete). Omitted unless true.
Response
Replay. The app was already deleted with this X-Idempotency key, so nothing is done again.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringUID of the app_provision operation. Omitted on delete.
appobjectRequiredShow attributesHide attributes
uidstringRequiredUnique identifier of the app.
namestringRequiredDisplay name.
slugstringRequiredURL-safe name, unique among the workspace's apps.
templatestringRequiredSlug of the template the app was created from.
statusstringRequiredprovisioning_database while backing services start, provisioning_app once they are
ready and the web component is starting, active when every component is ready,
failed if provisioning failed (see last_failure), deleted after deletion.
One ofprovisioning_databaseprovisioning_appactivefaileddeleted
public_urlstringURL of the app, taken from the web component (including a verified custom domain).
last_failurestringWhy provisioning failed. Omitted when there is no failure.
created_atstring (date-time)RequiredWhen the app was created.
componentsarray of objectsThe app's component deployments, in deploy order.
Show item attributesHide item attributes
rolestringRequiredRole of the component.
One ofdatabaseweb
deployment_uidstringRequiredUID of the component's deployment. Use it with the deployment endpoints.
namestringName of the component deployment. Omitted once the component is deleted.
statusstringStatus of the component deployment (see status on Get a deployment). Omitted once deleted.
plan_slugstringPlan of the component deployment. Omitted once deleted.
setup_notestringFirst-run instructions from the template, with the app's URL filled in.
env_docs_urlstringLink to the software's configuration reference.
statusstringRequiredrunning (the provisioning operation's status) on create, deleted on delete. On a replayed create, the operation's current status (running, succeeded or failed).
events_urlstringPath of the server-sent events stream with provisioning progress. Omitted on delete.
is_replaybooleanRequiredtrue when an X-Idempotency key was reused and the original result is returned.
is_completedbooleantrue when a replayed operation has already finished (always on a replayed delete). Omitted unless true.
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | The resource does not exist or you cannot access it. |
409 | The X-Idempotency key was already used for a different action or app (action: idempotency_key_reused), or another delete of this app is in progress (app deletion is already in progress). |
Errors use the standard error format.