# Config

## Get current user-defined configuration values

<mark style="color:blue;">`GET`</mark> `/config`

Only returns the values that have been stored by the user through the API

{% tabs %}
{% tab title="200: OK " %}

```javascript
[
  {
    "key": "JWTSecret",
    "value": "OQekJ3DH4pRnWFl4wlN0hzhc5UIjdihEwFnwYLYUdXGXk+/f5JieT/1VLPUJnvALIGK014md41rUuarqYZscl2T5azHQmFhQmUKj8dEuoIELWB45wlkxDKcojCQi9Otk76itnmvKrbm/ZokDJxePNv2Edgc7/mLrTHG7l54w44c="
  },
  {
    "key": "WEBHOOK_FLOW_COMPONENT_ERROR",
    "value": "https://example.com/webhook"
  }
]
```

{% endtab %}
{% endtabs %}

## Create a configuration key/value pair

<mark style="color:green;">`POST`</mark> `/config`

#### Request Body

| Name                                    | Type   | Description         |
| --------------------------------------- | ------ | ------------------- |
| key<mark style="color:red;">\*</mark>   | String | Configuration key   |
| value<mark style="color:red;">\*</mark> | Any    | Configuration value |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "key": "myConfigKey",
  "value": "My Custom Value"
}
```

{% endtab %}
{% endtabs %}

## Removes a configuration entry

<mark style="color:red;">`DELETE`</mark> `/config/:key`

#### Path Parameters

| Name                                  | Type   | Description                                |
| ------------------------------------- | ------ | ------------------------------------------ |
| key<mark style="color:red;">\*</mark> | String | The key of the configuration to be removed |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{ "ok": true }
```

{% endtab %}
{% endtabs %}
