--- title: "Create Reaction" slug: "create-reaction" tags: ["EDR with Forensics (EDRF)", "Endpoint Security"] updated: 2026-08-26T19:31:09Z published: 2026-08-26T19:31:09Z canonical: "docs.trellix.com/create-reaction" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Create Reaction ### Overview This endpoint creates a custom reaction in the Trellix EDR environment. Provide a JSON payload that includes the reaction name, execution content (such as scripts), and required arguments. The response returns the created reaction with a unique identifier and associated metadata. Use this endpoint to define response actions that execute specific commands or scripts on endpoints. ### Authentication Authentication type: Bearer Token, API Key. You can create a token using client credentials obtained through the [developer portal](https://developer.manage.trellix.com/). The API Key (`x-api-key`) is provided in your onboarding email or on the API Access Management page. ### Path *(or URL)* ``` POST https://{Trellix EDR_gateway_URL}/edr/v2/reactions ``` ### Request ###### Request headers ``` Authorization: Bearer Content-Type: application/vnd.api+json x-api-key: ``` - **Authorization**: This header is used to authenticate your request. You need to replace `<your_bearer_token>` with the actual token you generate. - **Content-Type**: This header tells the server that the request body format is `json:api`. Even though this specific call has no request body, the API requires this header. - **x-api-key**: This is a custom header required by the Trellix API for authentication. You'll need to replace `<your_api_key>` with the key from your onboarding email or the [API Access Management](https://developer.manage.trellix.com/public) page. ###### Request example ``` {  "data": {    "type": "reactions",    "attributes": {      "name": "_Check_New_reaction",      "description": "Creating a new reaction",      "contents": [        {          "platform": {            "name": "windows"          },          "capability": {            "name": "Execute Powershell Script"          },          "content": "ls"        }      ],      "arguments": [        {          "name": "ABC",          "type": "NUMBER"        }      ],      "timeout": 60    }  } } ``` ### Response ###### Response example ``` {  "data": {    "id": "587",    "type": "customReactions",    "attributes": {      "catalogVersion": 0,      "metadata": {},      "hidden": false,      "dbVersion": 0,      "description": "Creating a new reaction",      "timeout": 60,      "internalArguments": {},      "internalName": "_Check_New_reaction",      "remediation": false,      "task": "REACTION",      "contents": [        {          "id": "11976",          "platform": {            "catalogVersion": 1307,            "dbVersion": 0,            "id": "1",            "name": "windows",            "topic": "/mcafee/mar/agent/query/windows",            "enabled": true          },          "capability": {            "catalogVersion": 1307,            "dbVersion": 0,            "id": "27",            "name": "Execute PowerShell Script",            "description": "Runs Windows PowerShell Scripts",            "module": "SystemRuntime",            "function": "executePS",            "contentEnabled": true,            "outputs": [],            "formatArgs": {              "hasHeaders": false,              "delimiter": ","            },            "format": "CSV",            "platforms": [              {                "catalogVersion": 1307,                "dbVersion": 0,                "id": "1",                "name": "windows",                "topic": "/mcafee/mar/agent/query/windows",                "enabled": true              }            ],            "platformSettings": [              {                "id": "5346",                "platform": {                  "catalogVersion": 1307,                  "dbVersion": 0,                  "id": "1",                  "name": "windows",                  "topic": "/mcafee/mar/agent/query/windows",                  "enabled": true                },                "utf8Sensitive": false              }            ],            "itemType": "CUSTOM",            "catalogItems": [              "REACTION",              "COLLECTOR"            ]          },          "content": "ls\r\n",          "arguments": [],          "utf8Sensitive": false        }      ],      "availableForTrigger": true,      "name": "_Check_New_reaction",      "arguments": [        {          "id": "2946",          "name": "abc",          "type": "NUMBER",          "optional": false        }      ],      "availableOffline": false    }  },  "links": {    "self": "/edr/v2/reactions/587"  } } ``` ### Response codes | Status | Response | Description | | --- | --- | --- | | 201 | OK | Your request was processed successfully. The server has returned the requested data. | | 400 | Bad request | The server couldn't understand your request, likely due to a syntax error or an invalid parameter. |