POST /api/conversations/:conversation_id/remarks

create a new remark

Also see response fields for creating a remark.

A valid remark may be created with:

* text and no attachments
* attachments and no text
* both text and attachments

Success Response Code: 201

Params

Param name Description
conversation_id
required

id to create remark for


Value: Must be a Integer
remark
optional

Value: Must be a Hash
remark[text]
optional

remark text (optional if attachments are posted)


Value: Must be a String
remark[attachments]
optional

array of files uploaded for the remark (optional if text is posted)


Value: Must be an array of any type
remark[attachment_ids]
optional

array of existing attachment ids to attach to the remark


Value: Must be an array of Integer
remark[location]
optional

Value: Must be a Hash
remark[location][longitude]
optional

geolocation longitude of user's position


Value: Must be a Float
remark[location][latitude]
optional

geolocation latitude of user's position


Value: Must be a Float
remark[shared_message_id]
optional

id of the message to be shared. Note that the message to be shared should have shareable=true in its API response


Value: Must be a Integer
remark[client_provided_guid]
optional

a client-provided unique identifier for the remark


Value: Must be a String

Example Curl Commands

curl -X POST -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/conversations/2/remarks.json" -H"Content-Type: application/json" -d'{"remark":{"text":"New remark!"}}'

Examples

POST /conversations/3/remarks.json
{
  "remark": {
    "client_provided_guid": "abc123",
    "text": "testing & bläh & stuff 2"
  }
}
201
{
  "activity": {
    "id": 2,
    "verb": "post",
    "actor": {
      "id": 134,
      "displayName": "J'øhn121 D'øe119",
      "firstName": "J'øhn121",
      "image": {
        "height": 140,
        "width": 140,
        "url": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png",
        "is_system_default": true
      },
      "inactive": false,
      "terminated": false
    },
    "object": {
      "id": 2,
      "objectType": "note",
      "replied_to_id": null,
      "replied_to_type": null,
      "replied_to_message_id": null,
      "replied_to": null,
      "client_provided_guid": "abc123",
      "content": "testing & bläh & stuff 2",
      "html_body": "<div class=\"markdown-body\"><p>testing &amp; bläh &amp; stuff 2</p></div>",
      "shared_message": null
    },
    "title": "J'øhn121 D'øe119 sent a chat message",
    "published": "2017-09-20T16:18:10-07:00"
  }
}
POST /conversations/3/remarks.json
{
  "remark": {
    "shared_message_id": "65",
    "text": "testing & bläh & stuff 3"
  }
}
201
{
  "activity": {
    "id": 3,
    "verb": "post",
    "actor": {
      "id": 134,
      "displayName": "J'øhn121 D'øe119",
      "firstName": "J'øhn121",
      "image": {
        "height": 140,
        "width": 140,
        "url": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png",
        "is_system_default": true
      },
      "inactive": false,
      "terminated": false
    },
    "object": {
      "id": 3,
      "objectType": "note",
      "replied_to_id": null,
      "replied_to_type": null,
      "replied_to_message_id": null,
      "replied_to": null,
      "client_provided_guid": null,
      "content": "testing & bläh & stuff 3",
      "html_body": "<div class=\"markdown-body\"><p>testing &amp; bläh &amp; stuff 3</p></div>",
      "shared_message": {
        "id": 65,
        "user": {
          "id": 137,
          "first_name": "J'øhn124",
          "last_name": "D'øe122",
          "name": "J'øhn124 D'øe122",
          "html_name": "J&#39;øhn124 D&#39;øe122",
          "url": "https://socialcast.socialcast.test/users/137-j%C3%B8hn124d%C3%B8e122",
          "avatars": {
            "is_system_default": true,
            "id": null,
            "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square16-3b951350d61d203ece2fa5dd274fa7bd35275e132c17310d9006514f8839c857.png",
            "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square30-6db66ac25c338d1e548a68465e2723ff63367c2aafbcc01db24c83964056b892.png",
            "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square45-16865426333e244c59076d4f2475b711ed1ff9d12c97f4cf354f373a0170a1fd.png",
            "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square70-1708999e8f1fea583408d7fc64b2177f853e4123bea2ffcf35f4839c8697e0ba.png",
            "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_user_square140-7da7e1d98b33ef152280b1f653cfd80e2db24b01b625a72abc320673eea5af53.png"
          },
          "username": "Jøhn124Døe122",
          "active": true,
          "terminated": false,
          "inactive": false,
          "role": "member",
          "type": "User",
          "title": null,
          "out_of_office": false,
          "out_of_office_on": null,
          "back_in_office_on": null,
          "company_login": null
        },
        "title": "",
        "body": "blørg & stuff 16",
        "html_body": "<div class=\"markdown-body\"><p>blørg &amp; stuff 16</p></div>",
        "action": "",
        "verb": null,
        "message_type": "status_message",
        "icon": null,
        "url": "https://socialcast.socialcast.test/api/messages/65",
        "permalink_url": "https://socialcast.socialcast.test/messages/65",
        "external_url": null,
        "created_at": "2017-09-20T23:18:10+00:00",
        "updated_at": "2017-09-20T23:18:10+00:00",
        "attachments": [],
        "media_files": [],
        "contains_url_only": null,
        "external_resources": [],
        "tags": [],
        "last_interacted_at": 1505949490,
        "group": {},
        "category_id": null,
        "recipients": [],
        "thumbnail_url": null,
        "player_url": null,
        "player_params": null,
        "likable": null,
        "ratable": false,
        "rating": null,
        "ratings_average": null,
        "ratings_count": null,
        "editable": true,
        "deletable": null,
        "watchable": false,
        "watch": null,
        "flag": null,
        "source": null,
        "poll": null,
        "embed": null,
        "hidden": null,
        "subscribed": null,
        "groups": [],
        "extensions": [],
        "new_group_id": null,
        "new_group_archived_at": null,
        "days_of_stickiness": 0,
        "sticky_for_current_user": null,
        "shareable": true,
        "share_count": 0,
        "client_provided_guid": null
      }
    },
    "title": "J'øhn121 D'øe119 sent a chat message",
    "published": "2017-09-20T16:18:10-07:00"
  }
}