> ## Documentation Index
> Fetch the complete documentation index at: https://developers.plane.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Get upload credentials

> Creates a pre-signed POST form data for uploading an attachment directly to S3. This endpoint handles the first step of the two-and-a-half step upload process where you first get the upload credentials and then use them to upload the actual file.

## Path parameters

<ParamField path="workspace_slug" type="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`.
</ParamField>

<ParamField path="project_id" type="string" required>The unique identifier of the project.</ParamField>
<ParamField path="work_item_id" type="string" required>The unique identifier of the work item.</ParamField>

## Body parameters

<ParamField body="name" type="string" required>Original filename of the attachment.</ParamField>

<ParamField body="type" type="string">
  MIME type of the file (e.g., `image/png`, `application/pdf`).
</ParamField>

<ParamField body="size" type="integer" required>Size of the file in bytes.</ParamField>

<ParamField body="external_id" type="string">
  External identifier for the asset (for integration tracking).
</ParamField>

<ParamField body="external_source" type="string">
  External source system (for integration tracking).
</ParamField>

## Response

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

```json theme={null}
{
    "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>/work-items/<issue-id>/attachments/<asset-id>/"
}
```
