API Documentation

API Endpoint

Attachments

Attachments

Supported filter params

  • comment_id (array)

  • page_id (array)

  • task_id (array)

GET /api/v2/attachments
Requestsreturns attachments

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
Responses200
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": "/system/attachments/files/000/000/001/original/img.png?1632179031",
        "thumb": "/system/attachments/files/000/000/001/thumb/img.png?1632179031",
        "temp_url": null,
        "processed": false,
        "resized": false,
        "created_at": "2021-09-21T01:03:51.784+02:00",
        "deleted_at": null,
        "attachable_type": "comment",
        "aws_policy": {
          "key": "attachments/files/000/000/001/original/img.png",
          "acl": "public-read",
          "success_action_status": "201",
          "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
          "X-Amz-Credential": "AKIAJDSJUJWWOMVPNYZQ/20210920/us-east-1/s3/aws4_request",
          "X-Amz-Date": "20210920T230351Z",
          "X-Amz-Signature": "a7c2993f620b2f7035c406fd66040743da33d2935a6c83bfe121ef6d53ffa8de",
          "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wOS0yMVQwOTowMzo1MVoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA5MjAvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwOTIwVDIzMDM1MVoifV19",
          "Content-Type": "image/png"
        }
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "107"
          }
        },
        "invoice": {
          "data": null
        },
        "email": {
          "data": null
        },
        "page": {
          "data": null
        },
        "expense": {
          "data": null
        },
        "comment": {
          "data": {
            "type": "comments",
            "id": "3"
          }
        },
        "task": {
          "data": null
        },
        "document_style": {
          "data": null
        },
        "document_type": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "107",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user107@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:03:51.000+02:00",
        "last_seen_at": "2021-09-21T01:03:51.808+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 107,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:03:51.673+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "125"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "3",
      "type": "comments",
      "attributes": {
        "commentable_type": "company",
        "body": "test body",
        "created_at": "2021-09-21T01:03:51.698+02:00",
        "pinned_at": null,
        "edited_at": null,
        "deleted_at": null,
        "reactions": {},
        "hidden": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "107"
          }
        },
        "pinned_by": {
          "data": null
        },
        "person": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "126"
          }
        },
        "deal": {
          "data": null
        },
        "task": {
          "data": null
        },
        "invoice": {
          "data": null
        },
        "attachments": {
          "data": [
            {
              "type": "attachments",
              "id": "1"
            }
          ]
        }
      }
    },
    {
      "id": "125",
      "type": "companies",
      "attributes": {
        "name": "Organization21",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:03:51.672+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        }
      }
    },
    {
      "id": "126",
      "type": "companies",
      "attributes": {
        "name": "Client105",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-09-21T01:03:51.695+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://www.example.com/api/v2/attachments?filter%5Bcomment_id%5D=3&page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://www.example.com/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,
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

Get attachments
GET/api/v2/attachments


GET /api/v2/attachments/1
Requestsreturns attachment

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
Responses200
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": "/system/attachments/files/000/000/002/original/img.png?1632179032",
      "thumb": "/system/attachments/files/000/000/002/thumb/img.png?1632179032",
      "temp_url": null,
      "processed": false,
      "resized": false,
      "created_at": "2021-09-21T01:03:52.100+02:00",
      "deleted_at": null,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "attachments/files/000/000/002/original/img.png",
        "acl": "public-read",
        "success_action_status": "201",
        "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
        "X-Amz-Credential": "AKIAJDSJUJWWOMVPNYZQ/20210920/us-east-1/s3/aws4_request",
        "X-Amz-Date": "20210920T230352Z",
        "X-Amz-Signature": "3e08e70474ce381fcb723bd2a644da00d751fc80767d4a04cc82a2d259735571",
        "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wOS0yMVQwOTowMzo1MloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA5MjAvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwOTIwVDIzMDM1MloifV19",
        "Content-Type": "image/png"
      }
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 22
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "108"
        }
      },
      "invoice": {
        "data": null
      },
      "email": {
        "data": null
      },
      "page": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "comment": {
        "data": {
          "type": "comments",
          "id": "4"
        }
      },
      "task": {
        "data": null
      },
      "document_style": {
        "data": null
      },
      "document_type": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "108",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user108@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:03:52.000+02:00",
        "last_seen_at": "2021-09-21T01:03:52.135+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 108,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:03:52.011+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 22
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "127"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "4",
      "type": "comments",
      "attributes": {
        "commentable_type": "company",
        "body": "test body",
        "created_at": "2021-09-21T01:03:52.044+02:00",
        "pinned_at": null,
        "edited_at": null,
        "deleted_at": null,
        "reactions": {},
        "hidden": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 22
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "108"
          }
        },
        "pinned_by": {
          "data": null
        },
        "person": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "128"
          }
        },
        "deal": {
          "data": null
        },
        "task": {
          "data": null
        },
        "invoice": {
          "data": null
        },
        "attachments": {
          "data": [
            {
              "type": "attachments",
              "id": "2"
            }
          ]
        }
      }
    },
    {
      "id": "127",
      "type": "companies",
      "attributes": {
        "name": "Organization22",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:03:52.010+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 22
          }
        }
      }
    },
    {
      "id": "128",
      "type": "companies",
      "attributes": {
        "name": "Client106",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-09-21T01:03:52.040+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 22
          }
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

Gets a attachment
GET/api/v2/attachments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

attachment id


POST /api/v2/attachments
Requestscreates attachmentreturns error

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"
    }
  }
}
Responses201
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": "/system/attachments/files/000/000/004/original/img.png",
      "thumb": null,
      "temp_url": null,
      "processed": false,
      "resized": false,
      "created_at": "2021-09-21T01:03:52.535+02:00",
      "deleted_at": null,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "attachments/files/000/000/004/original/img.png",
        "acl": "public-read",
        "success_action_status": "201",
        "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
        "X-Amz-Credential": "AKIAJDSJUJWWOMVPNYZQ/20210920/us-east-1/s3/aws4_request",
        "X-Amz-Date": "20210920T230352Z",
        "X-Amz-Signature": "3e08e70474ce381fcb723bd2a644da00d751fc80767d4a04cc82a2d259735571",
        "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wOS0yMVQwOTowMzo1MloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA5MjAvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwOTIwVDIzMDM1MloifV19",
        "Content-Type": null
      }
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 23
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "109"
        }
      },
      "invoice": {
        "data": null
      },
      "email": {
        "data": null
      },
      "page": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "comment": {
        "data": null
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "document_style": {
        "data": null
      },
      "document_type": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "109",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user109@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:03:52.000+02:00",
        "last_seen_at": "2021-09-21T01:03:52.526+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 109,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:03:52.423+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 23
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "129"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "129",
      "type": "companies",
      "attributes": {
        "name": "Organization23",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:03:52.422+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 23
          }
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

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": ""
    }
  }
}
Responses422
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": "can't be blank",
      "source": {
        "pointer": "data/attributes/attachable_type"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/attachable_type"
      }
    }
  ]
}

Create a attachment
POST/api/v2/attachments

URI Parameters
HideShow
name
string (required) Example: name

name

id
string (required) Example: Comment

attachable_type


PATCH /api/v2/attachments/1
Requestsupdates attachmentreturns error

PATCH  /api/v2/attachments/6

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"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "content_type": "image/png",
      "size": 3479,
      "url": "/system/attachments/files/000/000/006/original/img.png?1632179032",
      "thumb": "/system/attachments/files/000/000/006/thumb/img.png?1632179032",
      "temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
      "processed": false,
      "resized": false,
      "created_at": "2021-09-21T01:03:52.850+02:00",
      "deleted_at": null,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "attachments/files/000/000/006/original/img.png",
        "acl": "public-read",
        "success_action_status": "201",
        "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
        "X-Amz-Credential": "AKIAJDSJUJWWOMVPNYZQ/20210920/us-east-1/s3/aws4_request",
        "X-Amz-Date": "20210920T230352Z",
        "X-Amz-Signature": "3e08e70474ce381fcb723bd2a644da00d751fc80767d4a04cc82a2d259735571",
        "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wOS0yMVQwOTowMzo1MloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA5MjAvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwOTIwVDIzMDM1MloifV19",
        "Content-Type": "image/png"
      }
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 25
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "111"
        }
      },
      "invoice": {
        "data": null
      },
      "email": {
        "data": null
      },
      "page": {
        "data": null
      },
      "expense": {
        "data": null
      },
      "comment": {
        "data": {
          "type": "comments",
          "id": "7"
        }
      },
      "task": {
        "data": null
      },
      "document_style": {
        "data": null
      },
      "document_type": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "111",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user111@email.com",
        "title": null,
        "joined_at": "2021-09-21T01:03:52.000+02:00",
        "last_seen_at": "2021-09-21T01:03:52.872+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "setting_role_id": null,
        "invited_at": null,
        "is_user": true,
        "user_id": 111,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-09-21T01:03:52.774+02:00",
        "placeholder": false,
        "color_id": null,
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 25
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "133"
          }
        },
        "subsidiary": {
          "data": null
        },
        "holiday_calendar": {
          "data": null
        }
      }
    },
    {
      "id": "7",
      "type": "comments",
      "attributes": {
        "commentable_type": "company",
        "body": "test body",
        "created_at": "2021-09-21T01:03:52.802+02:00",
        "pinned_at": null,
        "edited_at": null,
        "deleted_at": null,
        "reactions": {},
        "hidden": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 25
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "111"
          }
        },
        "pinned_by": {
          "data": null
        },
        "person": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "134"
          }
        },
        "deal": {
          "data": null
        },
        "task": {
          "data": null
        },
        "invoice": {
          "data": null
        },
        "attachments": {
          "data": [
            {
              "type": "attachments",
              "id": "6"
            }
          ]
        }
      }
    },
    {
      "id": "133",
      "type": "companies",
      "attributes": {
        "name": "Organization25",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-09-21T01:03:52.773+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 25
          }
        }
      }
    },
    {
      "id": "134",
      "type": "companies",
      "attributes": {
        "name": "Client109",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-09-21T01:03:52.799+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": false
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 25
          }
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5
      },
      "recycle_bin": {
        "type": "restricted",
        "available": true,
        "limit": 180
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      },
      "slack": {
        "type": "switch",
        "available": true
      },
      "task_custom_fields_library": {
        "type": "switch",
        "available": true
      },
      "timeline_layout": {
        "type": "switch",
        "available": true
      },
      "comment_visibility": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

PATCH  /api/v2/attachments/7

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": ""
    }
  }
}
Responses422
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/attachable_type"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/attachable_type"
      }
    }
  ]
}

Update a attachment
PATCH/api/v2/attachments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

attachment id


DELETE /api/v2/attachments/1
Requestsdeletes attachment

DELETE  /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
Responses204
This response has no content.

Deletes a attachment
DELETE/api/v2/attachments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

attachment id


Generated by aglio on 20 Sep 2021