# Serverless Functions Configuration

The `serverless-pre-function` and<!-- --> `serverless-post-function` plugins<!-- --> <!-- -->allow execution of user-defined logic at the start or end of specified execution phases in API gateway.<!-- --> <!-- -->Configuration covers plugin parameters.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* phase

  string

  default: `access`

  valid value:

  `rewrite`, `access`, `header_filter`, `body_filter`, `log`, and `before_proxy`

  ***

  Phase before which the serverless function is executed.

* functions

  array\[string]

  required

  ***

  List of functions that are executed sequentially.

  Only Lua functions are allowed and not other Lua code. For example, anonymous functions and closures are legal, whereas other code not in a function will not be allowed. See [tips for writing functions](https://docs.api7.ai/hub/serverless-functions.md#tips-for-writing-functions) for more details.
