# Seal an artifact Verify the uploaded bytes and seal the artifact for use by a run. `POST /v1/artifacts/{artifact_id}/complete` ## Make an uploaded file ready to use POST to complete\_url after uploading. Continue only when verification succeeds. ## What to do next If the size or digest differs, create a new artifact from the correct bytes. [Read the step-by-step guide →](https://www.security.run/docs/upload-inputs.html) Send an `Idempotency-Key`. Keep the same key and body when retrying this operation. ### Parameters #### `artifact_id` · `path · string` · required #### `authorization` · `header · string | null` · required #### `idempotency-key` · `header · string | null` · required ### Responses - `200` Successful Response - `422` Validation Error ## Request ```bash curl -X POST "$SECURITY_RUN_URL/v1/artifacts/artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/complete" \ -H "Authorization: Bearer $SECURITY_RUN_API_KEY" \ -H "Idempotency-Key: unique-request-key" ``` ## Request ```python import os, httpx headers = {'Idempotency-Key': 'unique-request-key'} headers["Authorization"] = "Bearer " + os.environ["SECURITY_RUN_API_KEY"] response = httpx.request('POST', os.environ["SECURITY_RUN_URL"].rstrip("/") + '/v1/artifacts/artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/complete', headers=headers) response.raise_for_status() print(response.text) ``` ## Request ```javascript const base = process.env.SECURITY_RUN_URL.replace(/\/$/, ""); const headers = { "Idempotency-Key": "unique-request-key" }; headers.Authorization = `Bearer ${process.env.SECURITY_RUN_API_KEY}`; const response = await fetch(base + "/v1/artifacts/artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/complete", { method: "POST", headers }); if (!response.ok) throw new Error(`HTTP ${response.status}`); console.log(await response.text()); ```