Skip to content

Update an attachment ​

PATCH/api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/attachments/{attachment_id}/

Updates an existing attachment by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path Parameters ​

workspace_slug:requiredstring

The workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL https://app.plane.so/my-team/projects/, the workspace slug is my-team.

project_id:requiredstring

The unique identifier of the project.

work_item_id:requiredstring

The unique identifier of the work item.

attachment_id:requiredstring

The unique identifier of the attachment.

Body Parameters ​

attributes:optionalobject

File metadata object containing name, size, and type.

asset:optionalstring

Storage path/identifier for the attachment file.

entity_type:optionalstring

Entity type of the attachment.

entity_identifier:optionalstring

Entity identifier for the attachment.

is_deleted:optionalboolean

Whether the attachment has been deleted.

is_archived:optionalboolean

Whether the attachment has been archived.

external_id:optionalstring

External identifier if the attachment is imported to Plane.

external_source:optionalstring

Name of the source if the attachment is imported to Plane.

size:optionalnumber

File size in bytes.

is_uploaded:optionalboolean

Whether the file has been successfully uploaded.

storage_metadata:optionalobject

Cloud storage metadata.

Update an attachment
bash
curl -X PATCH \
  "https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-items/work-item-uuid/attachments/{attachment_id}/" \
  -H "X-API-Key: $PLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "attributes": "example-attributes",
  "asset": "example-asset",
  "entity_type": "example-entity_type",
  "entity_identifier": "example-entity_identifier",
  "is_deleted": true,
  "is_archived": true,
  "external_id": "example-external_id",
  "external_source": "example-external_source",
  "size": 1,
  "is_uploaded": true,
  "storage_metadata": "example-storage_metadata"
}'
Response200
json
{
  "id": "project-uuid",
  "name": "Project Name",
  "identifier": "PROJ",
  "description": "Project description",
  "created_at": "2024-01-01T00:00:00Z"
}