Attachments
APIs for uploading answer attachments and integrating with Misskey Drive. Pass the returned key to /api/v1/questions/:id/answer to bind the attachment to an answer.
Uploaded attachments that remain unbound to any answer for a certain period will be deleted automatically.
/api/v1/answers/attachments/uploadUpload an image from the device. The server compresses it to WebP and generates a BlurHash. Include the returned key in the attachments array of /api/v1/questions/:id/answer.
Authentication
questions:writeRequest Body
Content-Type: multipart/form-data file: <image file> // image/jpeg, image/png, image/webp, image/avif — max 15MB
Response
{
"attachment": {
"key": "attachments/answer/<userId>/<uuid>.webp",
"url": "https://<host.tld>/attachments/answer/...",
"name": "image.jpg",
"mimeType": "image/webp",
"size": 12345,
"blurhash": "L...",
"width": 1024,
"height": 768
}
}/api/v1/answers/attachments/import-from-driveImport a file from the user's Misskey Drive. Response shape matches upload.
Authentication
questions:writeRequest Body
{
"fileId": "<misskey drive file id>"
}Response
{
"attachment": { /* same as upload response */ }
}/api/v1/misskey/drive/filesProxy to Misskey Drive files list. Only image/* files are returned.
Authentication
questions:writeQuery Parameters
folderId: string | null // omit / empty for root limit: number // default 50, max 100 untilId: string // optional pagination cursor
Response
{
"files": [
{
"id": "<misskey file id>",
"name": "image.jpg",
"type": "image/jpeg",
"size": 12345,
"url": "https://...",
"thumbnailUrl": "https://...",
"isSensitive": false,
"folderId": null,
"createdAt": "2026-05-19T..."
}
],
"hasMore": false,
"nextUntilId": "<misskey file id>" // next untilId (includes non-image files)
}/api/v1/misskey/drive/foldersProxy to Misskey Drive folders list. When folderId is given, current also contains that folder's details.
Authentication
questions:writeQuery Parameters
folderId: string | null // omit / empty for root limit: number // default 100, max 100 untilId: string // optional pagination cursor
Response
{
"folders": [
{
"id": "<misskey folder id>",
"name": "mewk",
"parentId": null,
"createdAt": "2026-05-19T...",
"foldersCount": 0,
"filesCount": 4
}
],
"current": { /* current folder if folderId given, else null */ },
"hasMore": false
}