---
title: "File a document somebody sent in"
method: POST
path: "/api/v1/documents/submitted"
tags: ["Documents"]
---

# File a document somebody sent in

`POST /api/v1/documents/submitted`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/documents/submitted`
- Auth: API key in cookie `better-auth.session_token`

For a mail run only, with the token of whoever wrote and its `documents:submit` scope. Multipart: `file`, and `kind`, which has to be one their standing lets them send. It always files a new document linked to them and to their lease, tagged as received from them, so nothing on file is replaced or overwritten.

## Response `200`

The document they sent, filed.

- object
  - `ok` unknown, required
  - `data` object, required
    - `documentId` string, required: The new document. Never one that was on file before.
    - `kind` string, required
    - `receivedFrom` string, required: Who sent it, as the address book names them.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: No file, or a kind they may not send.
- `403`: Not a mail run allowed to file what was sent.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
