<p>Of course there is, otherwise we would not be able to store categories in Craft. The controller that handles categories is called <code>CategoriesController</code> and it contains the function <code>actionSaveCategory</code> so you route will be <code>actions/categories/saveCategory</code></p>

<p>To create/save a user you have the <code>UsersController</code>.. You may guess the function is <code>actionSaveUser</code> => <code>actions/users/saveUser</code> </p>

<p>It's the same for every element in Craft. <code>EntriesController</code>, <code>actionSaveEntry</code> => <code>actions/entries/saveEntry</code></p>

<p>But this all has nothing to do with an endpoint or an API, it's just basic Craft code</p>

CC BY-SA 3.0
2018-03-15T15:16:33.657Z
2018-03-15T15:16:33.657Z
Robin Schambach
<p>I'm trying to create a jQuery/Ajax script to import data from a Wordpress API service and want to import the WP categories and tags into my database. I've managed to import the tags using an Ajax call to <code>/actions/tags/createTag</code>, is there any endpoint that does the same with categories?</p>

<categories><ajax><jquery>
Ajax - How to create a Category through actionTrigger
# Ajax - How to create a Category through actionTrigger

(Asked by: username_0 on 2018-03-15)

I'm trying to create a jQuery/Ajax script to import data from a Wordpress API service and want to import the WP categories and tags into my database. I've managed to import the tags using an Ajax call to `/actions/tags/createTag`, is there any endpoint that does the same with categories?

**Tags:** categories, ajax, jquery

---

## 1 answers

### Answer by username_1 on 2018-03-15. Score: 1

Of course there is, otherwise we would not be able to store categories in Craft. The controller that handles categories is called `CategoriesController` and it contains the function `actionSaveCategory` so you route will be `actions/categories/saveCategory`

To create/save a user you have the `UsersController`.. You may guess the function is `actionSaveUser` => `actions/users/saveUser`

It's the same for every element in Craft. `EntriesController`, `actionSaveEntry` => `actions/entries/saveEntry`

But this all has nothing to do with an endpoint or an API, it's just basic Craft code


---

