Create artifact
Create a project-owned code artifact and its initial immutable source revision (version 1). Returns the artifact and revision metadata without the source. Retrying identical input returns the same records; different content at version 1 is a conflict.
POST
/v1/projects/{projectId}/artifactsAuthorization
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
projectIdstringrequiredRequest body
requiredapplication/jsonscopestringrequiredThe artifact consumer
namestringrequiredThe artifact display name
matches \S
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_atstringrequiredartifactobjectrequiredShow propertiesHide properties
idstringrequiredorganization_idstringrequiredproject_idstringrequiredscopestringrequirednamestringrequiredcreated_bystring | nullrequiredcreated_atstringrequired