Idea Subscriptions API


POST /api/v1/ideas/:idea_id/subscriptions

Create an idea subscription

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to endorse

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

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/subscriptions" -d '{"idea_subscription":{"email":"henry.humpty@account1.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_subscription": {
    "email": "henry.humpty@account1.com"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea_subscription": {
    "id": "6488044205538687701",
    "idea_id": "58056975",
    "created_at": "2017-11-13T23:25:08.430Z",
    "portal_user": {
      "id": "6488044205452760247",
      "name": "henry.humpty@account1.com",
      "email": "henry.humpty@account1.com",
      "created_at": "2017-11-13T23:25:08.410Z"
    },
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-11-13T23:24:40.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-11-13T23:24:40.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/subscriptions

Get all subscriptions for an idea

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to get subscriptions for

GET /api/v1/ideas/PRJ1-I-1/subscriptions

Example CURL command

curl -g "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/subscriptions" -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_subscriptions": [
    {
      "id": "783147498",
      "idea_id": "58056975",
      "created_at": "2017-11-13T23:24:40.000Z",
      "portal_user": {
        "id": "646391926",
        "name": "John Long",
        "email": "john@long.com",
        "created_at": "2017-11-13T23:24:40.000Z"
      }
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/ideas/:idea_id/subscriptions/:id

Get a specific subscription for an idea

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to get subscription for
id * Id of an idea subscription

GET /api/v1/ideas/PRJ1-I-1/subscriptions/783147498

Example CURL command

curl -g "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/subscriptions/783147498" -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_subscription": {
    "id": "783147498",
    "idea_id": "58056975",
    "created_at": "2017-11-13T23:24:40.000Z",
    "portal_user": {
      "id": "646391926",
      "name": "John Long",
      "email": "john@long.com",
      "created_at": "2017-11-13T23:24:40.000Z"
    },
    "idea": {
      "id": "58056975",
      "reference_num": "PRJ1-I-1",
      "name": "Idea 1",
      "created_at": "2017-11-13T23:24:40.000Z",
      "workflow_status": {
        "id": "3259216",
        "name": "New",
        "complete": false
      },
      "description": {
        "id": "103757394",
        "body": "Description of idea 1",
        "created_at": "2017-11-13T23:24:40.000Z",
        "attachments": [

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

DELETE /api/v1/ideas/:idea_id/subscriptions/:id

Delete an idea subscription

Parameters

Name Description
idea_id * Numeric ID, or key of the idea to remove subscription from
id * ID of the subscription to remove

DELETE /api/v1/ideas/PRJ1-I-1/subscriptions/783147498

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/subscriptions/783147498" -d '' -X DELETE \
	-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: 204 No Content
  

Overview

API Resources