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?1775534587",
"thumb": "https://files-test.productive.io/attachments/files/000/000/001/thumb/img.png?1775534587",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/001/original/img.png?1775534587",
"resized": false,
"created_at": "2026-04-07T06:03:07.367+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?1775534587",
"thumb": "https://files-test.productive.io/attachments/files/000/000/002/thumb/img.png?1775534587",
"temp_url": "https://files-test.productive.io/attachments/files/000/000/002/original/img.png?1775534587",
"resized": false,
"created_at": "2026-04-07T06:03:07.500+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-07T06:03:07.588+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": "eyJleHBpcmF0aW9uIjoiMjAyNi0wNC0wN1QwNTowMzowN1oiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXRlc3QifSx7ImtleSI6ImF0dGFjaG1lbnRzL2ZpbGVzLzAwMC8wMDAvMDA0L29yaWdpbmFsL2ltZy5wbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMzE0NTcyODAwXSx7IngtYW16LWNyZWRlbnRpYWwiOiJBU0lBUUdHUTQ2V1ZKRjU2NFdRSi8yMDI2MDQwNy9ldS13ZXN0LTEvczMvYXdzNF9yZXF1ZXN0In0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1kYXRlIjoiMjAyNjA0MDdUMDQwMzA3WiJ9LHsieC1hbXotc2VjdXJpdHktdG9rZW4iOiJJUW9KYjNKcFoybHVYMlZqRUJRYUNYVnpMV1ZoYzNRdE1TSkdNRVFDSURBMWZQT1V3Q1U1ZjlFZVFrRzMzejg2WjVscU45WDRRbFpRYVlFY1BoK0dBaUIrbm9xS0NDTXgyNXVlWkRJVkUvNW4vZVl6ejBOTkRpNy9mVitKTGhRK095ckNCQWpkLy8vLy8vLy8vLzhCRUFRYUREQXhNek15TXpBd056UXdNaUlNWjNpVS9Va1EyOEJxK1hITEtwWUVWd1JrbjBGR1o1WXJVT3R0a2V1KzNxTmZPTTFLd3lQN2NVeUM0WlRROEx4QXF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RFRha0p2bTZlRk52R0c3Q1B1aG12SDZOV3BUa3R2MDJnaFhaL2QyUjVudm5MSENOZmJsV1E2R0h6cnFmYXBGblg3YVdwMnAwMTNnR0RqZDNpZEhRPT0ifV19",
"x-amz-credential": "ASIAQGGQ46WVJF564WQJ/20260407/eu-west-1/s3/aws4_request",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-date": "20260407T040307Z",
"x-amz-security-token": "IQoJb3JpZ2luX2VjEBQaCXVzLWVhc3QtMSJGMEQCIDA1fPOUwCU5f9EeQkG33z86Z5lqN9X4QlZQaYEcPh+GAiB+noqKCCMx25ueZDIVE/5n/eYzz0NNDi7/fV+JLhQ+OyrCBAjd//////////8BEAQaDDAxMzMyMzAwNzQwMiIMZ3iU/UkQ28Bq+XHLKpYEVwRkn0FGZ5YrUOttkeu+3qNfOM1KwyP7cUyC4ZTQ8LxAqPXkMkrsn8/XzK9J3mjNtCBdlo37LQTZ63yxXImko5Y7s0lAhZmpmD2x9VgSmeUl7AwBWA5ZcfBO11jO/Q2fhU+ZvTMtnhURs+8LWEba5TjauGqRkvx/bqxaxKZQJdxSXn9rUPazJMqCxHSZ9oHzZC/MKXku8oHugi9JBUSMYbX6vOQHqp7OUO1x0pifsoK5nI2SlJ+6cJ4ttJTL00urofYi/YIWF9eWSfZJR97uhJj9lpL6uh5zm1w4jsI+wT8y8eKt1TH9gzVJlOXsUm/8H65AZ3qWWRMTUG9r8jREY3uPSqb14mgPN5BhT7/pHLMEk8m9+1RnAfJmIbPZaTTYrkFby0gvDVPP4P/OjqLsNXorwdikjZ2wvIel+1DrRCKkhAq/PrW0G9ieMJq8meqkSWC/upD89xbiDG/IGexOk9EbbsZqRnXI4Z5F37z5oiMHjb/3619x0Tq9c+XL9//rUwLwC23N+eiZVL2ztnCf2wkPekY+UyizFePnhOeCA11sIeyMkWoZxa6xIujljAX0Q7t/ZRVQy911DHZwgh+NmtDehntyhkLTIJoCoy9Fgb5MHpyAklQsCgUiVdKamNSRbTpuYEYgKp3vLK12yjK2Hr54On/k+niazLBpkbF44fMf2DUsT9Mo0TISOPBfq5yvhboth9hcMM+C0s4GOpQBLJsf6lO97rFb2s66FXbOL9OJoBoOAiE63/CzQu30e3RP/6CKgQqziA0C68x+eK4gouf18GGvZzmc7nDByVJMGjDmlA+LnWVAY9hRgJfA8Sh8K35dRpDTakJvm6eFNvGG7CPuhmvH6NWpTktv02ghXZ/d2R5nvnLHCNfblWQ6GHzrqfapFnX7aWp2p013gGDjd3idHQ==",
"x-amz-signature": "29637c8de78f02bbfa498dafec8ac8a2c641e3592f6459267348cfe8ad691d82"
}
},
"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?1775534588",
"thumb": "https://files-test.productive.io/attachments/files/000/000/008/thumb/img.png?1775534588",
"temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
"resized": false,
"created_at": "2026-04-07T06:03:08.017+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 07 Apr 2026