# Plugin API documentations?

**URL:** https://meta.discourse.org/t/plugin-api-documentations/67988
**Category:** Development
**Created:** [August 14, 2017, 2:26am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988 "2017-08-14T02:26:37Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![a9udn9u](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@a9udn9u](https://meta.discourse.org/u/a9udn9u)
#### Post date: [August 14, 2017, 2:26am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/1 "2017-08-14T02:26:37Z")

</div>

Sorry if this has been asked, I tried searching for documentations but all I can find is the Get Started post, it helped me create a plugin but it didn’t cover topics such as what APIs are available. So, are there documents at all?

Thanks!

---

<div class="post-metadata">

### Author: ![net\_deamon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/net_deamon/32/70126_2.png) [@net\_deamon](https://meta.discourse.org/u/net_deamon)
#### Post date: [August 14, 2017, 2:39am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/2 "2017-08-14T02:39:29Z")

</div>

Api documentation is available at

> **[Discourse API Docs](https://docs.discourse.org)**

---

<div class="post-metadata">

### Author: ![a9udn9u](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@a9udn9u](https://meta.discourse.org/u/a9udn9u)
#### Post date: [August 14, 2017, 3:30am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/3 "2017-08-14T03:30:25Z")

</div>

Discourse API doc is not what I’m requesting. I was thinking about something like [Chrome plugin development docs](https://developer.chrome.com/extensions/getstarted) or [WordPress plugin development docs](https://developer.wordpress.org/plugins/intro/). For example when I read the [Beginner’s Guide to Creating Discourse Plugins](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515/1), I have questions like _what are other special properties and callbacks does Discourse recognize in the default module?_ or _what parameters are passed into the `initialize()` method?_ Neither the guide nor [docs.discourse.org](http://docs.discourse.org) answered those questions.

---

<div class="post-metadata">

### Author: ![net\_deamon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/net_deamon/32/70126_2.png) [@net\_deamon](https://meta.discourse.org/u/net_deamon)
#### Post date: [August 14, 2017, 3:37am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/4 "2017-08-14T03:37:49Z")

</div>

As discourse uses ember in frontend and rails in backend, you can browse their respective docs to know how to create components, or controllers, etc.

That being said, you can go through the code of discourse to learn how they are doing things.

I had asked similar question long time back… See if the answers given here help you.

> [@How do you learn to build Discourse plugins?](https://meta.discourse.org/t/how-do-you-learn-how-to-build-these-plugins/57946):
>
> How do you guys build such amazing plugins with discourse ? I am not even able to [integrate a custom field to discourse topic using a custom plugin.](https://meta.discourse.org/t/customizing-create-topic-form-to-add-more-custom-fields-what-does-add-to-serializer-or-register-custom-field-type-do/57774/2) Is there any documentation that can help me build an advanced plugin like this? The introduction series to Discourse plugins only touches the plugin outlet part. But how do I take that and integrate it with Discourse? I tried reading the source code of Discourse plugins, as Jeff [suggested](https://blog.codinghorror.com/learn-to-read-the-source-luke/), But I only have questions like what does add\_to\_serializer …

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [August 14, 2017, 11:45am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/5 "2017-08-14T11:45:46Z")

</div>

> [@a9udn9u](#):
>
> I have questions like what are other special properties and callbacks does Discourse recognize in the default module? or what parameters are passed into the initialize() method? Neither the guide nor [docs.discourse.org](http://docs.discourse.org) answered those questions.

Then those questions are probably good candidates for #Development 🙂

---

<div class="post-metadata">

### Author: ![bcartwri96](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bcartwri96/32/129934_2.png) [@bcartwri96](https://meta.discourse.org/u/bcartwri96)
#### Post date: [February 12, 2020, 2:09am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/7 "2020-02-12T02:09:03Z")

</div>

Giving this a bump bc it wasn’t answered 🙂

---

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [April 9, 2020, 1:45pm UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/8 "2020-04-09T13:45:35Z")

</div>

@bcartwri96 I think the long and the short of it is that there is very little in the way of comprehensive documentation for Discourse’s Plugin API.

There are bits and pieces of information here on Meta, such as [Developing Discourse Plugins - Part 1 - Create a basic plugin](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515/1) but there is no comprehensive API reference it would seem. Although some of what is happening is plain Ember or Rails, there is a huge amount in between which is pure Discourse convention.

Over time it would be good if the community could perhaps work on a Discourse Developer Manual that would fill this gap. We’ve put some of that into practice in terms of fragments of HOWTOs at [Pavilion](https://thepavilion.io/c/open-source/dev/77) and hopefully some of that work is the initial groundwork for developing a more comprehensive reference guide.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [July 31, 2020, 7:09am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/9 "2020-07-31T07:09:57Z")

</div>

Checkout this file. Most of the methods are documented briefly  
[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js)

---

<div class="post-metadata">

### Author: ![alxndr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alxndr/32/102300_2.png) [@alxndr](https://meta.discourse.org/u/alxndr)
#### Post date: [March 31, 2024, 12:47am UTC](https://meta.discourse.org/t/plugin-api-documentations/67988/10 "2024-03-31T00:47:40Z")

</div>

This file has moved to [`blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs`](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/lib/plugin-api.gjs)
