# Intake

## POST /v1/{workspace\_id}/intake/files

> Receive Intake File

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"IntakeFileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"volume_path":{"type":"string","title":"Volume Path"},"sha256":{"type":"string","title":"Sha256"},"size_bytes":{"type":"integer","title":"Size Bytes"},"scan_status":{"type":"string","title":"Scan Status"}},"type":"object","required":["id","volume_path","sha256","size_bytes","scan_status"],"title":"IntakeFileResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/intake/files":{"post":{"tags":["Intake"],"summary":"Receive Intake File","operationId":"receive_intake_file_v1__workspace_id__intake_files_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"x-amigo-intake-sha256","in":"header","required":true,"schema":{"type":"string","maxLength":64,"title":"X-Amigo-Intake-Sha256"}},{"name":"x-amigo-intake-timestamp","in":"header","required":true,"schema":{"type":"string","maxLength":20,"title":"X-Amigo-Intake-Timestamp"}},{"name":"x-amigo-intake-signature","in":"header","required":true,"schema":{"type":"string","maxLength":512,"title":"X-Amigo-Intake-Signature"}},{"name":"x-amigo-intake-customer-slug","in":"header","required":true,"schema":{"type":"string","maxLength":63,"title":"X-Amigo-Intake-Customer-Slug"}},{"name":"x-amigo-intake-filename","in":"header","required":true,"schema":{"type":"string","maxLength":256,"title":"X-Amigo-Intake-Filename"}},{"name":"x-amigo-intake-content-type","in":"header","required":false,"schema":{"type":"string","maxLength":128,"default":"application/octet-stream","title":"X-Amigo-Intake-Content-Type"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /v1/{workspace\_id}/intake/links

> List upload links

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"IntakeLinkResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"customer_slug":{"$ref":"#/components/schemas/SlugString"},"display_name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"upload_url":{"type":"string","maxLength":512,"title":"Upload Url"},"link_token":{"type":"string","maxLength":128,"minLength":32,"title":"Link Token"},"status":{"type":"string","enum":["active","expired","revoked","exhausted"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"max_uploads":{"type":"integer","title":"Max Uploads"},"upload_count":{"type":"integer","title":"Upload Count"},"last_upload_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Upload At"}},"type":"object","required":["id","workspace_id","customer_slug","display_name","upload_url","link_token","status","created_at","expires_at","revoked_at","max_uploads","upload_count","last_upload_at"],"title":"IntakeLinkResponse"},"SlugString":{"type":"string","maxLength":63,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$"},"NameString":{"type":"string","maxLength":256,"minLength":1},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/intake/links":{"get":{"tags":["Intake"],"summary":"List upload links","operationId":"list-intake-links","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Expired"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntakeLinkResponse"},"title":"Response List-Intake-Links"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Generate upload link

> Create a shareable upload link for a customer.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"CreateLinkRequest":{"properties":{"customer_slug":{"$ref":"#/components/schemas/SlugString"},"display_name":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}]},"expires_in_hours":{"type":"integer","maximum":720,"minimum":1,"title":"Expires In Hours","default":168},"max_uploads":{"type":"integer","maximum":10000,"minimum":1,"title":"Max Uploads","default":100}},"type":"object","required":["customer_slug"],"title":"CreateLinkRequest"},"SlugString":{"type":"string","maxLength":63,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$"},"DescriptionString":{"type":"string","maxLength":2000},"IntakeLinkResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"customer_slug":{"$ref":"#/components/schemas/SlugString"},"display_name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"upload_url":{"type":"string","maxLength":512,"title":"Upload Url"},"link_token":{"type":"string","maxLength":128,"minLength":32,"title":"Link Token"},"status":{"type":"string","enum":["active","expired","revoked","exhausted"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"max_uploads":{"type":"integer","title":"Max Uploads"},"upload_count":{"type":"integer","title":"Upload Count"},"last_upload_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Upload At"}},"type":"object","required":["id","workspace_id","customer_slug","display_name","upload_url","link_token","status","created_at","expires_at","revoked_at","max_uploads","upload_count","last_upload_at"],"title":"IntakeLinkResponse"},"NameString":{"type":"string","maxLength":256,"minLength":1},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/intake/links":{"post":{"tags":["Intake"],"summary":"Generate upload link","description":"Create a shareable upload link for a customer.","operationId":"create-intake-link","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```

## DELETE /v1/{workspace\_id}/intake/links/{link\_id}

> Revoke upload link

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/intake/links/{link_id}":{"delete":{"tags":["Intake"],"summary":"Revoke upload link","operationId":"revoke-intake-link","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /v1/{workspace\_id}/intake/links/{link\_id}/uploads

> List uploads for a link

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"IntakeUploadResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"customer_slug":{"$ref":"#/components/schemas/SlugString"},"filename":{"$ref":"#/components/schemas/NameString"},"content_type":{"type":"string","maxLength":256,"title":"Content Type"},"sha256":{"type":"string","maxLength":64,"minLength":64,"title":"Sha256"},"size_bytes":{"type":"integer","title":"Size Bytes"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"scan_status":{"type":"string","enum":["skipped","pending","clean","infected"],"title":"Scan Status"}},"type":"object","required":["id","customer_slug","filename","content_type","sha256","size_bytes","received_at","scan_status"],"title":"IntakeUploadResponse"},"SlugString":{"type":"string","maxLength":63,"minLength":2,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$"},"NameString":{"type":"string","maxLength":256,"minLength":1},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/intake/links/{link_id}/uploads":{"get":{"tags":["Intake"],"summary":"List uploads for a link","operationId":"list-intake-link-uploads","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntakeUploadResponse"},"title":"Response List-Intake-Link-Uploads"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Download an uploaded file

> Proxy the raw file bytes from the UC Volume back to the caller.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/intake/links/{link_id}/uploads/{upload_id}/download":{"get":{"tags":["Intake"],"summary":"Download an uploaded file","description":"Proxy the raw file bytes from the UC Volume back to the caller.","operationId":"download-intake-upload","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"File bytes with Content-Disposition: attachment","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Link, upload, or file not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"502":{"description":"UC Volume storage backend unavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amigo.ai/api-reference/readme/platform/intake.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
