Idea Comments API


POST /api/v1/ideas/:idea_id/idea_comments

Create a public comment for an idea

Parameters

Name Description
idea_id * Numeric ID or key of the idea the comment should be created for

POST /api/v1/ideas/PRJ1-I-1/idea_comments

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/idea_comments" -d '{"idea_comment":{"body":"\u003cp\u003eThis is the comment body.\u003c/p\u003e","portal_user":{"email":"new_email@address.com"}}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "idea_comment": {
    "body": "<p>This is the comment body.</p>",
    "portal_user": {
      "email": "new_email@address.com"
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_comment": {
    "id": "6398143196353427500",
    "idea_id": "58056975",
    "body": "<p>This is the comment body.</p>",
    "created_at": "2017-03-16T17:03:18.592Z",
    "idea_commenter_portal_user": {
      "id": "6398143196330060710",
      "name": "new_email@address.com",
      "email": "new_email@address.com",
      "created_at": "2017-03-16T17:03:18.589Z"
    },
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
      "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1"
    }
  }
}

GET /api/v1/ideas/:idea_id/idea_comments

Get public comments for an idea

Parameters

Name Description
idea_id * Numeric ID or key of the idea the expected comment

GET /api/v1/ideas/58056975/idea_comments

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/58056975/idea_comments" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_comments": [
    {
      "id": "622085811",
      "idea_id": "58056975",
      "body": "This is a great idea! We'll get started right away.",
      "created_at": "2017-03-16T17:02:52.000Z",
      "idea_commenter_user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2017-03-16T17:02:53.000Z",
        "updated_at": "2017-03-16T17:02:53.000Z"
      },
      "idea": {
        "id": "58056975",
        "reference_num": "PRJ1-I-1",
        "name": "Idea 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "workflow_status": {
          "id": "3259216",
          "name": "New",
          "complete": false
        },
        "description": {
          "id": "103757394",
          "body": "Description of idea 1",
          "created_at": "2017-03-16T17:02:52.000Z",
          "attachments": [

          ]
        },
        "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
        "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1"
      }
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

Overview

API Resources