---
title: "Rename a subtask attachment"
method: PUT
path: "/v1/tasks/{taskId}/subtasks/{subtaskId}/attachments/{attachmentId}"
tags: ["Task Attachments"]
---

# Rename a subtask attachment

`PUT /v1/tasks/{taskId}/subtasks/{subtaskId}/attachments/{attachmentId}`

Rename an attachment. Send the new name without an extension — the stored extension is kept.

## Path parameters

- `taskId` integer, required
- `subtaskId` integer, required
- `attachmentId` integer, required

## Headers

- `X-Org-Id` integer, required

## Request body

- AttachmentRenameRequest — Request object for renaming an attachment. The stored file and its extension are untouched.
  - `attachmentName` string, required — New name without the file extension — the original extension is kept and re-appended. Sending a name that contains a dot is rejected.

## Response `200`

Attachment renamed successfully

- ApiSuccessResponseAttachmentDto — Standard API success response structure
  - `success` boolean — Indicates if the operation was successful
  - `message` string — Message describing the result of the operation
  - `code` integer — HTTP status code of the response
  - `data` AttachmentDto
    - `tenantId` integer
    - `attachmentId` integer
    - `attachmentName` string
    - `attachmentUrl` string
    - `attachmentType` string
    - `size` integer
    - `projectId` integer
    - `spaceId` integer
    - `taskId` integer
    - `parentTaskId` integer
    - `commentId` integer
    - `createdBy` UserMinimalDto
      - `userId` integer
      - `firstName` string
      - `email` string
      - `profilePicURL` string
      - `profilePicColor` string
      - `provider` string
      - `role` OrgRoleDto
        - `orgRoleId` integer
        - `roleName` string
    - `createdTime` string, date-time
    - `taskName` string
    - `projectName` string
    - `spaceName` string
    - `chatAttachment` boolean
    - `isChatAttachment` boolean
  - `timestamp` string, date-time — Timestamp of the response

---

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