Examples

PATCH /api/v2/message-groups/44
{
  "data": {
    "id": "44",
    "type": "message-groups",
    "attributes": {
      "group-chat": true,
      "chat-room-name": "New Room Name",
      "updated-at": "2017-08-29 10:51:33 +0800",
      "has-unread-message": false
    },
    "relationships": {}
  }
}
200
{
  "data": {
    "id": "44",
    "type": "message-groups",
    "links": {
      "self": "http://test.host/api/v2/message-groups/44"
    },
    "attributes": {
      "group-chat": true,
      "chat-room-name": "New Room Name",
      "updated-at": "2017-08-29T10:51:33.000+08:00",
      "has-unread-message": false
    },
    "relationships": {
      "last-message": {
        "links": {
          "self": "http://test.host/api/v2/message-groups/44/relationships/last-message",
          "related": "http://test.host/api/v2/message-groups/44/last-message"
        }
      },
      "accounts": {
        "links": {
          "self": "http://test.host/api/v2/message-groups/44/relationships/accounts",
          "related": "http://test.host/api/v2/message-groups/44/accounts"
        }
      },
      "messages": {
        "links": {
          "self": "http://test.host/api/v2/message-groups/44/relationships/messages",
          "related": "http://test.host/api/v2/message-groups/44/messages"
        }
      }
    }
  }
}

Params

Param name Description
id
required

Message group ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.

data
required

Message Group Information

Validations:

  • Must be a Hash

data[type]
optional

Validations:

data[relationships]
optional

Validations:

  • Must be a Hash

data[relationships][accounts]
optional

Validations:

  • Must be a Hash

data[relationships][accounts][data]
optional

Validations:

  • Must be an Array of nested elements

data[relationships][accounts][data][type]
optional

Account type, which is `accounts`

Validations:

  • Must be a String

data[relationships][accounts][data][id]
optional

Account ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.