pydo.projects.delete()

Generated on 4 Jun 2026 from pydo version v0.35.0

Usage

client.projects.delete(project_id="4de7ac8b-495b-4884-9a69-1050c6793cd6")
Returns NoneRaises HttpResponseError

Description

To delete a project, send a DELETE request to /v2/projects/{project_id}. To be deleted, a project must not have any resources assigned to it. Any existing resources must first be reassigned or destroyed, or you will receive a 412 error.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters

project_id string required

A unique identifier for a project.

Min: 1

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.projects.delete(project_id="fda9fda")

Known Issues

The delete method requires an explicit Content-Type header to work correctly:

from pydo import Client
import os

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
delete_resp = client.projects.delete(
    project_id=project_id,
    headers={"Content-Type": "application/json"}
)

More Information

See /v2/projects/{project_id} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.