Contents
Add document attachment
Adds an attachment file to the document.
The file is sent as multipart/form-data. Unlike the Wiki attachment API, you do not need to upload the file beforehand. Send the file itself to this endpoint.
The user who calls this API must be a member of the project that the document belongs to.
Role
Permission
All permissions
Restriction
No restriction
Method
POST
URL
/api/v2/documents/:documentId/attachments
URL parameters
| Parameter Name | Type | Description |
|---|---|---|
| documentId (Required) | String | Document ID |
Form parameters
Content-Type:multipart/form-data
| Parameter Name | Type | Description |
|---|---|---|
| file (Required) | File | The file to attach to the document |
Response example
Response Body
{
"id": 22067,
"name": "test.png",
"size": 8718,
"createdUser": {
"id": 1,
"userId": "admin",
"name": "admin",
"roleType": 1,
"lang": "ja",
"mailAddress": "eguchi@nulab.example",
"nulabAccount": {
"nulabId": "Prm9ZD9DQD5snNWcSYSwZiQoA9WFBUEa2ySznrSnSQRhdC2X8G",
"name": "admin",
"uniqueId": "admin"
},
"keyword": "admin admin",
"lastLoginTime": "2025-12-24T02:10:00Z"
},
"created": "2025-12-24T02:19:42Z"
}