# Create config modifier

`POST /v1/environments/{environmentId}/operations/configmodifiers`

Available as MCP tool `create-config-modifier` (Write).

Config modifier endpoints allow you to review and manage config modifiers and their related links. [Learn about config modifiers](https://docs.redoxengine.com/permalink/1wyRkO4LmBwAMmsKArQoIr). 

Anyone in a Redox organization can view config modifiers and related links, but you must be assigned to an engineer or support role to update them.

You can:

- retrieve a list of config modifiers by environment or organization;
- create config modifiers or links;
- update config modifiers or links; or
- delete config modifiers or link.

### Create config modifier

Create a config modifier for a specific environment within a Redox organization. You can specify the details for a config modifier via API or the Redox dashboard ([learn how to create a config modifier in the dashboard](https://docs.redoxengine.com/permalink/6sZ0Y9XdnMRCyoSWlqscjM)).

This endpoint allows you to create config modifier at a time.

## Request parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `environmentId` | path | string | Yes | Identifies the specific environment that you're operating in or on behalf of. |

## Request body

Contains the fields that you can populate to create a new or update an existing config modifier.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | Contains the human-readable name of the config modifier. |
| `flavor` | string | Yes | Indicates the type, or flavor, of config modifier. A `put` flavor alters data (creates or replaces) in a payload, while a `delete` flavor removes something. Possible values: put, delete |
| `selector` | string | Yes | Indicates the location(s) within the payload that this config modifier will operate on. |
| `schema` | object | No | (For put flavors only) Contains a schema of keywords that define what the config modifier should do at the specified selector path. |

## Request example

_Generated from the schema: the values are placeholders, not a real payload._

```bash
curl 'https://api.redoxengine.com/platform/v1/environments/{environmentId}/operations/configmodifiers' \
--request POST \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
  "name": "string",
  "flavor": "put",
  "selector": "$.Patient.Identifiers[*].ID",
  "schema": {
    "plugin": {
      "name": "text",
      "action": "upper-case"
    }
  }
}'
```

## Responses

### 200

Contains a payload object with details about the requested config modifier.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No |  |
| `meta.version` | string | No | Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences. |
| `payload` | object | No |  |
| `payload.configModifier` | object | No | Contains a config modifier and its related details. |
| `payload.configModifier.id` | string (uuid) | No | Contains the unique identifier of the config modifier. |
| `payload.configModifier.version` | number | No | Indicates the iteration, or version number, of the config modifier. Version numbers start at 1 and increment every time a config modifier is updated. |
| `payload.configModifier.name` | string | No | Displays the human-readable name of the config modifier. |
| `payload.configModifier.flavor` | string | No | Indicates the type, or flavor, of config modifier. A `put` flavor alters data (creates or replaces) in a payload, while a `delete` flavor removes data from a payload. Possible values: put, delete |
| `payload.configModifier.selector` | string | No | Indicates the location(s) within the payload that this config modifier will operate on. |
| `payload.configModifier.schema` | object, nullable | No | Required for a `put` flavor config modifier. Indicates how to build the value at the location the selector specifies. |
| `payload.configModifier.createdAt` | string | No | Displays the date and time that the asset was originally created in ISO 8601 format. |
| `payload.configModifier.createdBy` | object | No | Contains the metadata about the user who created the asset. |
| `payload.configModifier.createdBy.id` | number | No | Contains the unique identifier of the user. |
| `payload.configModifier.createdBy.name` | string, nullable | No | Displays the user's full name. |
| `payload.configModifier.updatedAt` | string | No | Displays the date and time that the asset was last updated in ISO 8601 format. |
| `payload.configModifier.updatedBy` | object | No | Contains the metadata about the user who last updated the asset. |
| `payload.configModifier.updatedBy.id` | number | No | Contains the unique identifier of the user. |
| `payload.configModifier.updatedBy.name` | string, nullable | No | Displays the user's full name. |
| `payload.configModifier.deletedAt` | string, nullable | No | Displays the date and time that the asset was deleted. Returns a `null` value if the asset hasn't been deleted. |
| `payload.configModifier.deletedBy` | object, nullable | No | Contains the metadata about the user who deleted the asset. |
| `payload.configModifier.deletedBy.id` | number | No | Contains the unique identifier of the user. |
| `payload.configModifier.deletedBy.name` | string, nullable | No | Displays the user's full name. |
| `payload.configModifier.environment` | object | No | Describes the Redox environment that the asset belongs to. |
| `payload.configModifier.environment.id` | string (uuid) | No | Contains the unique identifier of the Redox environment. |
| `payload.configModifier.organization` | object | No | Describes the Redox organization that the asset belongs to. |
| `payload.configModifier.organization.id` | number | No | Contains the unique identifier of the Redox organization. |
| `payload.configModifier.organization.name` | string, nullable | No | Contains the human-readable name of the Redox organization. |
| `payload.configModifier.usage` | Array of object | No |  |
| `payload.configModifier.usage[].ownedBy` | string | No | Indicates whether the source or destination system owns the link. Only the owner can view the specific details or update a link. Possible values: source, destination |
| `payload.configModifier.usage[].linkId` | string (uuid) | No | Contains the unique identifier of the link for a specified asset. |
| `payload.configModifier.usage[].organization` | object | No | Describes the Redox organization that the asset belongs to. |
| `payload.configModifier.usage[].organization.id` | number | No | Contains the unique identifier of the Redox organization. |
| `payload.configModifier.usage[].organization.name` | string, nullable | No | Contains the human-readable name of the Redox organization. |
| `payload.configModifier.usage[].connectingOrganization` | object | No | Specifies the organization the asset is connected to when the subscription relates to a partner organization. |
| `payload.configModifier.usage[].connectingOrganization.id` | number | No | Contains the unique identifier of the Redox organization. |
| `payload.configModifier.usage[].connectingOrganization.name` | string, nullable | No | Contains the human-readable name of the Redox organization. |
| `payload.configModifier.usage[].processingLocation` | string | No | Identifies where a link will be applied during log processing. There are up to four stages that an asset can be linked to, depending on whether you own either the source, the destination, or both. Possible values: source-request, destination-request, source-response, destination-response |
| `payload.configModifier.usage[].subscription` | object | No |  |
| `payload.configModifier.usage[].subscription.dataModel` | string | No | Specifies the Redox data model that the link applies to or should apply to. |
| `payload.configModifier.usage[].subscription.source` | object | No | Specifies the source of the subscription that an asset is or should be linked to. |
| `payload.configModifier.usage[].subscription.source.id` | string (uuid) | Yes | Contains the unique identifier of the source. |
| `payload.configModifier.usage[].subscription.source.name` | string, nullable | No | Specifies the name of the source. |
| `payload.configModifier.usage[].subscription.destination` | object | No | Specifies the destination of the subscription that an asset is or should be linked to. |
| `payload.configModifier.usage[].subscription.destination.id` | string (uuid) | Yes | Contains the unique identifier of the destination. |
| `payload.configModifier.usage[].subscription.destination.name` | string, nullable | No | Specifies the name of the destination. |
| `payload.configModifier.usage[].eventTypes` | Array of string, nullable | No | Specifies the event types of the given Redox data model that the link applies to. If `null`, the config modifier is linked to all event types of the data model. |
| `payload.configModifier.usage[].processingOrder` | object | No | Contains the details for the processing order of the config modifiers linked to a given subscription. |
| `payload.configModifier.usage[].processingOrder.order` | number, nullable | No | Specifies the order that the config modifiers should run at the given processing location. |
| `payload.configModifier.usage[].processingOrder.total` | number | No | Displays the total number of config modifier links for the given subscription and processing location. |
| `payload.configModifier.promotionAssociations` | Array of object | No | Contains a list of promotions associated with this asset. |
| `payload.configModifier.promotionAssociations[].organization` | object | No | Describes the Redox organization that the asset belongs to. |
| `payload.configModifier.promotionAssociations[].organization.id` | number | No | Contains the unique identifier of the Redox organization. |
| `payload.configModifier.promotionAssociations[].organization.name` | string, nullable | No | Contains the human-readable name of the Redox organization. |
| `payload.configModifier.promotionAssociations[].fromAsset` | object | No | Describes the original asset that was created in staging and promoted to production. |
| `payload.configModifier.promotionAssociations[].fromAsset.id` | string (uuid) | No | Contains the unique identifier of the asset. |
| `payload.configModifier.promotionAssociations[].fromAsset.environment` | object | No | Describes the Redox environment that the asset belongs to. |
| `payload.configModifier.promotionAssociations[].fromAsset.environment.id` | string (uuid) | No | Contains the unique identifier of the Redox environment. |
| `payload.configModifier.promotionAssociations[].fromAsset.type` | string | No | Possible values: configModifier, filter, translationSet |
| `payload.configModifier.promotionAssociations[].fromAsset.latestVersion` | number | No | Displays the most recent version of the original asset in staging. This may vary from the version number in production. A different version number may indicate you need to re-promote the asset to production. |
| `payload.configModifier.promotionAssociations[].toAsset` | object | No | Describes the promoted asset that can be used or linked to subscriptions in production. |
| `payload.configModifier.promotionAssociations[].toAsset.id` | string (uuid) | No | Contains the unique identifier of the asset. |
| `payload.configModifier.promotionAssociations[].toAsset.environment` | object | No | Describes the Redox environment that the asset belongs to. |
| `payload.configModifier.promotionAssociations[].toAsset.environment.id` | string (uuid) | No | Contains the unique identifier of the Redox environment. |
| `payload.configModifier.promotionAssociations[].toAsset.type` | string | No | Possible values: configModifier, filter, translationSet |
| `payload.configModifier.promotionAssociations[].toAsset.latestVersion` | number | No | Displays the most recent version of the promoted asset in production. This may vary from the version number in staging. A different version number may indicate you need to re-promote the staging asset to production. |
| `payload.configModifier.promotionAssociations[].toAsset.outOfDate` | boolean | No | Indicates whether the version of the promoted asset in production is different from the version of the original asset in staging. |
| `payload.configModifier.promotionAssociations[].createdAt` | string | No | Displays the date and time that the asset was originally created in ISO 8601 format. |
| `payload.configModifier.promotionAssociations[].createdBy` | object | No | Contains the metadata about the user who created the asset. |
| `payload.configModifier.promotionAssociations[].createdBy.id` | number | No | Contains the unique identifier of the user. |
| `payload.configModifier.promotionAssociations[].createdBy.name` | string, nullable | No | Displays the user's full name. |
| `payload.configModifier.promotionAssociations[].updatedAt` | string | No | Displays the date and time that the asset was last updated in ISO 8601 format. |
| `payload.configModifier.promotionAssociations[].updatedBy` | object | No | Contains the metadata about the user who last updated the asset. |
| `payload.configModifier.promotionAssociations[].updatedBy.id` | number | No | Contains the unique identifier of the user. |
| `payload.configModifier.promotionAssociations[].updatedBy.name` | string, nullable | No | Displays the user's full name. |
| `payload.configModifier.promotionAssociations[].deletedAt` | string, nullable | No | Displays the date and time that the asset was deleted. Returns a `null` value if the asset hasn't been deleted. |
| `payload.configModifier.promotionAssociations[].deletedBy` | object, nullable | No | Contains the metadata about the user who deleted the asset. |
| `payload.configModifier.promotionAssociations[].deletedBy.id` | number | No | Contains the unique identifier of the user. |
| `payload.configModifier.promotionAssociations[].deletedBy.name` | string, nullable | No | Displays the user's full name. |

_Generated from the schema: the values are placeholders, not a real payload._

```json
{
  "meta": {
    "version": "1.0.0"
  },
  "payload": {
    "configModifier": {
      "id": "3c45db50-6bb2-4cca-b1f9-76125ae9770f",
      "version": 0,
      "name": "string",
      "flavor": "put",
      "selector": "$.Patient.Identifiers[*].ID",
      "schema": {
        "plugin": {
          "name": "text",
          "action": "upper-case"
        }
      },
      "createdAt": "2024-04-25T18:17:16.719Z",
      "createdBy": {
        "id": 0,
        "name": "string"
      },
      "updatedAt": "2024-04-25T18:17:16.719Z",
      "updatedBy": {
        "id": 0,
        "name": "string"
      },
      "deletedAt": "2024-04-25T18:17:16.719Z",
      "deletedBy": {
        "id": 0,
        "name": "string"
      },
      "environment": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      },
      "organization": {
        "id": 122,
        "name": "string"
      },
      "usage": [
        {
          "ownedBy": "source",
          "linkId": "009f739c-6620-43b0-978e-b245e723c57a",
          "organization": {
            "id": 122,
            "name": "string"
          },
          "connectingOrganization": {
            "id": 122,
            "name": "string"
          },
          "processingLocation": "source-request",
          "subscription": {
            "dataModel": "PatientAdmin",
            "source": {
              "name": "string",
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            },
            "destination": {
              "name": "string",
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            }
          },
          "eventTypes": [
            "string"
          ],
          "processingOrder": {
            "order": 0,
            "total": 0
          }
        }
      ],
      "promotionAssociations": [
        {
          "organization": {
            "id": 122,
            "name": "string"
          },
          "fromAsset": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "environment": {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            },
            "type": "configModifier",
            "latestVersion": 0
          },
          "toAsset": {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "environment": {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
            },
            "type": "configModifier",
            "latestVersion": 0,
            "outOfDate": true
          },
          "createdAt": "2024-04-25T18:17:16.719Z",
          "createdBy": {
            "id": 0,
            "name": "string"
          },
          "updatedAt": "2024-04-25T18:17:16.719Z",
          "updatedBy": {
            "id": 0,
            "name": "string"
          },
          "deletedAt": "2024-04-25T18:17:16.719Z",
          "deletedBy": {
            "id": 0,
            "name": "string"
          }
        }
      ]
    }
  }
}
```

### 400

Bad Request

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.id` | string | No | Contains a unique identifier for the given error instance. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Bad Request`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Bad Request",
      "code": "validation.error.bad.request",
      "detail": "Error details",
      "status": 400,
      "transient": false
    }
  }
}
```

### 403

Forbidden

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.errors` | Array of object | No |  |
| `payload.errors[].title` | string | No | Displays the high-level error message, typically something succinct like `Forbidden`. |
| `payload.errors[].code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |

```json
{
  "payload": {
    "errors": [
      {
        "title": "Forbidden",
        "code": "authorization.forbidden"
      }
    ]
  }
}
```

### 500

Internal Server Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Failed in step X`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Internal Server Error",
      "code": "failed.db.lookup",
      "detail": "Error details",
      "status": 500,
      "transient": true
    }
  }
}
```
