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?1771992226",
"thumb": "https://files-test.productive.io/attachments/files/000/000/001/thumb/img.png?1771992226",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/001/original/img.png?1771992226",
"resized": false,
"created_at": "2026-02-25T05:03:46.407+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?1771992226",
"thumb": "https://files-test.productive.io/attachments/files/000/000/002/thumb/img.png?1771992226",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/002/original/img.png?1771992226",
"resized": false,
"created_at": "2026-02-25T05:03:46.505+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-25T05:03:46.566+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": "eyJleHBpcmF0aW9uIjoiMjAyNi0wMi0yNVQwNTowMzo0NloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXRlc3QifSx7ImtleSI6ImF0dGFjaG1lbnRzL2ZpbGVzLzAwMC8wMDAvMDA0L29yaWdpbmFsL2ltZy5wbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMzE0NTcyODAwXSx7IngtYW16LWNyZWRlbnRpYWwiOiJBU0lBUUdHUTQ2V1ZHVFZBRDZFNS8yMDI2MDIyNS9ldS13ZXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1kYXRlIjoiMjAyNjAyMjVUMDQwMzQ2WiJ9LHsieC1hbXotc2VjdXJpdHktdG9rZW4iOiJJUW9KYjNKcFoybHVYMlZqRUR3YUNYVnpMV1ZoYzNRdE1TSklNRVlDSVFERkJ0UHNrT1ByRTQrRERobjIzWmFvaFhDS0c3amFGNkc4S2E4TUo1SVpMd0loQUtsMDRaTXVyaTNUVUZOUHc3cVZsQWFFRmxIRjlPYnNjYUxSOHltSlBpb1JLcmtFQ0FVUUJCb01NREV6TXpJek1EQTNOREF5SWd4Z0o4b0pYZzBvcHZHeHFqOHFsZ1F1ZVpVWS9hYWp0dmRDVjdvWmxHczI5bmtpTExSM3FNWnpIdWVVUHdOV3l5K2tTQ0dGR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REo1LzBiUkZjaDNlR2MvSnhtalpKNHlOVFBETDNwNE9KUzJ1bktWS3J3cCs2Z3gwOUdJWmZwUTQxY1dVRVBVTjdNSnFoUUdnPT0ifV19",
"x-amz-credential": "ASIAQGGQ46WVGTVAD6E5/20260225/eu-west-1/s3/aws4_request",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-date": "20260225T040346Z",
"x-amz-security-token": "IQoJb3JpZ2luX2VjEDwaCXVzLWVhc3QtMSJIMEYCIQDFBtPskOPrE4+DDhn23ZaohXCKG7jaF6G8Ka8MJ5IZLwIhAKl04ZMuri3TUFNPw7qVlAaEFlHF9ObscaLR8ymJPioRKrkECAUQBBoMMDEzMzIzMDA3NDAyIgxgJ8oJXg0opvGxqj8qlgQueZUY/aajtvdCV7oZlGs29nkiLLR3qMZzHueUPwNWyy+kSCGFEqW6F/eiRiRnGrVwA4Emrmmht/yVmVOlxKUWHBF7nxIoPUHehZ/dgoTzMmwohuRcimJDPX2NMNle0nAIqfRk3QgE87h56Owy6H+d819L8UqyNqfs4FjQKKt8Ct5daqhg8eFWYDLKe6UO8AhfG9Z673Mq316yGhJHb+5tdkdSsCIADljCjZ8LqYmsZ1KCi9Gi9mgS6HDnKbhrSWm7NnG0nCFH0nbkABPlc8gfdxv8LF9b5NAeIklxTBHf2uvNUJjwV/H7zuXcGmKFrYBAqQcOQyWGp+6ue2VGmHb7Hvo4137p5l6yMRNneu0FpiJzFRFgj9as6bTG1VNJAe1xHb9yFi4rYDVQMptQGTvDL5RJmN8GnMT9n3wnZgPLW0ZpnMNDXQL4UMvXmXJ90EUmjHyVwNx+WhDVJHjE4BXB+E4K1CSnhm2hGkY6OIKHYINW8qVhpZ+bEarT0LzePolyOzTtmzy9W0g6hM/RPfSAjdwOX6RjeRashOuSTnjCrCjTft73rikyFsOQ9x70ta8ZeA3whrAdSwVM3h3OrNlpdL8iH+va6VrrCBWdNatoSaR3tJmasvVNWFx5I0DtJQa1G0B+ZjxX3U1KTp1dDMJKwGAQ0UpVre5qPMkxcKyDTKgM0OMz3MrFxh2mpp+uJSzZWPbBAZow8+f5zAY6kgGOit91feb1WuN7UF7ZlmIB4TJe2iUoA3ce1Y7Mo36Zwn4hfv8u6M25n/G1an2guq69IlB2AumXXU6q+7JEsVZPy+KPOCAb86KYJ0jz6gNsijAzRR7LBrQjP4kQ9nDJ5/0bRFch3eGc/JxmjZJ4yNTPDL3p4OJS2unKVKrwp+6gx09GIZfpQ41cWUEPUN7MJqhQGg==",
"x-amz-signature": "e30b1019e718a52e2b0db70cfc76268eef585105ab1501c9f1218e016d0eb4c1"
}
},
"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?1771992226",
"thumb": "https://files-test.productive.io/attachments/files/000/000/008/thumb/img.png?1771992226",
"temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
"resized": false,
"created_at": "2026-02-25T05:03:46.784+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 25 Feb 2026