# API で作成した投稿にタグを追加するにはどうすればよいですか？

**URL:** https://meta.discourse.org/t/how-do-i-add-tags-to-a-post-created-with-the-api/140087
**Category:** Support
**Created:** [2020 年 1 月 29 日午後 5:41 UTC](https://meta.discourse.org/t/how-do-i-add-tags-to-a-post-created-with-the-api/140087 "2020-01-29T17:41:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Salvino](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/salvino/32/117451_2.png) [@Salvino](https://meta.discourse.org/u/Salvino)
#### Post date: [2020 年 1 月 29 日午後 5:41 UTC](https://meta.discourse.org/t/how-do-i-add-tags-to-a-post-created-with-the-api/140087/1 "2020-01-29T17:41:23Z")

</div>

新しい POST を作成し、API を使用して TAGS\_NAME を追加したいと考えています。  
[Discourse API Docs](https://docs.discourse.org/#tag/Tags) のドキュメントを確認しましたが、新しい投稿への追加や編集に関する記述は見つかりませんでした。

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2020 年 1 月 29 日午後 5:49 UTC](https://meta.discourse.org/t/how-do-i-add-tags-to-a-post-created-with-the-api/140087/2 "2020-01-29T17:49:41Z")

</div>

Discourse API のリバースエンジニアリング方法についてはこちらをご覧ください: [Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2020 年 1 月 29 日午後 5:50 UTC](https://meta.discourse.org/t/how-do-i-add-tags-to-a-post-created-with-the-api/140087/3 "2020-01-29T17:50:47Z")

</div>

これはトピックを作成するための API です：

> **[Discourse API Docs](https://docs.discourse.org/#tag/Topics/paths/~1posts.json/post)**

ただし、おっしゃる通り、タグ付きの投稿を作成する方法が不足しています。その更新が行われるまで、devtools を通じてこの方法を確認するために [try.discourse.org](http://try.discourse.org) をご自由に利用してください：

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/6/16c87cd09eeb1522a9ef57568b3f2ed893d60128.png)

トピックを作成した後、私のブラウザは以下のフォームデータを送信しました：

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/0/401197f9b94df3c6e7bed159412d6e5e78fa2c3e.png)

---

<div class="post-metadata">

### Author: ![Salvino](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/salvino/32/117451_2.png) [@Salvino](https://meta.discourse.org/u/Salvino)
#### Post date: [2020 年 1 月 29 日午後 6:23 UTC](https://meta.discourse.org/t/how-do-i-add-tags-to-a-post-created-with-the-api/140087/4 "2020-01-29T18:23:36Z")

</div>

アドバイスのおかげで解決しました 😉

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2020 年 2 月 28 日午後 6:35 UTC](https://meta.discourse.org/t/how-do-i-add-tags-to-a-post-created-with-the-api/140087/5 "2020-02-28T18:35:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
