---
title: "Penny attaches a document to its own draft (acceptance D14)"
method: POST
path: "/accountant/companies/{customerId}/agent/inbox-items/{id}/draft/attachments"
tags: ["Accountant Portal"]
---

# Penny attaches a document to its own draft (acceptance D14)

`POST /accountant/companies/{customerId}/agent/inbox-items/{id}/draft/attachments`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/agent/inbox-items/{id}/draft/attachments`
- Auth: HTTP bearer

The bookkeeping agent's key attaches one of the client's documents to a draft it wrote itself. A draft a person edited is refused with 409 `INBOX_DRAFT_PERSON_EDITED` (Penny can only replace an attachment there, see the replace route); 409 `INBOX_DRAFT_SENT` once sent. Penny never sends.

## Path parameters

- `customerId` string, uuid, required
- `id` string, uuid, required

## Request body

- object
  - `documentId` string, uuid, required

## Response `201`

The attachment

- object
  - `success` boolean, required
  - `data` object, required
    - `id` string, uuid, required
    - `companyId` string, uuid
    - `inboxItemId` string, uuid
    - `documentId` string, uuid, required
    - `name` string, nullable, required
    - `addedBy` 'penny' | 'person', required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400`: Request failed validation
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: Request conflicts with the durable onboarding state

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/agent/inbox-items/:id/draft/attachments/post.md)

---

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