---
title: "POST /pias/{pia_id}/attachments"
method: POST
path: "/pias/{pia_id}/attachments"
---

# POST /pias/{pia_id}/attachments

`POST /pias/{pia_id}/attachments`

## Request

- Base URL: `https://pia-back.atnosapp.com`
- URL: `https://pia-back.atnosapp.com/pias/{pia_id}/attachments`
- Auth: none declared
- TypeScript: <https://skmtc.dev/lincnil/apis/pia-back/docs/pias/:pia_id/attachments/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new attachment

## Path parameters

- `pia_id` integer, required

## Request body `multipart/form-data`

- SampleAttachment
  - `attachment` Attachment, required
    - `pia_id` integer, required
    - `description` string
    - `reference_to` string, required
    - `for_measure` boolean
    - `file` File
      - `pia_id` integer, required
      - `file` string
      - `name` string
      - `mime_type` string

## Response `200`

attachment response

- Attachment
  - `pia_id` integer, required
  - `description` string
  - `reference_to` string, required
  - `for_measure` boolean
  - `file` File
    - `pia_id` integer, required
    - `file` string
    - `name` string
    - `mime_type` string

## Other responses

- `default`: unexpected error

## Changes

- **2017-09-26** `2d54fb571e31`: 1 info
  - endpoint added
- **2017-08-02** `254209d118a7`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/lincnil/apis/pia-back/changes/pias/:pia_id/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.dev/lincnil/apis/pia-back/revisions/36382684cc14?raw)
