# Send group/channel message

### **Send new group/channel message:**

```
near call $CONTRACT_NAME send_group_message '{group_id: u32, text: String, image: String, reply_message_id: Option<String>, inner_id: Option<String>}' --accountID $ACCOUNT_ID
```

NOTE: Replace _CONTRACT\_NAME_ to use one of [our smart-contracts](../../network-info) and _ACCOUNT\_ID_ to your sender account.

**Request parameters:**

* **group\_id** (required): Recipient group id. You get this id when create new group by call our smart-contract and you can see this ID in ChatMe web interface.
* **text** (required): Message text. Limited by 5000 symbols per message.
* **image** (required): IFPS hash for uploaded image. Send empty string if you don't want send image.
* **reply\_message\_id** (optional): Message ID for reply.
* **inner\_id** (optional): Some unique value that can be used to internal message identification.

**Response:** message ID (U128).



### Send spam report

```
near call $CONTRACT_NAME spam_report '{message_id: U128, message_sender: AccountId, is_group: bool}' --accountID $ACCOUNT_ID
```

NOTE: Replace _CONTRACT\_NAME_ to use one of [our smart-contracts](../../network-info) and _ACCOUNT\_ID_ to your sender account.

**Request parameters:**

* **message\_id** (required): Unique message ID with spam.
* **message\_sender** (required): Account that send spam message.
* **is\_group** (required): _true_ in this case (spam in group chat).
