Delete

API server

https://app.coolify.io/api/v1

Choose where to send API requests

This changes the request URL and code examples on every endpoint page.

API server type

Requests will use

https://app.coolify.io/api/v1

Use only a Coolify URL you trust. Sending a test request also sends the API token you enter.

DELETE
/servers/{uuid}

Delete server by UUID. With force or delete_from_provider, needs a token with the write and deploy permissions.

Authorization

bearerAuth
AuthorizationBearer <token>

Go to Keys & Tokens / API tokens and create a new token. Use the token as the bearer token.

In: header

Path Parameters

uuid*string

UUID of the server.

Query Parameters

force?boolean

Also delete all resources whose main destination is on the server. Applications that use the server only as an additional destination are not deleted. They are removed from the server and keep running on their other servers. Needs the deploy permission.

Defaultfalse
delete_from_provider?boolean

Also delete the server from its cloud provider (Hetzner, Vultr or DigitalOcean). This cannot be undone. Needs the deploy permission.

Defaultfalse
remove_ssh_key?boolean

Remove the public key of the server's SSH key from ~/.ssh/authorized_keys on the server before the server is deleted. The server must have no resources. If the key cannot be removed, the server is not deleted.

Defaultfalse
remove_resources_from_server?boolean

With force=true, also remove the containers, volumes, and files of the resources from the server. Set it to false to delete the resources only from Coolify and leave them running on the server.

Defaulttrue

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://app.coolify.io/api/v1/servers/string"
{  "message": "Server deleted."}
{  "message": "Invalid token."}
{  "message": "Unauthenticated."}
Empty
{  "message": "Resource not found."}
{  "message": "Validation error.",  "errors": {    "name": [      "The name field is required."    ],    "api_url": [      "The api url field is required.",      "The api url format is invalid."    ]  }}