POST
/
api
/
v1
/
workspaces
/
{workspace-slug}
/
projects
/
{project_id}
/
issues
/
{issue_id}
/
issue-attachments
curl --request POST \
  --url https://api.plane.so/api/v1/workspaces/{workspace-slug}/projects/{project_id}/issues/{issue_id}/issue-attachments/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "type": "<string>",
  "size": 123
}'

Path parameters

workspace-slug
string
required

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
string
required
The unique identifier of the project
issue_id
string
required
The unique identifier of the issue

Body

name
string
required
Original filename of the attachment
type
string
required
MIME type of the file (e.g., image/png, application/pdf)
size
integer
required
Size of the file in bytes

Response

Returns an object containing the S3 pre-signed POST data for direct upload.

{
    "upload_data": {
        "url": "<upload-url>",
        "fields": {
            "Content-Type": "image/png",
            "key": "<workspace-id>/<unique-id>-filename",
            "x-amz-algorithm": "AWS4-HMAC-SHA256",
            "x-amz-credential": "<REDACTED_AWS_KEY>/<date>/<region>/s3/aws4_request",
            "x-amz-date": "<ISO8601_TIMESTAMP>",
            "policy": "<BASE64_ENCODED_POLICY>",
            "x-amz-signature": "<SIGNATURE_HASH>"
        }
    },
    "asset_id": "<uuid>",
    "attachment": {
        "id": "<uuid>",
        "created_at": "2025-01-03T12:07:35.621734Z",
        "updated_at": "2025-01-03T12:07:35.621766Z",
        "deleted_at": null,
        "attributes": {
            "name": "filename",
            "type": "image/png",
            "size": 5242880
        },
        "asset": "<workspace-id>/<unique-id>-filename",
        "entity_type": "ISSUE_ATTACHMENT",
        "is_deleted": false,
        "is_archived": false,
        "external_id": null,
        "external_source": null,
        "size": 5242880.0,
        "is_uploaded": false,
        "storage_metadata": {},
        "created_by": "<user-id>",
        "updated_by": null,
        "workspace": "<workspace-id>",
        "project": "<project-id>",
        "issue": "<issue-id>",
    },
    "asset_url": "/api/assets/v2/workspaces/<workspace-slug>/projects/<project-id>/issues/<issue-id>/attachments/<asset-id>/"
}