Highrise API

Comments

This is about comments.

Show

GET /comments/#{id}.xml

Returns a single comment. The tag parent-id holds the id of the note or email this is associated with.

Response

Status: 200 OK

<comment>
  <id type="integer">1</id>
  <parent-id type="integer">3</parent-id>
  <author-id type="integer">3</author-id>
  <created-at type="datetime">2006-05-19T20:26:00Z</created-at>
  <body>I agree, taxes are no fun</body>
</comment>

List All From Note

GET /notes/#{note-id}/comments.xml

Returns a collection of comments that are visible to the authenticated user associated with the note specified in the URL.

Response

Status: 200 OK

<comments>
  <comment>
    ...
  </comment>
  <comment>
    ...
  </comment>
</comments>

List All From Email

GET /emails/#{email-id}/comments.xml

Returns a collection of comments that are visible to the authenticated user associated with the email specified in the URL.

Response

Status: 200 OK

<comments>
  <comment>
    ...
  </comment>
  <comment>
    ...
  </comment>
</comments>

Create

POST /comments.xml

Creates a new comment with the currently authenticated user as the author. The XML for the new comment is returned on a successful request with the timestamps recorded and ids for the contact data associated. The parent-id holds the id of the note or email that this comment relates to.

Request

<comment>
  <body>I think that's exactly right!</body>
  <parent-id>1</parent-id>
</comment>

Response

Status: 201 Created
Location: http://example.highrisehq.com/comments/#{new-comment-id}.xml

<comment>
  ...
</comment>

Update

PUT /comments/#{id}.xml

Updates an existing comment with new details from the submitted XML.

Request

<comment>
  <body>Allow me to rephrase.</body>
</comment>

Response

Status: 200 OK

Destroy

DELETE /comments/#{id}.xml

Destroys the comment at the referenced URL.

Response

Status: 200 OK