Add a document to a case
evictions_add_case_documentUse this when the person asks you to add a document to a draft case: the lease, the tenant ledger, emails or messages with the tenant, proof that they own or manage the property, or a notice already served and its proof of service. Input: the case id, filename, purpose and contentBase64 (a PDF, JPEG or PNG of about 700 KB at most through this server; a file up to 4 MB goes through POST /v1/cases/{id}/documents with the person’s key). Adds the document to the case; each call adds one more, but a repeat with the same idempotencyKey is safe (it returns the first answer). Works on a draft; after a live case is submitted, only a document with the purpose other can be added. Returns the document as stored. Do not use this when no case exists yet (use evictions_send_intake_file) or to change the case’s facts (use evictions_update_case). Next: evictions_validate_case. Needs the person’s account: sign-in or an API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The case id (case_...), as returned by evictions_create_case or evictions_list_cases. | |
| purpose | Yes | What the document is: the lease, the tenant ledger, correspondence (emails or messages with the tenant), authority (proof the person owns or manages the property), prior_notice (a notice already served), prior_notice_proof (proof that notice was served), or other. | |
| filename | Yes | The file’s name, such as lease.pdf. Its type is read from the file itself, not from the name. | |
| contentBase64 | Yes | The file itself, base64-encoded: a PDF, JPEG or PNG of about 700 KB at most (950,000 base64 characters). A larger file, up to 4 MB, goes through the API directly. | |
| idempotencyKey | No | Sent as the Idempotency-Key header (printable ASCII, no spaces): a repeat of the same request with the same key returns the first answer instead of the document added twice. Always pass one, and reuse it if you repeat the call. |