> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding a custom approvals integration configuration

<View title="Developer" />

<View title="Federal docs">
  > [!CAUTION]
  >
  > **This integration is not available in federal environments**
  >
  > To learn more, read [LaunchDarkly in federal environments](/docs/home/infrastructure/federal).
</View>

<View title="EU docs" />

This topic describes how to add a custom approvals integration within LaunchDarkly. This is the second step required when building a [custom approvals integration](/docs/integrations/custom-approvals). Only customers with complex workflow management or approval systems in third-party applications that LaunchDarkly does not integrate with directly are likely to need a custom approvals integration.

## Add the custom approvals integration

After you [create your own approval application](/docs/integrations/custom-approvals/custom-app.md), you must set up an integration configuration to connect LaunchDarkly and your approval application.

To configure your custom approvals integration in LaunchDarkly:

1. Click the **gear** icon in the left sidebar to view Organization settings.
2. Click **Integrations** and search for the "Custom approvals" integration.
3. Click **Add integration**. A "Create configuration" panel appears.
4. Set the **Status** of the integration to **On**.
5. (Optional) Enter a **Name** for the integration. This is the name that will appear when you update your LaunchDarkly environment approval settings to use your custom approvals integration.
6. Enter the **API Token** that LaunchDarkly should use to authenticate when sending requests to your approval application.
7. Enter the **Custom approval service base URL** of your custom approval service. This is where LaunchDarkly will send requests.
8. (Optional) Enter the **Additional form variables**. This is a JSON schema describing the information that a LaunchDarkly account member needs to enter when they create an approval request.

> **Expand for JSON schema details**
>
> Here is an example of the additional form variables JSON schema:
>
> ```json title="Example additional form variables JSON schema" maxLines=0 expandable lines wrap theme={null}
> [
>   {
>   // required
>   // how your custom approvals application references this field
>   // LaunchDarkly uses the value here as a key
>   // in the "additionalFormVariables" object
>   // in the creationRequest that LaunchDarkly sends to your application
>     // in the creationRequest that LaunchDarkly sends to your application
>     "key": "exampleKey",
>
>     // required
>     // name of the field displayed in the LaunchDarkly approval request UI
>     "name": "Example field",
>
>     // required
>     // field type, can be any of 'string', 'boolean', 'uri', 'enum', and 'dynamicEnum'
>     "type": "string",
>
>     // required
>     // field description displayed in the LaunchDarkly approval request UI
>     "description": "Example description",
>
>     // optional
>     // placeholder text displayed in the LaunchDarkly approval request UI
>     "placeholder": "Example description",
>
>     // optional
>     // whether the field is optional
>     // if not specified, defaults to false
>     "isOptional": false,
>
>     // optional
>     // value if field left unspecified in the LaunchDarkly approval request UI
>     "defaultValue": null,
>
>     // optional
>     // array of allowed strings for enum-type fields
>     "allowedValues": null,
>
>     // required if type is set to dynamicEnum
>     // defines the request for getting dynamic options and the paths to parse them out of the response
>     "dynamicOptions": {
>       "endpoint": { // required. hostname must match the baseURL of the integration configuration
>         "url": "https://your-application-host.com/api/colors",
>         "method": "GET", // can only be GET
>         "headers": [
>           {
>             "name": "Authorization",
>             "value": "Bearer {{ apiKey }}" // apiKey will auto-fill with the apiKey defined on the integration configuration
>           }
>         ]
>       },
>       "parser": {
>         "optionsPath": "/data",
>         "optionsItems": {
>           "label": "/name",
>           "value": "/value"
>         }
>       }
>     }
>   },
>   {
>     // additional fields
>   }
> ]
> ```

9. Click **Save configuration**.
