pydo.projects.patch()

Generated on 8 May 2026 from pydo version v0.34.0

Usage

client.projects.patch(
    project_id="4de7ac8b-495b-4884-9a69-1050c6793cd6",
    body={
        "name": "my-web-api",
        "description": "My website API",
        "purpose": "Service or API",
        ...,
    },
)
Returns JSONRaises HttpResponseError

Description

To update only specific attributes of a project, send a PATCH request to /v2/projects/{project_id}. At least one of the following attributes needs to be sent.

Parameters

project_id string required

A unique identifier for a project.

Min: 1

id string optional read-only

Example: 4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679

The unique universal identifier of this project.

owner_uuid string optional read-only

Example: 99525febec065ca37b2ffe4f852fd2b2581895e7

The unique universal identifier of the project owner.

owner_id integer optional read-only

Example: 258992

The integer id of the project owner.

name string optional

Example: my-web-api

The human-readable name for the project. The maximum length is 175 characters and the name must be unique.

Max length: 175

description string optional

Example: My website API

The description of the project. The maximum length is 255 characters.

Max length: 255

purpose string optional

Example: Service or API

The purpose of the project. The maximum length is 255 characters. It can
have one of the following values:

- Just trying out DigitalOcean
- Class project / Educational purposes
- Website or blog
- Web Application
- Service or API
- Mobile Application
- Machine learning / AI / Data processing
- IoT
- Operational / Developer tooling

If another value for purpose is specified, for example, "your custom purpose",
your purpose will be stored as Other: your custom purpose.

Max length: 255

environment string optional

The environment of the project's resources.

One of: Development, Staging, Production

created_at string optional read-only

Example: 2018-09-27T20:10:35Z

A time value given in ISO8601 combined date and time format that represents when the project was created.

updated_at string optional read-only

Example: 2018-09-27T20:10:35Z

A time value given in ISO8601 combined date and time format that represents when the project was updated.

is_default boolean optional

Example: False

If true, all resources will be added to this project if no project is specified.

Request Sample

Show Request Sample
import os
from pydo import Client

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

req = {
  "name": "my-web-api"
}

resp = client.projects.patch(project_id="4e1bfbc3", body=req)

Response Example

Show Response Example
{
  "project": {
    "id": "4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679",
    "owner_uuid": "99525febec065ca37b2ffe4f852fd2b2581895e7",
    "owner_id": 258992,
    "name": "my-web-api",
    "description": "My website API",
    "purpose": "Service or API",
    "environment": "Production",
    "created_at": "2018-09-27T20:10:35Z",
    "updated_at": "2018-09-27T20:10:35Z",
    "is_default": false
  }
}

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.