# Script types

> Choose the appropriate script type that matches your requirements when you use Cloud Code scripts.

Script types define the purpose of a Cloud Code script. The script type is set when you create a script.
Each type has a different template to get started with.

## API (default)

API scripts are the default script type. They define your game logic as serverless functions and interact with other backend services.

## Moderation

Moderation scripts provide a template for [actions](/safe-text/actions.md) used by the [Moderation](/safe-text/overview.md) service.

Moderation scripts are used to communicate actions taken to your own backend, or to other UGS services via webhooks or APIs.
The Moderation template provides you with a starting point for how to get moderation data to your own webhooks or a UGS service.

Moderation scripts cannot be invoked from the game client. They only work with [Triggers](/triggers.md).

> **Note:**
>
> Moderation scripts are meant to be used with the [Moderation](/safe-text/overview.md) service. For general purpose scripts, use the [API](#api-\(default\)) script type.

To learn more about Moderation, refer to the [documentation](/safe-text/overview.md).
