> For the complete documentation index, see [llms.txt](https://chatme.gitbook.io/chatme/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chatme.gitbook.io/chatme/dev-documentation/direct-messages/send-direct-messages.md).

# Send direct messages

Send P2P conversation messages.

### **Send new direct message**

```
near call $CONTRACT_NAME send_private_message '{"to_address": AccountId, "text": String, "image": String, "reply_message_id": Option<String>, "encrypt_key": Option<String>, "inner_id": Option<String>}' --accountID $ACCOUNT_ID
```

NOTE: Replace *CONTRACT\_NAME* to use one of [our smart-contracts](/chatme/network-info.md) and *ACCOUNT\_ID* to your sender account.

**Request parameters:**

* **to\_address** (required): NEAR recipient address.
* **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.
* **encrypt\_key** (optional): Key used for message encryption. Default: empty string.
* **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](/chatme/network-info.md) 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): *false* in this case (spam in direct message).
