# Are custom\_fields on posts/topics available via the API?

**URL:** <https://meta.discourse.org/t/are-custom-fields-on-posts-topics-available-via-the-api/49455>\
**Category:** Development\
**Created:** [Agosto 30, 2016, 7:51pm UTC](https://meta.discourse.org/t/are-custom-fields-on-posts-topics-available-via-the-api/49455 "2016-08-30T19:51:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![bletch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bletch/32/69088_2.png) [@bletch](https://meta.discourse.org/u/bletch)\
**Post date:** [Outubro 24, 2018, 9:09am UTC](https://meta.discourse.org/t/are-custom-fields-on-posts-topics-available-via-the-api/49455/8 "2018-10-24T09:09:51Z")

</div>

You, sir, are a gent of the highest order!

It’s working now.

For fellow travellers, it seems that you can’t use the Ruby API gem’s `create_topic` method…

```ruby
client.create_topic(...)

```

…as it _looks like_ the API only passes known fields through.

Instead, I had to use the raw client’s post method, like so:

```ruby
args = {
  title: title,
  raw: content,
  category: child_category["id"],
  event: {
    "start" => event_start.to_s,
    "end" => event_end.to_s
  }
}
new_topic = client.post("/posts", args.to_h)

```

EDIT: I can live with not being able to set the settings for the event plugin at the category level as that is pretty much a one-time thing.

PS, @angus, why did it take you 24 minutes to respond - I expect better service that than! **\***

**\*** for the avoidance of doubt, this is dripping with British sarcasm and irony.

🙂

---

_[View the full topic](https://meta.discourse.org/t/are-custom-fields-on-posts-topics-available-via-the-api/49455)._
