> ## Documentation Index
> Fetch the complete documentation index at: https://docs.app.strix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploads

> Upload local repositories and documentation for whitebox scans

export const ScarfPixel = () => <img referrerPolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=831669b6-b4bd-42cb-8832-2122c03e1d5f" alt="" width="1" height="1" style={{
  position: "absolute",
  width: 0,
  height: 0,
  opacity: 0,
  pointerEvents: "none"
}} />;

<ScarfPixel />

Uploads let you run whitebox pentests against code or documentation that is not connected through an SCM integration. The flow is: request a signed URL, upload the file directly to storage, then finalize.

## 1. Request a signed upload URL

```bash theme={null}
curl -X POST "https://app.strix.ai/api/v1/uploads/request" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "service.zip",
    "file_size": 1048576,
    "category": "repository"
  }'
```

The response contains an `upload_id` and a signed `url` to `PUT` the file to. `category` is optional (`repository` or `documentation`) and is otherwise inferred.

**Required scope:** `uploads:write`

## 2. Upload the file

`PUT` the raw file bytes to the signed URL returned above:

```bash theme={null}
curl -X PUT "<SIGNED_UPLOAD_URL>" \
  --upload-file service.zip
```

## 3. Finalize the upload

```bash theme={null}
curl -X POST "https://app.strix.ai/api/v1/uploads/complete" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"upload_id": "<UPLOAD_ID>"}'
```

**Required scope:** `uploads:write`

## Delete an upload

```bash theme={null}
curl -X DELETE "https://app.strix.ai/api/v1/uploads/<UPLOAD_ID>" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `uploads:write`
