Each of these endpoint triggers a controller action. Here is the list of [controller actions](../concepts/controllers.md) that exist by default when a content type is created.
If you check the controller file of your generated API `./api/{content-type}/controller/{Content-Type}.js`, you will see an empty file. It is because all the default logic is managed by Strapi. But you can override these actions with your own code.
And that is what we will do to add our custom code.
## Example
To keep the code example easy to follow, we will just have a `Comment` content type and omit the `Author` and `Article` relations.
So lets create a `Comment` content type with just one **Text** field named `content`.
When the content type is created, allow the create function for the Public role.
To check if bad words are in the comment we will use `bad-words` [node module](https://www.npmjs.com/package/bad-words). You will have to install it in your application.
## Override controller action
To customize the function that creates a comment we will have to override the `create` function.
First, to see the difference, let's request `POST /comment` with `that is fucking good!` for the `content` attribute.
You will see your comment is successfully created.
Now let's start the customization.
**Path —** `./api/comment/controller/Comment.js`
```js
module.exports = {
async create() {
return 'strapi';
},
};
```
After saving the new function, let's restart the `POST /comment` request. We will see `strapi` as response.
## Get the comment creation back
We now know the function we have to update. Let's get back to the original function.
In the [controller documentation](../concepts/controllers.html#extending-a-model-controller) you will find the default implementation of every action. It will help you overwrite the create logic.