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+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"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?1754093083",
"thumb": "https://files-test.productive.io/attachments/files/000/000/001/thumb/img.png?1754093083",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/001/original/img.png?1754093083",
"resized": false,
"created_at": "2025-08-02T02:04:43.787+02: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
}
}
}
}
],
"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+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"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?1754093083",
"thumb": "https://files-test.productive.io/attachments/files/000/000/002/thumb/img.png?1754093083",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/002/original/img.png?1754093083",
"resized": false,
"created_at": "2025-08-02T02:04:43.905+02:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment"
},
"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": {}
}
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+json
Body
{
"data": {
"type": "attachments",
"attributes": {
"name": "img.png",
"attachable_id": 5,
"attachable_type": "comment"
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"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": "2025-08-02T02:04:43.980+02: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": "eyJleHBpcmF0aW9uIjoiMjAyNS0wOC0wMlQwMTowNDo0M1oiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXRlc3QifSx7ImtleSI6ImF0dGFjaG1lbnRzL2ZpbGVzLzAwMC8wMDAvMDA0L29yaWdpbmFsL2ltZy5wbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMzE0NTcyODAwXSx7IngtYW16LWNyZWRlbnRpYWwiOiJBU0lBUUdHUTQ2V1ZBNlBVM1EyVC8yMDI1MDgwMi9ldS13ZXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1kYXRlIjoiMjAyNTA4MDJUMDAwNDQzWiJ9LHsieC1hbXotc2VjdXJpdHktdG9rZW4iOiJGd29HWlhJdllYZHpFT0gvLy8vLy8vLy8vd0VhREdpM0RYUmRTdWdFM0VESWRTTFBBL3pzanNRY2NCczgrTVBvWm9hMEdvUDRhM1h3WUVBMGxGb0V6Q243eGpEZzd0VEdveHR2M0l4RWlHN1NiR1dzR003WDZIcllSR2tjais2dElJNVdlaTVhNS9nTnRVSWMrUmhSRkZNbU84aGRwSWZOU3lZdkkwM2dLeHc0cGZuTldQOUZ6K1BLbGdnTUdzTzdtM1JNalpWUkRsUnBaQnk0NVZsUk4vYUhBcVhSZmlMWitHOGY0bEhhQU1weC9JZV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08PQimleXStYNsYef1fOof9wk1FjuI3tk52dXAgQLAuhaVo31SGCpE7vmxo6m6IyuezUiMuhqOC0JebOprGhJ89SDPrgviP/KnSUkBLVBYf2yLYB0V624xh/aysOOYLAlj7sWXOykjcIGPJ6jt9QKgcqKdjPHX2bhouX8YJwKRgWaraisab6gn3KheSgjqqkgDEObEwlLSuO2gGhmR33z0eX/T9PrZr4A5nvmjCgG+CgBS+mzhEsk4lRlYAfk24e1jbGkBeuHEuvTW/TdL6ngG0DJwJGNDFEuweEfQGvCUi2fhtWvk10s4GJrCmguB+cF9ZPnRdZJWQUWsxrl14oLr59HfrNt0JNZnNPX4xK9caURfmpl8L6fmt/yi5wCkohau1xAYyJWJJNKhtvANS8RtYGfM64EPDZwh7uklNgo2fc0SIElzrQliave4=",
"x-amz-signature": "dcc8cec4c9baca169107e9329130fbb883e817126861515f5140b24dd7206260"
}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "15"
}
},
"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+json
Body
{
"data": {
"type": "attachments",
"attributes": {
"attachable_type": ""
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is not included in the list",
"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+json
Body
{
"data": {
"type": "attachments",
"attributes": {
"name": "img.png",
"attachable_id": 7,
"attachable_type": "comment",
"size": 315621376
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "must be less than or equal to 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+json
Body
{
"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-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is reserved",
"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+json
Body
{
"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-8
Body
{
"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?1754093084",
"thumb": "https://files-test.productive.io/attachments/files/000/000/008/thumb/img.png?1754093084",
"temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
"resized": false,
"created_at": "2025-08-02T02:04:44.257+02:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "19"
}
},
"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+json
Body
{
"data": {
"type": "attachments",
"attributes": {
"attachable_type": ""
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "is not included in the list",
"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+json
Deletes a attachmentDELETE/api/v2/attachments/{id}
- id
number
(required) Example: 1attachment id
Generated by aglio on 02 Aug 2025