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?1775016232",
"thumb": "https://files-test.productive.io/attachments/files/000/000/001/thumb/img.png?1775016232",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/001/original/img.png?1775016232",
"resized": false,
"created_at": "2026-04-01T06:03:52.908+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
}
}
}
}
],
"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?1775016233",
"thumb": "https://files-test.productive.io/attachments/files/000/000/002/thumb/img.png?1775016233",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/002/original/img.png?1775016233",
"resized": false,
"created_at": "2026-04-01T06:03:53.011+02:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment"
},
"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": {}
}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-04-01T06:03:53.072+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": "eyJleHBpcmF0aW9uIjoiMjAyNi0wNC0wMVQwNTowMzo1M1oiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXRlc3QifSx7ImtleSI6ImF0dGFjaG1lbnRzL2ZpbGVzLzAwMC8wMDAvMDA0L29yaWdpbmFsL2ltZy5wbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMzE0NTcyODAwXSx7IngtYW16LWNyZWRlbnRpYWwiOiJBU0lBUUdHUTQ2V1ZMSjI1N1RGVC8yMDI2MDQwMS9ldS13ZXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1kYXRlIjoiMjAyNjA0MDFUMDQwMzUzWiJ9LHsieC1hbXotc2VjdXJpdHktdG9rZW4iOiJJUW9KYjNKcFoybHVYMlZqRUlULy8vLy8vLy8vL3dFYUNYVnpMV1ZoYzNRdE1TSkdNRVFDSUdKRVREZkd4Zm4raW1JY055VlJoVEZpdmxWQ2ZyQXVxUjMxRGVBNEhQcmFBaUFyMlNFMHlLaGhpYzZGMG9xMjFwTFVncnM4SXRpcTVPNjhraWVxZmlyUk1pcTVCQWhORUFRYUREQXhNek15TXpBd056UXdNaUlNTXg3UVBJc1dSTUt4YWo3M0twWUUrOTBKdlNnZURWQjV6U1lPQ1ZEeTluRWZGNXR3QnYrd3VYV2JxVytEVFdNR0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ltNGdSY09uVjdBSG5LbXp1MHpaWENOOExNdXhMeUpKVm1ZOWxacEdYZ1NJcmlpUjhCVUFObzhKV0NiaVl0dWZyQ2l3PT0ifV19",
"x-amz-credential": "ASIAQGGQ46WVLJ257TFT/20260401/eu-west-1/s3/aws4_request",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-date": "20260401T040353Z",
"x-amz-security-token": "IQoJb3JpZ2luX2VjEIT//////////wEaCXVzLWVhc3QtMSJGMEQCIGJETDfGxfn+imIcNyVRhTFivlVCfrAuqR31DeA4HPraAiAr2SE0yKhhic6F0oq21pLUgrs8Itiq5O68kieqfirRMiq5BAhNEAQaDDAxMzMyMzAwNzQwMiIMMx7QPIsWRMKxaj73KpYE+90JvSgeDVB5zSYOCVDy9nEfF5twBv+wuXWbqW+DTWMGLMU28XMA+cjbxjwxRY5gw5fx4s80puI1lQWO16vJN4xtImecDegOPrVws5APvvb+R6X7SfMnNYrwi/ueOCFLm+edw9Bxt6TiBGlInXa6b+FYnbitqnu1vLUjvbw1V69UOOH2ue6GbFopNdbRM6P0hBnnjWfNbc1/huD1ib6cIKKelUTf65XDhDYL/E8eoYmYp3EPiTwKRVcx28l6kC0G5rY5OZB4z87SD55Ol+zNg5jzgSQN823YRg2E1LV5uxDU5u52VXJhNNXXtTCFMqUeBSOQZpLHLwbO0YWqmmM9hBPX1qH65ibCyQdlELZKPhZA3YTknvQ3OoIZcBFUsK4zwLhAb3AlfqeKDptJIVlE6iV9lqYoSN0h8Ra4nm13SKZDFBn0UY1yQizWbuW7sf4OlSj4zgk0gEsbHmDlCMTEWYEH6k+uLNgMiYgOpGO173l2DgINHivgFEjwuucQMrDOIbbD6Z7n9FnqQ8BeaNQUzJi6OFDAd0rqdFQG6TMbPJwOAVVWImuJTSwbieFhbC6VYSeBSjOF6ndqnIXUYODByDa1a8+uC+dJlj6CiMDGKNp3MrV40/S5EYc+b+K5rW0+nYKu7xpiQWU8Xh/N8Gxb1sbFkbqzuqD/6Ui6zJ9TH8xopK6hSWPNNNtr0mFHwXdMtsIGJeGaMI6xss4GOpQBTx13oI9MOWuKrEOL53zinF9pupYIGk4EkSz/h3X/ZrqSeRYBXE8S0725K0+kflz+MfeWytd3YYpjtm6GKQad9DdsE3Hrv3VziQVY1eQFklmcPfwGybQzg3NE0uOVDz8pfk9m4gRcOnV7AHnKmzu0zZXCN8LMuxLyJJVmY9lZpGXgSIriiR8BUANo8JWCbiYtufrCiw==",
"x-amz-signature": "b5caac540119fc832c8d6d5e27b0867be01d6080869d498786b4f65cb65f6ac0"
}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "16"
}
},
"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?1775016233",
"thumb": "https://files-test.productive.io/attachments/files/000/000/008/thumb/img.png?1775016233",
"temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
"resized": false,
"created_at": "2026-04-01T06:03:53.299+02:00",
"deleted_at": null,
"attachment_type": null,
"message_id": null,
"external_id": null,
"attachable_type": "comment"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "20"
}
},
"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 01 Apr 2026