---
title: "POST /attachments"
method: POST
path: "/attachments"
---

# POST /attachments

`POST /attachments`

Creates a new attachment

## Request body

- SampleAttachment
  - `attachment` Attachment, required
    - `pia_id` integer, required
    - `description` string
    - `reference_to` string, required
    - `for_measure` boolean
    - `attached_file` AttachedFile
      - `pia_id` integer, required
      - `url` string
      - `name` string
      - `content_type` string

## Response `200`

attachment response

- Attachment
  - `pia_id` integer, required
  - `description` string
  - `reference_to` string, required
  - `for_measure` boolean
  - `attached_file` AttachedFile
    - `pia_id` integer, required
    - `url` string
    - `name` string
    - `content_type` string

## Other responses

- `default` — unexpected error

## Changes

- **2017-08-02** `254209d118a7` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/lincnil/apis/pia-back/changes/attachments/post.md)

---

[API](https://skmtc.dev/lincnil/apis/pia-back.md) · [All operations](https://skmtc.dev/lincnil/apis/pia-back/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lincnil/pia-back/revisions/3a84809f97eb/schema)
