---
title: "Add file to liability"
method: POST
path: "/api/v1/liabilities/{id}/documents"
tags: ["Liability"]
---

# Add file to liability

`POST /api/v1/liabilities/{id}/documents`

Upload a file and adds this file as document to given liability

## Path parameters

- `id` string, required — Resource identifier.

## Request body

- object
  - `title` string, nullable
  - `description` string, nullable
  - `keyword` 'other' | 'receipt' | 'aknowledgement' | 'cover' | 'attachment', required
  - `fileName` string, required
  - `fileContent` string, required — Base64 encoded content document.

## Response `201`

Resource successfully created response

## Other responses

- `400` — IETF RFC 9457 Problem API compliant response
- `401` — Unable to authenticate the client
- `403` — Unable to authorize the client
- `404` — Resource was not found or not enough access privileges
- `406` — Requested resource representation does not exist.
- `409` — Request conflict with the current state of the target resource

---

[API](https://skmtc.net/xentral/apis/xentral-api.md) · [All operations](https://skmtc.net/xentral/apis/xentral-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xentral/xentral-api/revisions/8a27ba392442/schema)
