---
title: "POST /companies/{companySlug}/invoices/{invoiceId}/attachments"
method: POST
path: "/companies/{companySlug}/invoices/{invoiceId}/attachments"
tags: ["invoices"]
---

# POST /companies/{companySlug}/invoices/{invoiceId}/attachments

`POST /companies/{companySlug}/invoices/{invoiceId}/attachments`

## Request

- Base URL: `https://api.fiken.no/api/v2`
- URL: `https://api.fiken.no/api/v2/companies/{companySlug}/invoices/{invoiceId}/attachments`
- Auth: OAuth 2
  - Authorization code: `https://fiken.no/oauth/authorize`
  - Token URL: `https://fiken.no/oauth/token`

Creates and adds a new attachment to an Invoice

## Request body `multipart/form-data`

- object
  - `filename` string: The filename. Must end with either .png, .jpeg, .jpg, .gif or .pdf
  - `file` string, binary

## Response `201`

Created

## Changes

- **2021-12-08** `4813e5666340`: 1 info
  - the endpoint scheme security `fiken_api_oauth` was removed from the API

[Operation history](https://skmtc.dev/fiken/apis/fiken-api/changes/companies/:companySlug/invoices/:invoiceId/attachments/post.md)

---

[API](https://skmtc.dev/fiken/apis/fiken-api.md) - [All operations](https://skmtc.dev/fiken/apis/fiken-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fiken/apis/fiken-api/revisions/29111da67f94?raw)
