Create a project
Creates a project in the account. name is required. The response carries
webhook_secret once. Store it: it signs the webhook deliveries of this
project and is not shown again unless you rotate it.
A new project has no keys. Mint one with POST /v1/keys and the new
project_id.
Rules:
routingsets defaults for every request made with this project’s keys. See theProjectWriteschema.webhook_urlmust be anhttpsURL that resolves to a public address.- Unknown fields return 400, also inside
routing. A misspelledlockoronlywould otherwise be ignored. - Send
Idempotency-Keyso a retry cannot create a second project. A retry by the same API key with the sameIdempotency-Keyand body returns the first response withIdempotent-Replayed: trueand withoutwebhook_secret: Meadow never saves a one-time secret. If you lost the first response, rotate the secret withrotate_webhook_secret.
Scope: admin.
Authentication
A Meadow API key, sent as Authorization: Bearer mdw_.... The header
x-api-key: mdw_... is accepted in its place.
Headers
Makes a retry safe. A repeat with the same key and the same body returns the
result of the first call instead of starting again. The same key with a
different body returns 409. On POST /v1/keys, POST /v1/projects and
POST /v1/images a value is scoped to the API key that sent it: another key
that sends the same value starts its own request. The sandbox and exec
routes scope it to the API key too. On the exec route the header only has an
effect with background: true. See Idempotency in the introduction for how
long a value is kept.
The key is 1 to 255 bytes of printable ASCII. A blank, longer, or non-ASCII key, or the header sent twice, returns 400. A UUID works well.
Request
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.
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.
Response headers
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.
true when this response is the saved result of an earlier request with the
same Idempotency-Key. Absent on a first response. Sent by POST /v1/keys,
POST /v1/projects, POST /v1/images, POST /v1/sandboxes and a background
POST /v1/sandboxes/{sandbox_id}/exec. On the two sandbox routes the body is the
sandbox or the command as it is now.
Response
Created. webhook_secret is shown only here. A replay of this response
(Idempotent-Replayed: true) does not carry webhook_secret.
When true, a member or viewer sees the project only after addProjectMember. Owners, admins and keys are not affected.
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.
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.
The secret that signs webhook deliveries, starting with whsec_. Returned on create and when rotate_webhook_secret is true. Absent otherwise.