Create artifact revision
Store a later immutable source revision for an existing artifact. Reuse the version when retrying the same save: identical source and filename return the existing revision, different content is a conflict. Returns revision metadata without the source.
POST
/v1/projects/{projectId}/artifacts/{artifactId}/revisionsAuthorization
AuthorizationPersonal API key · headerrequiredYour personal API key from Settings > Personal API Keys, sent as Bearer <key>.
X-Organization-IdOrganization ID · headerrequiredThe organization to act in. Copy it with Copy organization ID in the organization menu or the settings sidebar.
Path parameters
projectIdstringrequiredartifactIdstring<uuid>requiredmatches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Request body
requiredapplication/jsonversionintegerrequiredThe revision version; reuse it when retrying the same save
min 1 · max 2147483647
filenamestringrequiredThe source filename, such as preprocess.js
matches \S
source_codestringrequiredThe complete source code to store without truncation
Responses
200
Response for status 200
revisionobjectrequiredShow propertiesHide properties
idstringrequiredartifact_idstringrequiredversionintegerrequiredmax 9007199254740991
storagestringrequiredfilenamestringrequiredsize_bytesintegerrequiredmin 0 · max 9007199254740991
created_bystring | nullrequiredcreated_atstringrequired