# Call Discourse routes from inside the plugin (Ruby API)

**URL:** https://meta.discourse.org/t/call-discourse-routes-from-inside-the-plugin-ruby-api/154286
**Category:** Development
**Created:** [June 9, 2020, 11:14am UTC](https://meta.discourse.org/t/call-discourse-routes-from-inside-the-plugin-ruby-api/154286 "2020-06-09T11:14:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Stefan\_Brighiu\_M](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stefan_brighiu_m/32/174499_2.png) [@Stefan\_Brighiu\_M](https://meta.discourse.org/u/Stefan_Brighiu_M)
#### Post date: [June 9, 2020, 11:14am UTC](https://meta.discourse.org/t/call-discourse-routes-from-inside-the-plugin-ruby-api/154286/1 "2020-06-09T11:14:40Z")

</div>

How can I call a discourse api route from inside a custom plugin? I want to make the call directly between the plugin and the backend, and i want to do it from a custom ruby controller.

I am trying to make a custom route for creating a user, and I want to call UsersController.create to handle the creation of the user properly. Is there any way I can do it?
