API Documentation
Attachments ¶
Attachments ¶
The attachment object represents files such as images, PDFs and documents that can be assigned to other objects. These include, but are not limited, to tasks, comments, expenses and purchase orders. With attachments, users can provide relevant information, resources and additional context for related objects.
You can find more about attachments in our Help documentation: Working with attachments
For more details on how to work with attachment files through our API please refer to Working with attachments guide.
Supported filter params
-
comment_id (array)
-
page_id (array)
-
task_id (array)
GET /api/v2/attachments?filter[comment_id]=3
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": [
{
"id": "1",
"type": "attachments",
"attributes": {
"name": "img.png",
"content_type": "image/png",
"size": 3479,
"url": "https://files-test.productive.io/attachments/files/000/000/001/original/img.png?1770177767",
"thumb": "https://files-test.productive.io/attachments/files/000/000/001/thumb/img.png?1770177767",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/001/original/img.png?1770177767",
"resized": false,
"created_at": "2026-02-04T05:02:47.713+01:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "12"
}
},
"creator": {
"meta": {
"included": false
}
},
"invoice": {
"meta": {
"included": false
}
},
"purchase_order": {
"meta": {
"included": false
}
},
"bill": {
"meta": {
"included": false
}
},
"email": {
"meta": {
"included": false
}
},
"page": {
"meta": {
"included": false
}
},
"expense": {
"meta": {
"included": false
}
},
"comment": {
"meta": {
"included": false
}
},
"task": {
"meta": {
"included": false
}
},
"document_style": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/attachments?filter%5Bcomment_id%5D=3&page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/attachments?filter%5Bcomment_id%5D=3&page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}Get attachmentsGET/api/v2/attachments
GET /api/v2/attachments/2
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "2",
"type": "attachments",
"attributes": {
"name": "img.png",
"content_type": "image/png",
"size": 3479,
"url": "https://files-test.productive.io/attachments/files/000/000/002/original/img.png?1770177767",
"thumb": "https://files-test.productive.io/attachments/files/000/000/002/thumb/img.png?1770177767",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/002/original/img.png?1770177767",
"resized": false,
"created_at": "2026-02-04T05:02:47.806+01:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "13"
}
},
"creator": {
"meta": {
"included": false
}
},
"invoice": {
"meta": {
"included": false
}
},
"purchase_order": {
"meta": {
"included": false
}
},
"bill": {
"meta": {
"included": false
}
},
"email": {
"meta": {
"included": false
}
},
"page": {
"meta": {
"included": false
}
},
"expense": {
"meta": {
"included": false
}
},
"comment": {
"meta": {
"included": false
}
},
"task": {
"meta": {
"included": false
}
},
"document_style": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Gets a attachmentGET/api/v2/attachments/{id}
- id
number(required) Example: 1attachment id
POST /api/v2/attachments
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "attachments",
"attributes": {
"name": "img.png",
"attachable_id": 5,
"attachable_type": "comment"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "4",
"type": "attachments",
"attributes": {
"name": "img.png",
"content_type": null,
"size": null,
"url": "https://files-test.productive.io/attachments/files/000/000/004/original/img.png",
"thumb": null,
"temp_url": null,
"resized": false,
"created_at": "2026-02-04T05:02:47.906+01:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment",
"aws_policy": {
"key": "attachments/files/000/000/004/original/img.png",
"success_action_status": "201",
"policy": "eyJleHBpcmF0aW9uIjoiMjAyNi0wMi0wNFQwNTowMjo0N1oiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXRlc3QifSx7ImtleSI6ImF0dGFjaG1lbnRzL2ZpbGVzLzAwMC8wMDAvMDA0L29yaWdpbmFsL2ltZy5wbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMzE0NTcyODAwXSx7IngtYW16LWNyZWRlbnRpYWwiOiJBU0lBUUdHUTQ2V1ZEUUxGUFlVVi8yMDI2MDIwNC9ldS13ZXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1kYXRlIjoiMjAyNjAyMDRUMDQwMjQ3WiJ9LHsieC1hbXotc2VjdXJpdHktdG9rZW4iOiJJUW9KYjNKcFoybHVYMlZqRUVRYUNYVnpMV1ZoYzNRdE1TSkdNRVFDSUhINjJ3MlFNVnRGTDB4a29YY1hjSE1tUE9PaVJ2UllyOTNvY29oRzQyZ0NBaUFjKzdFbzlCd1p2bisxSjRvbU5KcTU2NjdlMC9mdVZ6Q1YvellldTBxY3h5cTVCQWdORUFRYUREQXhNek15TXpBd056UXdNaUlNZEJyU3dYNXREd2lBdDArN0twWUVoaWpnRjB1aFNOUjUvdDlMM0Q0Q1FjTmMvU1E2VndqTndnY0tQMmVmdk5BNm9FODlYcm5pb2lUN0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pPbGRaZ1Vja2dTS0txUWt4OGNCY2h5WGpJdk94T0RZd0xCcENIcFB5dUFVdlUycjBubGIxcnV1OHkyVFkyNWI0OEdlVjRTUGkvNHdyRXRwMU5BPT0ifV19",
"x-amz-credential": "ASIAQGGQ46WVDQLFPYUV/20260204/eu-west-1/s3/aws4_request",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-date": "20260204T040247Z",
"x-amz-security-token": "IQoJb3JpZ2luX2VjEEQaCXVzLWVhc3QtMSJGMEQCIHH62w2QMVtFL0xkoXcXcHMmPOOiRvRYr93ocohG42gCAiAc+7Eo9BwZvn+1J4omNJq5667e0/fuVzCV/zYeu0qcxyq5BAgNEAQaDDAxMzMyMzAwNzQwMiIMdBrSwX5tDwiAt0+7KpYEhijgF0uhSNR5/t9L3D4CQcNc/SQ6VwjNwgcKP2efvNA6oE89XrnioiT7I5X2TOkLiGN7HEmydep5Y2vBlhsYDjX/RaBqsP2TEvfvTTR5EZqpMBoFGxC7pkIMgaWB3vgds3wofn2+qPMRPuZC4TxfteUWv734o4wvgG+Ze8Una2JJDsz7r4o5g39uRddcomRvbjxC4a7r4djhG13vJhF+A3ylz6Ms/94SPZ6ri0mG7RBJaHXTdFnnMObdm/NyhAqsy7dBgTvmWIGX4Pm+Y6oKAKtPoWc9Gk3fDm3RC9VGLtL0ljLukqjAWD0Wed3ehbjRuw70Ra8zl/HbSla/tcneAgCjO4NODsOJ0ma98RyLI6yEzAmPVygGa7ulhFaY0HXokSCeER27pi6oCz69mC97IrJN0JEGcUQd2uq4DQSXn9RB5maXRe7zF84hd5vkTD++1aKlnMsZkziBFJbDkBDngs0fpfrx7VI97G9JW11DhQ86VI1U3k5diq2pKoJv89Pe27mWgoTNNU5bROTLw9yB6zyvcUlk5iUYVNht3XNMSRUhUIJgFsoijEXw2hqcBmZvzj1PTy+VTiVvp5DAGO+V60Of3CJ2rq3VhSMeRcZ9/5MwjzF/4IpHE/XDbH1SWSnIbz7+Qg2Bg2ypJmL5dOw/Vk6kTYZYpG/eqm2CllbVoDSMSO9vf5bmekkvDof8iB7HAwF3i5C/MNOIi8wGOpQBTY/tJ8GRjVQl03re8nV3wENurVilqnXOWSVnoCJqDGxXshMoqasW9gApUL5pr++gpialGbNynmymXRUnKJjwBepejOnxX5wu92XH1/Z5EisTkRy3zpkZOldZgUckgSKKqQkx8cBchyXjIvOxODYwLBpCHpPyuAUvU2r0nlb1ruu8y2TY25b48GeV4SPi/4wrEtp1NA==",
"x-amz-signature": "68262f4dd2c40371604f102a5654f475da9c410d67e4abe3d0c9be84a44fa61b"
}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "14"
}
},
"creator": {
"meta": {
"included": false
}
},
"invoice": {
"meta": {
"included": false
}
},
"purchase_order": {
"meta": {
"included": false
}
},
"bill": {
"meta": {
"included": false
}
},
"email": {
"meta": {
"included": false
}
},
"page": {
"meta": {
"included": false
}
},
"expense": {
"meta": {
"included": false
}
},
"comment": {
"meta": {
"included": false
}
},
"task": {
"meta": {
"included": false
}
},
"document_style": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/attachments
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "attachments",
"attributes": {
"attachable_type": ""
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"meta": {},
"source": {
"pointer": "data/attributes/name"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is not included in the list",
"meta": {
"allow_nil": true,
"value": ""
},
"source": {
"pointer": "data/attributes/attachable_type"
}
}
]
}POST /api/v2/attachments
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "attachments",
"attributes": {
"name": "img.png",
"attachable_id": 7,
"attachable_type": "comment",
"size": 315621376
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "must be less than or equal to 314572800",
"meta": {
"allow_nil": true,
"value": 315621376,
"count": 314572800
},
"source": {
"pointer": "data/attributes/size"
}
}
]
}POST /api/v2/attachments
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "attachments",
"attributes": {
"name": "img.png",
"attachable_id": 8,
"attachable_type": "comment",
"content_type": "application/x-msdownload"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is reserved",
"meta": {
"value": "application/x-msdownload"
},
"source": {
"pointer": "data/attributes/content_type"
}
}
]
}Create a attachmentPOST/api/v2/attachments
- name
string(required) Example: namename
- id
string(required) Example: Commentattachable_type
PATCH /api/v2/attachments/8
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "attachments",
"attributes": {
"temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "8",
"type": "attachments",
"attributes": {
"name": "img.png",
"content_type": "image/png",
"size": 3479,
"url": "https://files-test.productive.io/attachments/files/000/000/008/original/img.png?1770177768",
"thumb": "https://files-test.productive.io/attachments/files/000/000/008/thumb/img.png?1770177768",
"temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
"resized": false,
"created_at": "2026-02-04T05:02:48.178+01:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "18"
}
},
"creator": {
"meta": {
"included": false
}
},
"invoice": {
"meta": {
"included": false
}
},
"purchase_order": {
"meta": {
"included": false
}
},
"bill": {
"meta": {
"included": false
}
},
"email": {
"meta": {
"included": false
}
},
"page": {
"meta": {
"included": false
}
},
"expense": {
"meta": {
"included": false
}
},
"comment": {
"meta": {
"included": false
}
},
"task": {
"meta": {
"included": false
}
},
"document_style": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/attachments/9
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "attachments",
"attributes": {
"attachable_type": ""
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is not included in the list",
"meta": {
"allow_nil": true,
"value": ""
},
"source": {
"pointer": "data/attributes/attachable_type"
}
}
]
}Update a attachmentPATCH/api/v2/attachments/{id}
- id
number(required) Example: 1attachment id
DELETE /api/v2/attachments/10
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonDeletes a attachmentDELETE/api/v2/attachments/{id}
- id
number(required) Example: 1attachment id
Generated by aglio on 04 Feb 2026