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?1623798204",
        "thumb": "/system/attachments/files/000/000/001/thumb/img.png?1623798204",
        "temp_url": null,
        "processed": false,
        "resized": false,
        "created_at": "2021-06-16T01:03:24.305+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/20210615/us-east-1/s3/aws4_request",
          "X-Amz-Date": "20210615T230324Z",
          "X-Amz-Signature": "e1d5195ade8d21732d48a665d6ceca85968c502b86857bb2598734a9721c7ae8",
          "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wNi0xNlQwOTowMzoyNFoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA2MTUvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwNjE1VDIzMDMyNFoifV19",
          "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-06-16T01:03:24.000+02:00",
        "last_seen_at": "2021-06-16T01:03:24.331+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 107,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:03:24.205+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "125"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "3",
      "type": "comments",
      "attributes": {
        "commentable_type": "company",
        "body": "test body",
        "created_at": "2021-06-16T01:03:24.230+02:00",
        "pinned_at": null,
        "edited_at": null,
        "deleted_at": null,
        "reactions": {}
      },
      "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-06-16T01:03:24.204+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "126",
      "type": "companies",
      "attributes": {
        "name": "Client105",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-06-16T01:03:24.227+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 21
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "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,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "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
      }
    },
    "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?1623798204",
      "thumb": "/system/attachments/files/000/000/002/thumb/img.png?1623798204",
      "temp_url": null,
      "processed": false,
      "resized": false,
      "created_at": "2021-06-16T01:03:24.606+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/20210615/us-east-1/s3/aws4_request",
        "X-Amz-Date": "20210615T230324Z",
        "X-Amz-Signature": "e1d5195ade8d21732d48a665d6ceca85968c502b86857bb2598734a9721c7ae8",
        "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wNi0xNlQwOTowMzoyNFoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA2MTUvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwNjE1VDIzMDMyNFoifV19",
        "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-06-16T01:03:24.000+02:00",
        "last_seen_at": "2021-06-16T01:03:24.628+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 108,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:03:24.530+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 22
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "127"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "4",
      "type": "comments",
      "attributes": {
        "commentable_type": "company",
        "body": "test body",
        "created_at": "2021-06-16T01:03:24.558+02:00",
        "pinned_at": null,
        "edited_at": null,
        "deleted_at": null,
        "reactions": {}
      },
      "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-06-16T01:03:24.529+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 22
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "128",
      "type": "companies",
      "attributes": {
        "name": "Client106",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-06-16T01:03:24.554+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 22
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "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
      }
    },
    "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-06-16T01:03:24.849+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/20210615/us-east-1/s3/aws4_request",
        "X-Amz-Date": "20210615T230324Z",
        "X-Amz-Signature": "e1d5195ade8d21732d48a665d6ceca85968c502b86857bb2598734a9721c7ae8",
        "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wNi0xNlQwOTowMzoyNFoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA2MTUvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwNjE1VDIzMDMyNFoifV19",
        "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-06-16T01:03:24.000+02:00",
        "last_seen_at": "2021-06-16T01:03:24.840+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 109,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:03:24.744+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 23
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "129"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "129",
      "type": "companies",
      "attributes": {
        "name": "Organization23",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-06-16T01:03:24.743+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 23
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "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
      }
    },
    "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?1623798205",
      "thumb": "/system/attachments/files/000/000/006/thumb/img.png?1623798205",
      "temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
      "processed": false,
      "resized": false,
      "created_at": "2021-06-16T01:03:25.193+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/20210615/us-east-1/s3/aws4_request",
        "X-Amz-Date": "20210615T230325Z",
        "X-Amz-Signature": "eb89de6b7abb2a62478e13262884546fb5eb7f95761fcf2008a3bf862d837cfe",
        "Policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wNi0xNlQwOTowMzoyNVoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJwcm9kdWN0aXZlLWZpbGVzLXN0YWdpbmcifSx7InN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyI6IjIwMSJ9LFsic3RhcnRzLXdpdGgiLCIka2V5IiwiIl0seyJhY2wiOiJwdWJsaWMtcmVhZCJ9LFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1hbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQUpEU0pVSldXT01WUE5ZWlEvMjAyMTA2MTUvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwNjE1VDIzMDMyNVoifV19",
        "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-06-16T01:03:25.000+02:00",
        "last_seen_at": "2021-06-16T01:03:25.218+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 111,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-06-16T01:03:25.119+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 25
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "133"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "7",
      "type": "comments",
      "attributes": {
        "commentable_type": "company",
        "body": "test body",
        "created_at": "2021-06-16T01:03:25.147+02:00",
        "pinned_at": null,
        "edited_at": null,
        "deleted_at": null,
        "reactions": {}
      },
      "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-06-16T01:03:25.117+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 25
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "134",
      "type": "companies",
      "attributes": {
        "name": "Client109",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-06-16T01:03:25.144+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {},
        "sample_data": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 25
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "public_project_reports": {
        "type": "metered",
        "limit": 30
      },
      "private_project_reports": {
        "type": "metered",
        "limit": 10
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "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
      }
    },
    "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 15 Jun 2021