Adding a Comment

Adding a comment to an issue.

General
URL Format http://[locale].seeclickfix.com/api/issues/[issue_id]/comments.[for...
HTTP Method POST
Valid Data Formats xml, json
Permissions read/write

Required Parameters

  • api_key - API Key
  • issue_id - Issue ID of the issue to add the comment to.
  • comment[comment] - Comment to add.
  • comment[email] - Email of the person making the comment.

Optional Parameters

  • comment[name] - Name of the person making the comment.
  • comment[send_email] - Subscribe the email added to all comments.
  • comment[youtube_url] - URL of a youtube video to add.
  • comment[comment_image_attributes][uploaded_data] - Image to add to the comment.

Example

curl -d 'comment[comment]=hello&api_key=87ced127d6dead827a0d26ebc14a176a9d59c886&comment[email]=joe@myemail.com&comment[name]=myname&comment[user_id]=23' http://seeclickfix.com/api/issues/5000/comments.xml

This query returns:

<?xml version="1.0" encoding="UTF-8"?>
<comment>
      <comment>hello</comment>
      <comment-type>Comment</comment-type>
      <created-at type="timestamp">Tue Mar 30 16:27:21 UTC 2010</created-at>
      <email>joe@myemail.com</email>
      <id type="integer">41623</id>
      <issue-id type="integer">7000</issue-id>
      <locale>en</locale>
      <name>myname</name>
      <rejected-count type="integer">0</rejected-count>
      <send-email type="boolean">true</send-email>
      <signature nil="true"></signature>
      <spam type="boolean">false</spam>
      <spaminess type="float" nil="true"></spaminess>
      <updated-at type="timestamp">Tue Mar 30 16:27:21 UTC 2010</updated-at>
      <user-id type="integer" nil="true"></user-id>
      <youtube-url nil="true"></youtube-url>
</comment>

Errors

If values are invalid, an error will be returned as below.

<?xml version="1.0" encoding="UTF-8"?>
<errors>
   <error>Comment can't be blank</error>
</errors>