POST/v2/projects

Create a Project

To create a project, send a POST request to /v2/projects.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

9 body fields
idstringoptional
The unique universal identifier of this project.
owner_uuidstringoptional
The unique universal identifier of the project owner.
owner_idintegeroptional
The integer id of the project owner.
namestringrequired
The human-readable name for the project. The maximum length is 175 characters and the name must be unique.
descriptionstringoptional
The description of the project. The maximum length is 255 characters.
purposestringrequired
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`.
environmentstringoptional
The environment of the project's resources.
Allowed:DevelopmentStagingProduction
created_atstringoptional
A time value given in ISO8601 combined date and time format that represents when the project was created.
updated_atstringoptional
A time value given in ISO8601 combined date and time format that represents when the project was updated.

5 status codes
201The response will be a JSON object with a key called `project`. The value of this will be an object with the standard project attributes
projectobjectoptional
401Authentication failed due to invalid credentials.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429The API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500There was a server error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned: Authentication failed due to invalid credentials. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.