# Create a topic via API applying a category template

**URL:** https://meta.discourse.org/t/create-a-topic-via-api-applying-a-category-template/168907
**Category:** Development
**Tags:** rest-api
**Created:** [November 1, 2020, 9:45am UTC](https://meta.discourse.org/t/create-a-topic-via-api-applying-a-category-template/168907 "2020-11-01T09:45:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![marcozambi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcozambi/32/119505_2.png) [@marcozambi](https://meta.discourse.org/u/marcozambi)
#### Post date: [November 1, 2020, 9:45am UTC](https://meta.discourse.org/t/create-a-topic-via-api-applying-a-category-template/168907/1 "2020-11-01T09:45:21Z")

</div>

Dear all,  
I have created a topic template for a specific category.  
Of course when manually creating a new topic in such category, the template is applied perfectly, but the same is not true when a new topic is created in the same category via API.  
In the latter case the topic first post content is just exactly what I pass to the raw parameter in the API POST call.

Any suggestion?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [November 2, 2020, 6:26pm UTC](https://meta.discourse.org/t/create-a-topic-via-api-applying-a-category-template/168907/2 "2020-11-02T18:26:13Z")

</div>

> [@marcozambi](#):
>
> In the latter case the topic first post content is just exactly what I pass to the raw parameter in the API POST call.

This is the expected behaviour. You’ll need to add the topic template to the post’s content before publishing the post via the API.
