Vai al contenuto principale

Push a folder of files to a Design as one new version

POST 

/artifacts/:artifactId/versions

Stores the files as one new version of the Design, on top of the version the tool pulled from, without spending Copera AI credits. Answers 201 with the new version and its build state; 200 when the push changes nothing or repeats a stored push; 409 with reason stale_head (and the changed paths) when the Design moved on, writer_busy (and retryAfterSeconds) while Copera AI is editing it, or idempotency_key_reused. In a plain page, each .html file becomes a page automatically. A push with more than 32 pages answers 400 with the page count and limit. In React, new root HTML files and new nested index.html files become pages when authoringManifest is omitted. The request body may weigh up to 10.5 MiB (a version holds at most 5 MiB of text, and JSON escapes can double it): an admitted request with a larger body answers 413. Pushes and checks share a budget per token and per workspace over a sliding window: when it is used up the answer is 429 with Retry-After, reason push_budget and scope token or workspace, before anything is stored; when the budget cannot be read the answer is 503 with reason budget_unavailable and Retry-After. The budget is charged before parsing the body, including on a push that later fails validation. Needs a token with the Designs permission.

Request​

Responses​

Default Response