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?1768449806",
"thumb": "https://files-test.productive.io/attachments/files/000/000/001/thumb/img.png?1768449806",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/001/original/img.png?1768449806",
"resized": false,
"created_at": "2026-01-15T05:03:26.767+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?1768449806",
"thumb": "https://files-test.productive.io/attachments/files/000/000/002/thumb/img.png?1768449806",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/002/original/img.png?1768449806",
"resized": false,
"created_at": "2026-01-15T05:03:26.874+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-01-15T05:03:26.940+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": "eyJleHBpcmF0aW9uIjoiMjAyNi0wMS0xNVQwNTowMzoyNloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXRlc3QifSx7ImtleSI6ImF0dGFjaG1lbnRzL2ZpbGVzLzAwMC8wMDAvMDA0L29yaWdpbmFsL2ltZy5wbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMzE0NTcyODAwXSx7IngtYW16LWNyZWRlbnRpYWwiOiJBU0lBUUdHUTQ2V1ZGVjQ2VUhUNi8yMDI2MDExNS9ldS13ZXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1kYXRlIjoiMjAyNjAxMTVUMDQwMzI2WiJ9LHsieC1hbXotc2VjdXJpdHktdG9rZW4iOiJJUW9KYjNKcFoybHVYMlZqRUdRYUNYVnpMV1ZoYzNRdE1TSkhNRVVDSUgyQm05VE5ueWttd3h1ZHdObGZNdjhva0l6azBxOG4rMFdIRk1OKzR1Zk5BaUVBdSsvdDF4NllMNUE5VGJQV0g1Ym1RZ3g5RFBneThWcnJ1V0c5eTZySGNKVXF1UVFJTFJBRUdnd3dNVE16TWpNd01EYzBNRElpREJDYUVoVkI2V3h5RUJEbWZTcVdCRld0cE1Va3c2VDRGZ1gvNU8vZDNYbE1EejcwWXdlczJseGVjSE96Mkc1R3pOcXc5M3dPSTRKR0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EUGoxaFJ5SklxOE9rTXQzeER4anNmaGNRU2VIdU5XU3FoNndmYkxqZVQyTit2Q3NIZW9aMmZFb0R3PT0ifV19",
"x-amz-credential": "ASIAQGGQ46WVFV46UHT6/20260115/eu-west-1/s3/aws4_request",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-date": "20260115T040326Z",
"x-amz-security-token": "IQoJb3JpZ2luX2VjEGQaCXVzLWVhc3QtMSJHMEUCIH2Bm9TNnykmwxudwNlfMv8okIzk0q8n+0WHFMN+4ufNAiEAu+/t1x6YL5A9TbPWH5bmQgx9DPgy8VrruWG9y6rHcJUquQQILRAEGgwwMTMzMjMwMDc0MDIiDBCaEhVB6WxyEBDmfSqWBFWtpMUkw6T4FgX/5O/d3XlMDz70Ywes2lxecHOz2G5GzNqw93wOI4JGG6y+4X6rxQi5Rp2O64Z4C3PMX6x3xvgNg3nPV0OartEhdXuJ82/GGPyJpl1rihVxgnc1/sm8K9l2syH8SM3z1N1fHb4kIC4qkSHBQKh1/U3qdteMF7jGPSZjSwPuYyIrBGiLom/eqt6As9ZMOEvtC4Gbr10yj6hA8VRQV96YNFOsdVDKS+RBU3ql617VI24+bHRw1Fd1QuzdHQHvPS9Uzkhz1C85a9QfH/zrniRTNzt4Ehb3pUifhiuPEKkoTjDxnLZ1rOuPlcP34mK5Cxnv6fbowgAbQvaKF22+VDOeEnk6fYFbxv5GKigFOmBXfB+zXyKRdLXwSkTMAW6UzIpn7Pk7v3SEeGN27+kk71KCsjOOfdsL8HN+zbo2XPKNEP5d/uBAF6wzLjetR5EEAarLo/0qchgTXu2nQOIYm76kKdZphyPttERy0h+vcnFh82RwsIk7XGbQKuD/OLxKEWhuLK4jW78LBE+yaGaf+9+2yy1EvBk2OcKCryVoIeLT2Do2aNDy54fQDqOaaBb12TAxXlptICHozgjC4n3TtndKOPqaMie7g9HQn7Sn1hw3bhRPfZcy9JsiB0GGwUhfDEJeIh4A0BBr7PnfK9dtMrhk2JwTtCJ29LNiQXXtxYPfY6cluDI6+0x3OsFYFqe2KzD9zKHLBjqTAVwVer+TYlGxlt1SOP58ktDRSV7iKUI8fDoqk+i0YPiJdUflydUyb9jCiLCK2oh4nWV6Bbt4reIE5SZ85O8ftquabcbOClk/44gM8S1sag+IlnIEHNui4DJXKOx2nwugSJk85fEGxVN3DPj1hRyJIq8OkMt3xDxjsfhcQSeHuNWSqh6wfbLjeT2N+vCsHeoZ2fEoDw==",
"x-amz-signature": "0d03effe862a7af9f93fa4f7c709311eef8f027fe1cd6e2d2ba4742b32aaafe9"
}
},
"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",
"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+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",
"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",
"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?1768449807",
"thumb": "https://files-test.productive.io/attachments/files/000/000/008/thumb/img.png?1768449807",
"temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
"resized": false,
"created_at": "2026-01-15T05:03:27.159+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",
"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 15 Jan 2026