# Upload artifact bytes Upload the exact declared bytes to the returned upload URL. `PUT /v1/artifacts/{artifact_id}/content` ## Send the file bytes PUT the original binary bytes to upload\_url. Do not JSON-encode or base64-encode the HTTP request body. ## What to do next After the PUT succeeds, call complete\_url to verify and seal the artifact. [Read the step-by-step guide →](https://www.security.run/docs/upload-inputs.html) ### Parameters #### `artifact_id` · `path · string` · required #### `authorization` · `header · string | null` · required ### Responses - `200` Successful Response - `422` Validation Error ## Request ```bash curl -X PUT "$SECURITY_RUN_URL/v1/artifacts/artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/content" \ -H "Authorization: Bearer $SECURITY_RUN_API_KEY" \ --data-binary @sample.txt ``` ## Request ```python import os, httpx headers = {} headers["Authorization"] = "Bearer " + os.environ["SECURITY_RUN_API_KEY"] response = httpx.request('PUT', os.environ["SECURITY_RUN_URL"].rstrip("/") + '/v1/artifacts/artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/content', headers=headers, content=open("sample.txt", "rb").read()) response.raise_for_status() print(response.text) ``` ## Request ```javascript import { readFile } from "node:fs/promises"; const base = process.env.SECURITY_RUN_URL.replace(/\/$/, ""); const headers = {}; headers.Authorization = `Bearer ${process.env.SECURITY_RUN_API_KEY}`; const response = await fetch(base + "/v1/artifacts/artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/content", { method: "PUT", headers, body: await readFile("sample.txt") }); if (!response.ok) throw new Error(`HTTP ${response.status}`); console.log(await response.text()); ```