---
title: "Upload an attachment to a group wiki"
method: POST
path: "/api/v4/groups/{id}/wikis/attachments"
tags: ["wikis"]
---

# Upload an attachment to a group wiki

`POST /api/v4/groups/{id}/wikis/attachments`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/groups/{id}/wikis/attachments`
- Auth: none declared

Uploads a file to the `uploads` directory in a specified group wiki.

## Path parameters

- `id` string, required

## Request body

- PostApiV4GroupsIdWikisAttachments: Upload an attachment to a group wiki
  - `file` string, binary, required: The attachment file to be uploaded
  - `branch` string: The name of the branch

## Response `201`

Upload an attachment to a group wiki

- APIEntitiesWikiAttachment: API_Entities_WikiAttachment model
  - `file_name` string, required
  - `file_path` string, required
  - `branch` string, required
  - `link` object, required
    - `url` string, required
    - `markdown` string, required

## Other responses

- `404`: Not found

---

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