---
title: "Keep a file in the organization's intake inbox until a case is started: a PDF, JPEG or PNG of at most 4 MB, decided by its contents. The inbox holds 50 waiting files (409 `inbox_full`), each for 30 days. Live only: a test key answers 422 `live_only`"
method: POST
path: "/v1/intake/files"
---

# Keep a file in the organization's intake inbox until a case is started: a PDF, JPEG or PNG of at most 4 MB, decided by its contents. The inbox holds 50 waiting files (409 \`inbox_full\`), each for 30 days. Live only: a test key answers 422 \`live_only\`

`POST /v1/intake/files`

## Request

- Base URL: `https://api.evictionsapi.com`
- URL: `https://api.evictionsapi.com/v1/intake/files`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Request body

- object
  - `filename` string, required
  - `purpose` 'lease' | 'ledger' | 'correspondence' | 'other'
  - `note` string
  - `contentBase64` string, required

## Response `201`

The stored file, without its name or note: the list gives them back while the file waits.

- object
  - `id` string, required
  - `source` 'email' | 'agent', required
  - `contentType` 'application/pdf' | 'image/jpeg' | 'image/png', required
  - `purposeGuess` 'lease' | 'ledger' | 'correspondence' | 'other', required
  - `receivedAt` string, date-time, required
  - `expiresAt` string, date-time, required

## 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`: `inbox_full`: the inbox already holds 50 waiting files. Start a case from them, or remove some, and send again.
- `413`: `too_large`: the file is over 4 MB.
- `415`: `unsupported_media_type`: the file is not a PDF, JPEG or PNG, decided from its contents.
- `422`: `live_only`: a test key; the intake inbox is live only.
- `429`: `rate_limited`: at most 60 files an hour per organization. `Retry-After` gives the seconds to wait.

---

[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)
