dots.v2.projects.byProject_id().patch()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.projects.byProject_id(project_id).patch(body: Project, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithProject_PatchResponse>

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

Path Parameters

project_id string required

Example: 4de7ac8b-495b-4884-9a69-1050c6793cd6

A unique identifier for a project.

Min: 1

Request Body

id string optional read-only

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

The unique universal identifier of this project.

ownerUuid string optional read-only

Example: 99525febec065ca37b2ffe4f852fd2b2581895e7

The unique universal identifier of the project owner.

ownerId 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

createdAt 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.

updatedAt 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.

isDefault 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 { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.projects
    .byProject_id("4de7ac8b-495b-4884-9a69-1050c6793cd6").patch({
    name: "my-web-api",
});

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.