> For the complete documentation index, see [llms.txt](https://docs.amigo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amigo.ai/api-reference/readme/platform/intake-upload.md).

# Intake Upload

## GET /upload/{link\_token}/info

> Get Link Info

```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":{"LinkInfoResponse":{"properties":{"display_name":{"$ref":"#/components/schemas/DescriptionString","description":"Human-readable display name (falls back to customer slug)."},"customer_slug":{"type":"string","maxLength":128,"title":"Customer Slug","description":"Stable URL-safe customer identifier."},"max_upload_bytes":{"type":"integer","minimum":0,"title":"Max Upload Bytes","description":"Maximum allowed upload size in bytes."},"allowed_content_types":{"items":{"type":"string"},"type":"array","maxItems":64,"title":"Allowed Content Types","description":"Allowed Content-Type values for uploads, sorted lexicographically."}},"type":"object","required":["display_name","customer_slug","max_upload_bytes"],"title":"LinkInfoResponse","description":"Public metadata for an intake upload link, returned to the forms app."},"DescriptionString":{"type":"string","maxLength":2000},"LinkErrorResponse":{"properties":{"error_code":{"type":"string","enum":["invalid_token","link_not_found","link_expired","link_exhausted"],"title":"Error Code","description":"Machine-readable error code."},"message":{"type":"string","maxLength":512,"title":"Message","description":"Human-readable error message."}},"type":"object","required":["error_code","message"],"title":"LinkErrorResponse","description":"Error envelope returned for token / link validation failures."},"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":{"/upload/{link_token}/info":{"get":{"tags":["Intake Upload"],"summary":"Get Link Info","operationId":"get-intake-link-info","parameters":[{"name":"link_token","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Link Token"}}],"responses":{"200":{"description":"Link metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInfoResponse"}}}},"400":{"description":"Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkErrorResponse"}}}},"404":{"description":"Link not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkErrorResponse"}}}},"410":{"description":"Link expired or exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```

## POST /upload/{link\_token}/files

> Receive Upload

```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":{"UploadFileResponse":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id","description":"UUID of the newly created upload row."},"filename":{"type":"string","maxLength":256,"title":"Filename","description":"Stored filename."},"sha256":{"type":"string","maxLength":128,"title":"Sha256","description":"SHA-256 of the uploaded bytes (lowercase hex)."},"size_bytes":{"type":"integer","minimum":0,"title":"Size Bytes","description":"Stored size in bytes."},"scan_status":{"type":"string","maxLength":32,"title":"Scan Status","description":"Virus-scan status (e.g. ``clean``, ``skipped``)."},"duplicate_of":{"anyOf":[{"$ref":"#/components/schemas/UploadDuplicateInfo"},{"type":"null"}],"description":"Set when this upload's content hash matched a prior upload; otherwise null."}},"type":"object","required":["id","filename","sha256","size_bytes","scan_status"],"title":"UploadFileResponse","description":"Receipt for a successful upload via an intake link."},"UploadDuplicateInfo":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id","description":"UUID of the existing upload row."},"received_at":{"type":"string","maxLength":64,"title":"Received At","description":"ISO-8601 timestamp the original upload was received."}},"type":"object","required":["id","received_at"],"title":"UploadDuplicateInfo","description":"Pointer to an existing upload row when content-hash dedup fires."}}},"paths":{"/upload/{link_token}/files":{"post":{"tags":["Intake Upload"],"summary":"Receive Upload","operationId":"upload-intake-file-via-link","parameters":[{"name":"link_token","in":"path","required":true,"schema":{"type":"string","maxLength":64,"title":"Link Token"}},{"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":true,"schema":{"type":"string","maxLength":128,"title":"X-Amigo-Intake-Content-Type"}}],"responses":{"201":{"description":"File uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFileResponse"}}}},"404":{"description":"Link not found"},"410":{"description":"Link expired"},"413":{"description":"File too large"},"422":{"description":"Invalid filename or content type"},"429":{"description":"Rate limited or upload limit reached"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
