API Documentation

API Endpoint

Comments

Comments

Supported filter params

  • discussion_id

  • draft (true, false)

  • page_id (array)

  • project_id (array)

  • task_id

  • workflow_status_category_id (array)

How to post comments on objects

For example, to create a comment for a task, you would now send:

POST https://api.productive.io/api/v2/comments

{
    "data": {
        "attributes": {
            "body": "This is a task comment!"
        },
        "relationships": {
            "task": {
                "data": {
                    "type": "tasks",
                    "id": "123"
                }
            }
        },
        "type": "comments"
    }
}

Comments can be posted on

  • Budgets - deal relationship

  • Companies - company relationship

  • Deals - deal relationship

  • Discussions - discussion relationship

  • Invoices - invoice relationship

  • People - person relationship

  • Purchase Orders - purchase_order relationship

  • Tasks - task relationship

GET /api/v2/comments
Requestsreturns comments

GET  /api/v2/comments

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": "12",
      "type": "comments",
      "attributes": {
        "body": "test body",
        "commentable_type": "task",
        "created_at": "2025-08-02T02:06:07.889+02:00",
        "deleted_at": null,
        "draft": false,
        "edited_at": null,
        "hidden": false,
        "pinned_at": null,
        "reactions": {},
        "updated_at": "2025-08-02T02:06:07.889+02:00",
        "version_number": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "191"
          }
        },
        "company": {
          "meta": {
            "included": false
          }
        },
        "creator": {
          "meta": {
            "included": false
          }
        },
        "deal": {
          "meta": {
            "included": false
          }
        },
        "discussion": {
          "meta": {
            "included": false
          }
        },
        "invoice": {
          "meta": {
            "included": false
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "pinned_by": {
          "meta": {
            "included": false
          }
        },
        "task": {
          "meta": {
            "included": false
          }
        },
        "purchase_order": {
          "meta": {
            "included": false
          }
        },
        "attachments": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "13",
      "type": "comments",
      "attributes": {
        "body": "test body",
        "commentable_type": "task",
        "created_at": "2025-08-02T02:06:08.109+02:00",
        "deleted_at": null,
        "draft": false,
        "edited_at": null,
        "hidden": false,
        "pinned_at": null,
        "reactions": {},
        "updated_at": "2025-08-02T02:06:08.109+02:00",
        "version_number": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "191"
          }
        },
        "company": {
          "meta": {
            "included": false
          }
        },
        "creator": {
          "meta": {
            "included": false
          }
        },
        "deal": {
          "meta": {
            "included": false
          }
        },
        "discussion": {
          "meta": {
            "included": false
          }
        },
        "invoice": {
          "meta": {
            "included": false
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "pinned_by": {
          "meta": {
            "included": false
          }
        },
        "task": {
          "meta": {
            "included": false
          }
        },
        "purchase_order": {
          "meta": {
            "included": false
          }
        },
        "attachments": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://api-test.productive.io/api/v2/comments?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://api-test.productive.io/api/v2/comments?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 2,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get comments
GET/api/v2/comments


GET /api/v2/comments/1
Requestsreturns comment

GET  /api/v2/comments/14

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": "14",
    "type": "comments",
    "attributes": {
      "body": "test body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:08.389+02:00",
      "deleted_at": null,
      "draft": false,
      "edited_at": null,
      "hidden": false,
      "pinned_at": null,
      "reactions": {},
      "updated_at": "2025-08-02T02:06:08.389+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "192"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Gets a comment
GET/api/v2/comments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

comment id


POST /api/v2/comments
Requestscreates comment when valid paramsreturns error when not valid

POST  /api/v2/comments

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": "comments",
    "attributes": {
      "body": "test body"
    },
    "relationships": {
      "task": {
        "data": {
          "type": "tasks",
          "id": "18"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "15",
    "type": "comments",
    "attributes": {
      "body": "test body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:08.860+02:00",
      "deleted_at": null,
      "draft": false,
      "edited_at": null,
      "hidden": false,
      "pinned_at": null,
      "reactions": {},
      "updated_at": "2025-08-02T02:06:08.860+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "193"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/comments

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": "comments",
    "attributes": {
      "body": "test body"
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "attribute is invalid",
      "source": {
        "pointer": "data/attributes/commentable"
      }
    }
  ]
}

Create a comment
POST/api/v2/comments

URI Parameters
HideShow
body
string (optional) Example: This+is+a+comment

Comment body

task_id
number (optional) Example: 1

ID of the task this comment is attached to

company_id
number (optional) Example: 1

ID of the company this comment is attached to

deal_id
number (optional) Example: 1

ID of the deal or budget this comment is attached to

discussion_id
number (optional) Example: 1

ID of the discussion this comment is attached to

invoice_id
number (optional) Example: 1

ID of the invoice this comment is attached to

person_id
number (optional) Example: 1

ID of the person this comment is attached to

purchase_order_id
number (optional) Example: 1

ID of the purchase order this comment is attached to


PATCH /api/v2/comments/1
Requestsupdates comment when draft commentupdates comment when posted comment

PATCH  /api/v2/comments/16

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": "comments",
    "attributes": {
      "body": "Updated body"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "16",
    "type": "comments",
    "attributes": {
      "body": "Updated body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:09.396+02:00",
      "deleted_at": null,
      "draft": true,
      "edited_at": null,
      "hidden": false,
      "pinned_at": null,
      "reactions": {},
      "updated_at": "2025-08-02T02:06:09.409+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "195"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/comments/17

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": "comments",
    "attributes": {
      "body": "Updated body"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "17",
    "type": "comments",
    "attributes": {
      "body": "Updated body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:09.853+02:00",
      "deleted_at": null,
      "draft": false,
      "edited_at": "2025-08-02T02:06:09.867+02:00",
      "hidden": false,
      "pinned_at": null,
      "reactions": {},
      "updated_at": "2025-08-02T02:06:09.867+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "196"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Update a comment
PATCH/api/v2/comments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

comment id


PATCH /api/v2/comments/1/pin
Requestspins the comment when comment is not pinneddoes not pin the comment when comment is pinned

PATCH  /api/v2/comments/19/pin

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": "19",
    "type": "comments",
    "attributes": {
      "body": "test body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:10.569+02:00",
      "deleted_at": null,
      "draft": false,
      "edited_at": null,
      "hidden": false,
      "pinned_at": "2025-08-02T02:06:10.000+02:00",
      "reactions": {},
      "updated_at": "2025-08-02T02:06:10.630+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "198"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/comments/20/pin

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
Responses409
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "409",
      "code": "comment_already_pinned",
      "title": "Conflict error",
      "source": {}
    }
  ]
}

Pins a comment
PATCH/api/v2/comments/{id}/pin

URI Parameters
HideShow
id
number (required) Example: 1

comment id


PATCH /api/v2/comments/1/unpin
Requestsunpins the comment when comment was pinneddoes not unpin the comment when comment is unpinned

PATCH  /api/v2/comments/21/unpin

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": "21",
    "type": "comments",
    "attributes": {
      "body": "test body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:11.055+02:00",
      "deleted_at": null,
      "draft": false,
      "edited_at": null,
      "hidden": false,
      "pinned_at": null,
      "reactions": {},
      "updated_at": "2025-08-02T02:06:11.125+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "200"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

PATCH  /api/v2/comments/22/unpin

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
Responses409
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "409",
      "code": "comment_not_pinned",
      "title": "Conflict error",
      "source": {}
    }
  ]
}

Unpins a comment
PATCH/api/v2/comments/{id}/unpin

URI Parameters
HideShow
id
number (required) Example: 1

comment id


DELETE /api/v2/comments/1
Requestsdeleted comment

DELETE  /api/v2/comments/23

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 comment
DELETE/api/v2/comments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

comment id


PATCH /api/v2/comments/1/add_reaction
Requestsadds reaction to the comment when valid params

PATCH  /api/v2/comments/24/add_reaction

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": "comments",
    "attributes": {
      "reaction": "like"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "24",
    "type": "comments",
    "attributes": {
      "body": "test body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:12.036+02:00",
      "deleted_at": null,
      "draft": false,
      "edited_at": null,
      "hidden": false,
      "pinned_at": null,
      "reactions": {
        "like": {
          "people": [
            "771"
          ],
          "created_at": "2025-08-02T02:06:12.050+02:00"
        }
      },
      "updated_at": "2025-08-02T02:06:12.051+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "203"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Adds reaction to a comment
PATCH/api/v2/comments/{id}/add_reaction

URI Parameters
HideShow
id
number (required) Example: 1

comment id


PATCH /api/v2/comments/1/remove_reaction
Requestsadds reaction to the comment when valid params

PATCH  /api/v2/comments/26/remove_reaction

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": "comments",
    "attributes": {
      "reaction": "like"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "26",
    "type": "comments",
    "attributes": {
      "body": "test body",
      "commentable_type": "task",
      "created_at": "2025-08-02T02:06:12.520+02:00",
      "deleted_at": null,
      "draft": false,
      "edited_at": null,
      "hidden": false,
      "pinned_at": null,
      "reactions": {},
      "updated_at": "2025-08-02T02:06:12.533+02:00",
      "version_number": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "205"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "deal": {
        "meta": {
          "included": false
        }
      },
      "discussion": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "pinned_by": {
        "meta": {
          "included": false
        }
      },
      "task": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      },
      "attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Removes reaction from comment
PATCH/api/v2/comments/{id}/remove_reaction

URI Parameters
HideShow
id
number (required) Example: 1

comment id


Generated by aglio on 02 Aug 2025