Skip to navigation

Update a project

Changes the name, the webhook address, or the routing defaults, and can rotate the webhook secret. Fields you leave out stay as they are.

Rules:

  • routing is replaced as a whole. A patch that sends routing with one field drops every other routing field. Read the project, change the routing object, and send all of it.
  • webhook_url: null removes the webhook address.
  • rotate_webhook_secret: true replaces the webhook secret and returns the new one once in webhook_secret. The previous secret stays valid for 24 hours. See the sandboxEvent webhook for how deliveries are signed during that time. The rotation and the other fields of the same request are applied together or not at all.
  • Unknown fields return 400, also inside routing.
  • restricted: true hides the project from every member and viewer who was not added to it with addProjectMember, from the next request on. false shows it to everyone in the account again. Owners and admins always see it, and so does every API key. When the project becomes restricted, the same transaction revokes every live key in it that a member or viewer outside it minted, with the keys minted from them. Each gets an api_key.deleted audit entry with reason project.updated. Setting false again does not bring them back.

Scope: admin. People: owner or admin.

Authentication

AuthorizationBearer

A Meadow API key, sent as Authorization: Bearer mdw_.... The header x-api-key: mdw_... is accepted in its place.

Path parameters

project_idstringRequired

The project id.

Request

At most 1 MiB.
namestringOptional
A name for people. Required on create. Must not be empty. It need not be unique.
webhook_urlstring or nullOptionalformat: "uri"

Where to send sandbox events for sandboxes that set no webhook_url of their own. Must be https and resolve to a public address. null removes it.

max_sandboxesinteger or nullOptional>=0

The most sandboxes of this project that may be alive at once, whichever key made them. Null or left out means no cap. It counts the same states as max_sandboxes on a key, and a create past it returns 403 project_sandbox_limit_exceeded. While a project has a cap, its sandbox creates are admitted one at a time, which is a few database statements each. It counts sandboxes, not dollars.

routingobjectOptional
Defaults for every request made with this project's keys. On update it is replaced as a whole.
rotate_webhook_secretbooleanOptional

When true, replace the webhook secret. The new secret is returned once in webhook_secret. The previous secret stays valid for 24 hours, and so does every earlier secret still inside its own 24 hours. The rotation and the other fields of the same request are applied together or not at all.

restrictedbooleanOptional

When true, only owners, admins and the people added with addProjectMember see the project.

Response headers

x-request-idstringOptional

Meadow’s id for this request, req_ and 24 hex characters. Every response carries it, including errors, streams and unknown routes. Every error in the Error schema repeats it as request_id. Quote it when you report a problem.

Response

The updated project. webhook_secret is present only when it was rotated.

namestring
A name for people. Required on create. Must not be empty. It need not be unique.
idstring
The project id.
restrictedboolean

When true, a member or viewer sees the project only after addProjectMember. Owners, admins and keys are not affected.

created_atdatetime
When the project was created.
webhook_urlstring or nullOptionalformat: "uri"

Where to send sandbox events for sandboxes that set no webhook_url of their own. Must be https and resolve to a public address. null removes it.

max_sandboxesinteger or nullOptional>=0

The most sandboxes of this project that may be alive at once, whichever key made them. Null or left out means no cap. It counts the same states as max_sandboxes on a key, and a create past it returns 403 project_sandbox_limit_exceeded. While a project has a cap, its sandbox creates are admitted one at a time, which is a few database statements each. It counts sandboxes, not dollars.

routingobjectOptional
Defaults for every request made with this project's keys. On update it is replaced as a whole.
webhook_secretstringOptional

The secret that signs webhook deliveries, starting with whsec_. Returned on create and when rotate_webhook_secret is true. Absent otherwise.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
429
Too Many Requests Error
500
Internal Server Error