---
title: "Upload attachment"
method: POST
path: "/knowledge-base/1/attachments"
tags: ["customer-engagement", "knowledge-base", "knowledge-base-attachments"]
---

# Upload attachment

`POST /knowledge-base/1/attachments`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/knowledge-base/1/attachments`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Uploads a file as a new knowledge base attachment. The file is validated and stored.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required

## Response `201`

Attachment uploaded successfully

- 09ef6171198229ad9a73a413d2271afa3ba31b9abbd6cd8a0cc9563fd721f1edAttachmentDetailResponse
  - `id` string, uuid, required: Unique identifier of the attachment.
  - `name` string, required: Name of the attachment.
  - `downloadPublicUrl` string, required: Public URL for downloading the attachment from CDN.
  - `publicContentUrl` string: Public URL for accessing the attachment in Public Content.
  - `contentType` string, required: MIME type of the attachment.
  - `sizeInBytes` integer, required: Size of the attachment in bytes.
  - `scope` 'INTERNAL' | 'EXTERNAL', required: Content scope of the node.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
