PUT /api/conversations/:id

update a conversation

Success Response Code: 200

Params

Param name Description
id
required

the id of the referenced conversation


Value: Must be a Integer
conversation
optional

Value: Must be a Hash
conversation[name]
optional

The name of the conversation


Value: Must be a String

Response Fields

id unique id for the conversation Integer
name the user entered custom name for the conversation String
title the user entered custom name for the conversation (see #name) *or* the server generated default conversation name String
private flag if the conversation is private (one-to-one) or a shareable conversation Boolean
unread flag if the current user has read the latest remark in the conversation Boolean
unread_count number of unread messages the user has in the conversation Integer
latest_activity latest_activity the latest remark/image posting activity in the conversation. See {ActivitiesController#show} for response definition Activity
members list of conversation members. See users#show for response definition Array<User>

Example Curl Commands

curl -X PUT -v --basic -H"Content-Type: application/json" -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/conversations/2.json -d'{"conversation":{"name":"New Name"}}'

Examples

PUT /conversations/7.json
{
  "conversation": {
    "name": "testing"
  }
}
200
{
  "conversation": {
    "id": 7,
    "name": "testing",
    "private": false,
    "members": [
      {
        "id": 144,
        "name": "J'øhn131 D'øe129",
        "email": "active'128@socialcast.com",
        "cell_phone": null,
        "office_phone": null,
        "first_name": "J'øhn131",
        "last_name": "D'øe129",
        "profile_photo": {
          "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
      },
      {
        "id": 145,
        "name": "J'øhn132 D'øe130",
        "email": "active'129@socialcast.com",
        "cell_phone": null,
        "office_phone": null,
        "first_name": "J'øhn132",
        "last_name": "D'øe130",
        "profile_photo": {
          "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
      },
      {
        "id": 146,
        "name": "J'øhn133 D'øe131",
        "email": "active'130@socialcast.com",
        "cell_phone": null,
        "office_phone": null,
        "first_name": "J'øhn133",
        "last_name": "D'øe131",
        "profile_photo": {
          "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
      }
    ],
    "avatar": {
      "url": "https://socialcast.socialcast.test/assets-test/default_conversation_square140-0a73b19cedcd1bd0830c6586d2ebe2ec1a6d5525fe34c4a017d2f09f97c751f5.png",
      "width": 140,
      "height": 140,
      "is_system_default": true
    },
    "title": "testing",
    "unread": false,
    "unread_count": 0
  }
}