---
title: "Move a waiting file of the intake inbox onto a live case as a document of `purpose`, as an upload of the same file would be (the same checks apply: 409 `invalid_state` once a case is submitted, except `purpose: \"other\"`). The text of a forwarded email (`text/plain`) moves only as `correspondence`; any other purpose answers 415 `unsupported_media_type`. The file leaves the inbox. Moving a file already moved onto this case answers 200 with the same document; a test case answers 422 `live_only`"
method: POST
path: "/v1/cases/{id}/documents/from-intake"
---

# Move a waiting file of the intake inbox onto a live case as a document of \`purpose\`, as an upload of the same file would be (the same checks apply: 409 \`invalid_state\` once a case is submitted, except \`purpose: "other"\`). The text of a forwarded email (\`text/plain\`) moves only as \`correspondence\`; any other purpose answers 415 \`unsupported_media_type\`. The file leaves the inbox. Moving a file already moved onto this case answers 200 with the same document; a test case answers 422 \`live_only\`

`POST /v1/cases/{id}/documents/from-intake`

## Request

- Base URL: `https://api.evictionsapi.com`
- URL: `https://api.evictionsapi.com/v1/cases/{id}/documents/from-intake`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `intakeFileId` string, required
  - `purpose` 'lease' | 'ledger' | 'correspondence' | 'other', required

## Response `201`

The new document (200: the file was already moved onto this case, and this is its document).

- Document
  - `id` string, required
  - `kind` 'evidence' | 'notice' | 'filing' | 'proof' | 'other', required
  - `specId` string, nullable
  - `purpose` unknown
  - `filename` string, required
  - `contentType` 'application/pdf' | 'image/jpeg' | 'image/png' | 'text/plain': Decided from the file's first bytes when it was stored, never from its name. `text/plain` only for a `correspondence` document that is plain text (the body of a forwarded email).
  - `contentHash` string, required: SHA-256 of the document bytes. An attorney approval names these.
  - `createdAt` string, date-time

## Other responses

- `400`: The request is invalid.
- `401`: The credential is missing or invalid.
- `403`: The credential is not allowed to do this (`forbidden`). For a signed-in session: `permission_denied`, the person's role in the organization lacks the permission this needs (ask an owner); `no_organization`, the person belongs to no organization yet (start one with `POST /v1/me/organizations` or accept an invitation).
- `404`: Not found.
- `409`: The request conflicts with the current state: for a case, it is not in a state that allows this, or its details were erased (`erased`); for an API key, a limit or the key in use.
- `422`: The case did not pass a check.

---

[API](https://skmtc.dev/evictionsapi/apis/evictions-api.md) · [All operations](https://skmtc.dev/evictionsapi/apis/evictions-api/llms.txt) · [OpenAPI document](https://skmtc.dev/evictionsapi/apis/evictions-api/revisions/28459213a1a3?raw)
