# Private Message Send API

**URL:** <https://meta.discourse.org/t/private-message-send-api/27593>\
**Category:** Support\
**Created:** [April 15, 2015, 12:44pm UTC](https://meta.discourse.org/t/private-message-send-api/27593 "2015-04-15T12:44:59Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![RogerBW](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@RogerBW](https://meta.discourse.org/u/RogerBW)\
**Post date:** [April 26, 2021, 12:23pm UTC](https://meta.discourse.org/t/private-message-send-api/27593/20 "2021-04-26T12:23:31Z")

</div>

I’m attempting to send a PM through the API. (This is intended for a game in which each player is dealt a hand of cards, so it does need to be private.)

I’m sending a request with appropriate values for `raw`, `title` and `target_usernames`, and getting back `{"action":"create_post","errors":["Category can't be blank"]}` with a `422 Unprocessable Entity`.

If I set a category, it ignores `target_usernames` and creates a topic in that category.

If someone is successfully creating and sending PMs using the API, could you post an example with your full request body schema?

---

_[View the full topic](https://meta.discourse.org/t/private-message-send-api/27593)._
