Get upload credentials ​
POST/api/v1/workspaces/{slug}/projects/{project_id}/work-items/{issue_id}/attachments/
Generate presigned URL for uploading file attachments to a work item.
Path Parameters ​
issue_id:requiredstringIssue ID
project_id:requiredstringProject ID
slug:requiredstringWorkspace slug
Body Parameters ​
name:requiredstringOriginal filename of the asset
type:optionalstringMIME type of the file
size:requiredintegerFile size in bytes
external_id:optionalstringExternal identifier for the asset (for integration tracking)
external_source:optionalstringExternal source system (for integration tracking)
Scopes ​
projects.work_items.attachments:write
Get upload credentials
bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/work-items/550e8400-e29b-41d4-a716-446655440001/attachments/" \
-H "X-API-Key: $PLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Name",
"type": "application/pdf",
"size": 1024000,
"external_id": "550e8400-e29b-41d4-a716-446655440000",
"external_source": "github"
}'python
import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/work-items/550e8400-e29b-41d4-a716-446655440001/attachments/",
headers={"X-API-Key": "your-api-key"},
json={
"name": "Example Name",
"type": "application/pdf",
"size": 1024000,
"external_id": "550e8400-e29b-41d4-a716-446655440000",
"external_source": "github"
}
)
print(response.json())javascript
const response = await fetch(
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/work-items/550e8400-e29b-41d4-a716-446655440001/attachments/",
{
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Example Name",
type: "application/pdf",
size: 1024000,
external_id: "550e8400-e29b-41d4-a716-446655440000",
external_source: "github",
}),
}
);
const data = await response.json();Response200
json
{
"detail": "Presigned download URL generated successfully"
}
