> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

# Update an automation

PATCH https://cdn.emnify.net/api/v1/automation/{id}
Content-Type: application/json

Updates an automation with the configured event and selected actions, respecting the configured targets.


Reference: https://docs.emnify.com/developers/api/automations/update-automation

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required)

### Body (application/json)

This endpoint expects an AutomationUpdateDto.

- `name` (string, required)
- `description` (string, required)
- `status` (string, required)
- `configured_actions` (list of ConfiguredActionCreateDto, required)
- `targeting_properties` (list of ConfigurationInputPropertiesDto, required)

## Response

### 200

- `id` (string, required)
- `name` (string, required)
- `description` (string, required)
- `status` (string, required)
- `organisation` (WithIdInputDto, required)
- `number_of_executions` (double, required)
- `last_execution` (string, required)
- `created_at` (string, required)
- `modified_at` (string, required)
- `actionable_event` (ActionableEventOutputDto, required)
- `configured_actions` (list of ConfiguredActionOutputDto, required)
- `targeting_properties` (list of ConfigurationInputPropertiesDto, required)

## Types

### ConfiguredActionCreateDto

- `action` (ConfiguredActionReferenceDto, required)
- `properties` (list of ConfigurationInputPropertiesDto, required)

### ConfigurationInputPropertiesDto

- `property` (string, required)
- `value` (string, required)
- `value_array` (list of string, required)

### WithIdInputDto

- `id` (double, required)

### ActionableEventOutputDto

- `custom_event` (CustomEventOutputDto, required)
- `system_event` (SystemEventOutputDto, required)

### ConfiguredActionOutputDto

- `action` (WithUuidInputDto, required)
- `properties` (list of ConfigurationInputPropertiesDto, required)
- `recipients` (ConfiguredActionRecipientOutputDto, required) — Details of the email notification recipients configured for the action.

### ConfiguredActionReferenceDto

- `id` (string, required)
- `type` (string, optional)

### CustomEventOutputDto

- `organisation` (WithIdInputDto, required)
- `template` (WithIdInputDto, required)
- `configuration_properties` (list of ConfigurationInputPropertiesDto, required)
- `name` (string, required)
- `id` (string, required)
- `supportedTargetingParameters` (list of string, required)
- `supportedActions` (list of string, required)
- `supported_action_ids` (list of string, optional) — Action IDs this event declares support for, used to decide which actions are offered for it. - Field absent: no restriction is declared, so every action whose `required_event_output_parameters` the event emits is offered. - Empty array: a declaration in its own right, so no actions are offered. - Non-empty list: intersected with the parameter check, so a listed action is offered only if the event also emits every parameter that action requires. The list can only narrow what's offered, never widen it.

### SystemEventOutputDto

- `id` (string, required)
- `parentOrg` (WithIdInputDto, required)
- `eventType` (WithIdInputDto, required)
- `name` (string, required)
- `translationKeyName` (string, required)
- `description` (string, required)
- `translationKeyDescription` (string, required)
- `supportedTargetingParameters` (list of string, required)
- `eventOutputParameters` (list of ConfigurationParameterDto, required)
- `supportedActions` (list of string, required)
- `supported_action_ids` (list of string, optional) — Action IDs this event declares support for, used to decide which actions are offered for it. - Field absent: no restriction is declared, so every action whose `required_event_output_parameters` the event emits is offered. - Empty array: a declaration in its own right, so no actions are offered. - Non-empty list: intersected with the parameter check, so a listed action is offered only if the event also emits every parameter that action requires. The list can only narrow what's offered, never widen it.

### WithUuidInputDto

- `id` (string, required)

### ConfiguredActionRecipientOutputDto

- `email` (list of string, required)

### ConfigurationParameterDto

- `parameter` (string, required)
- `type` (enum, required)
  - Allowed values: `string`, `string[]`, `number`, `number[]`, `boolean`, `boolean[]`, `email`, `email[]`, `severity`, `percentage`, `megabytes`, `megabytes[]`, `tariff_id`, `tariff_id[]`, `ratezone`, `ratezone[]`, `service_profile_id`, `service_profile_id[]`, `tariff_profile_id`, `tariff_profile_id[]`, `tag_id`, `tag_id[]`, `recurrence`, `time`, `date`, `minute`
- `description` (string, required)

## Examples

### Automations_updateAutomation_example

**Response**

```json
{
  "id": "56",
  "name": "Endpoint data traffic limit warning email",
  "description": "Sends an email when the endpoint data traffic limit warning is triggered for service profile 3.\n",
  "status": "active",
  "organisation": {
    "id": 1550
  },
  "number_of_executions": 3,
  "last_execution": "2025-01-01T00:00:00.000Z",
  "created_at": "2024-01-01T03:00:00.000Z",
  "modified_at": "2024-05-06T05:00:00.000Z",
  "actionable_event": {
    "custom_event": {
      "organisation": {
        "id": 1.1
      },
      "template": {
        "id": 1.1
      },
      "configuration_properties": [
        {
          "property": "string",
          "value": "string",
          "value_array": [
            "string"
          ]
        }
      ],
      "name": "string",
      "id": "string",
      "supportedTargetingParameters": [
        "string"
      ],
      "supportedActions": [
        "string"
      ]
    },
    "system_event": {
      "id": "605",
      "parentOrg": {
        "id": 1.1
      },
      "eventType": {
        "id": 1.1
      },
      "name": "Endpoint data traffic limit warning",
      "translationKeyName": "string",
      "description": "Endpoint data traffic limit warning",
      "translationKeyDescription": "string",
      "supportedTargetingParameters": [
        "string"
      ],
      "eventOutputParameters": [
        {
          "parameter": "string",
          "type": "string",
          "description": "string"
        }
      ],
      "supportedActions": [
        "string"
      ],
      "event_type": {
        "id": 65
      },
      "parent_organisation": {
        "id": 2
      },
      "supported_actions": [
        {
          "configuration_properties": [
            {
              "default": null,
              "description": "List of mail addresses to notify",
              "property": "recipients",
              "required": true,
              "type": "email[]"
            }
          ],
          "description": "Send notification via email",
          "id": "system-send_notification_with_email",
          "name": "Send notification via email",
          "required_event_output_parameters": [
            {
              "description": "Standard description of the event",
              "parameter": "event_description",
              "type": "string"
            }
          ],
          "status": "active",
          "translation_key_description": "Send notification with email D",
          "translation_key_name": "Send notification with email N",
          "type": "system"
        }
      ],
      "supported_targeting_parameters": [
        {
          "description": "Service Policy",
          "parameter": "service_policy",
          "type": "number[]"
        },
        {
          "description": "Endpoint Tag",
          "parameter": "endpoint_tag",
          "type": "string[]",
          "validators": [
            {
              "type": "minCount",
              "value": 1
            }
          ]
        }
      ],
      "translation_key_description": "endpoint_data_traffic_limit_warning_d",
      "translation_key_name": "endpoint_data_traffic_limit_warning_n"
    }
  },
  "configured_actions": [
    {
      "action": {
        "id": "system-send_notification_with_email",
        "configuration_properties": [
          {
            "default": null,
            "description": "list of mail addresses to notify",
            "property": "recipients",
            "required": true,
            "type": "email[]"
          }
        ],
        "description": "Send notification via email",
        "name": "Send notification via email",
        "required_event_output_parameters": [
          {
            "description": "Standard description of the event",
            "parameter": "event_description",
            "type": "string"
          }
        ],
        "status": "active",
        "translation_key_description": "Send notification with email D",
        "translation_key_name": "Send notification with email N",
        "type": "system"
      },
      "properties": [
        {
          "property": "recipients",
          "value": "string",
          "value_array": [
            "foo@bar.emnify"
          ]
        }
      ],
      "recipients": {
        "email": [
          "string"
        ]
      }
    }
  ],
  "targeting_properties": [
    {
      "property": "service_policy",
      "value": "string",
      "value_array": [
        "3"
      ]
    }
  ],
  "created_by": {
    "id": 1,
    "name": "John Doe"
  }
}
```

**SDK Code**

```python Automations_updateAutomation_example
import requests

url = "https://cdn.emnify.net/api/v1/automation/id"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript Automations_updateAutomation_example
const url = 'https://cdn.emnify.net/api/v1/automation/id';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Automations_updateAutomation_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://cdn.emnify.net/api/v1/automation/id"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Automations_updateAutomation_example
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/automation/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Automations_updateAutomation_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://cdn.emnify.net/api/v1/automation/id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Automations_updateAutomation_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://cdn.emnify.net/api/v1/automation/id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Automations_updateAutomation_example
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/automation/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Automations_updateAutomation_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/automation/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Custom Event

**Request**

```json
{
  "name": "Custom event notification email",
  "description": "Sends a notification via email for a custom event.\n",
  "status": "active",
  "configured_actions": [
    {
      "action": {
        "id": "system-send_notification_with_email"
      },
      "properties": [
        {
          "property": "recipients",
          "value": "string",
          "value_array": [
            "foo@bar.emnify"
          ]
        }
      ]
    }
  ],
  "targeting_properties": [
    {
      "property": "service_policy",
      "value": "string",
      "value_array": [
        "2"
      ]
    }
  ]
}
```

**Response**

```json
{
  "id": "56",
  "name": "Endpoint data traffic limit warning email",
  "description": "Sends an email when the endpoint data traffic limit warning is triggered for service profile 3.\n",
  "status": "active",
  "organisation": {
    "id": 1550
  },
  "number_of_executions": 3,
  "last_execution": "2025-01-01T00:00:00.000Z",
  "created_at": "2024-01-01T03:00:00.000Z",
  "modified_at": "2024-05-06T05:00:00.000Z",
  "actionable_event": {
    "custom_event": {
      "organisation": {
        "id": 1.1
      },
      "template": {
        "id": 1.1
      },
      "configuration_properties": [
        {
          "property": "string",
          "value": "string",
          "value_array": [
            "string"
          ]
        }
      ],
      "name": "string",
      "id": "string",
      "supportedTargetingParameters": [
        "string"
      ],
      "supportedActions": [
        "string"
      ]
    },
    "system_event": {
      "id": "605",
      "parentOrg": {
        "id": 1.1
      },
      "eventType": {
        "id": 1.1
      },
      "name": "Endpoint data traffic limit warning",
      "translationKeyName": "string",
      "description": "Endpoint data traffic limit warning",
      "translationKeyDescription": "string",
      "supportedTargetingParameters": [
        "string"
      ],
      "eventOutputParameters": [
        {
          "parameter": "string",
          "type": "string",
          "description": "string"
        }
      ],
      "supportedActions": [
        "string"
      ],
      "event_type": {
        "id": 65
      },
      "parent_organisation": {
        "id": 2
      },
      "supported_actions": [
        {
          "configuration_properties": [
            {
              "default": null,
              "description": "List of mail addresses to notify",
              "property": "recipients",
              "required": true,
              "type": "email[]"
            }
          ],
          "description": "Send notification via email",
          "id": "system-send_notification_with_email",
          "name": "Send notification via email",
          "required_event_output_parameters": [
            {
              "description": "Standard description of the event",
              "parameter": "event_description",
              "type": "string"
            }
          ],
          "status": "active",
          "translation_key_description": "Send notification with email D",
          "translation_key_name": "Send notification with email N",
          "type": "system"
        }
      ],
      "supported_targeting_parameters": [
        {
          "description": "Service Policy",
          "parameter": "service_policy",
          "type": "number[]"
        },
        {
          "description": "Endpoint Tag",
          "parameter": "endpoint_tag",
          "type": "string[]",
          "validators": [
            {
              "type": "minCount",
              "value": 1
            }
          ]
        }
      ],
      "translation_key_description": "endpoint_data_traffic_limit_warning_d",
      "translation_key_name": "endpoint_data_traffic_limit_warning_n"
    }
  },
  "configured_actions": [
    {
      "action": {
        "id": "system-send_notification_with_email",
        "configuration_properties": [
          {
            "default": null,
            "description": "list of mail addresses to notify",
            "property": "recipients",
            "required": true,
            "type": "email[]"
          }
        ],
        "description": "Send notification via email",
        "name": "Send notification via email",
        "required_event_output_parameters": [
          {
            "description": "Standard description of the event",
            "parameter": "event_description",
            "type": "string"
          }
        ],
        "status": "active",
        "translation_key_description": "Send notification with email D",
        "translation_key_name": "Send notification with email N",
        "type": "system"
      },
      "properties": [
        {
          "property": "recipients",
          "value": "string",
          "value_array": [
            "foo@bar.emnify"
          ]
        }
      ],
      "recipients": {
        "email": [
          "string"
        ]
      }
    }
  ],
  "targeting_properties": [
    {
      "property": "service_policy",
      "value": "string",
      "value_array": [
        "3"
      ]
    }
  ],
  "created_by": {
    "id": 1,
    "name": "John Doe"
  }
}
```

**SDK Code**

```python Custom Event
import requests

url = "https://cdn.emnify.net/api/v1/automation/id"

payload = {
    "name": "Custom event notification email",
    "description": "Sends a notification via email for a custom event.
",
    "status": "active",
    "configured_actions": [
        {
            "action": { "id": "system-send_notification_with_email" },
            "properties": [
                {
                    "property": "recipients",
                    "value": "string",
                    "value_array": ["foo@bar.emnify"]
                }
            ]
        }
    ],
    "targeting_properties": [
        {
            "property": "service_policy",
            "value": "string",
            "value_array": ["2"]
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Custom Event
const url = 'https://cdn.emnify.net/api/v1/automation/id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Custom event notification email","description":"Sends a notification via email for a custom event.\n","status":"active","configured_actions":[{"action":{"id":"system-send_notification_with_email"},"properties":[{"property":"recipients","value":"string","value_array":["foo@bar.emnify"]}]}],"targeting_properties":[{"property":"service_policy","value":"string","value_array":["2"]}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Custom Event
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://cdn.emnify.net/api/v1/automation/id"

	payload := strings.NewReader("{\n  \"name\": \"Custom event notification email\",\n  \"description\": \"Sends a notification via email for a custom event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"2\"\n      ]\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Custom Event
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/automation/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Custom event notification email\",\n  \"description\": \"Sends a notification via email for a custom event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"2\"\n      ]\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Custom Event
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://cdn.emnify.net/api/v1/automation/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Custom event notification email\",\n  \"description\": \"Sends a notification via email for a custom event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"2\"\n      ]\n    }\n  ]\n}")
  .asString();
```

```php Custom Event
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://cdn.emnify.net/api/v1/automation/id', [
  'body' => '{
  "name": "Custom event notification email",
  "description": "Sends a notification via email for a custom event.\\n",
  "status": "active",
  "configured_actions": [
    {
      "action": {
        "id": "system-send_notification_with_email"
      },
      "properties": [
        {
          "property": "recipients",
          "value": "string",
          "value_array": [
            "foo@bar.emnify"
          ]
        }
      ]
    }
  ],
  "targeting_properties": [
    {
      "property": "service_policy",
      "value": "string",
      "value_array": [
        "2"
      ]
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Custom Event
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/automation/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Custom event notification email\",\n  \"description\": \"Sends a notification via email for a custom event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"2\"\n      ]\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Custom Event
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Custom event notification email",
  "description": "Sends a notification via email for a custom event.
",
  "status": "active",
  "configured_actions": [
    [
      "action": ["id": "system-send_notification_with_email"],
      "properties": [
        [
          "property": "recipients",
          "value": "string",
          "value_array": ["foo@bar.emnify"]
        ]
      ]
    ]
  ],
  "targeting_properties": [
    [
      "property": "service_policy",
      "value": "string",
      "value_array": ["2"]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/automation/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### System Event

**Request**

```json
{
  "name": "System event notification email",
  "description": "Sends a notification via email for a system event.\n",
  "status": "active",
  "configured_actions": [
    {
      "action": {
        "id": "system-send_notification_with_email"
      },
      "properties": [
        {
          "property": "recipients",
          "value": "string",
          "value_array": [
            "foo@bar.emnify"
          ]
        }
      ]
    }
  ],
  "targeting_properties": [
    {
      "property": "service_policy",
      "value": "string",
      "value_array": [
        "3"
      ]
    }
  ]
}
```

**Response**

```json
{
  "id": "56",
  "name": "Endpoint data traffic limit warning email",
  "description": "Sends an email when the endpoint data traffic limit warning is triggered for service profile 3.\n",
  "status": "active",
  "organisation": {
    "id": 1550
  },
  "number_of_executions": 3,
  "last_execution": "2025-01-01T00:00:00.000Z",
  "created_at": "2024-01-01T03:00:00.000Z",
  "modified_at": "2024-05-06T05:00:00.000Z",
  "actionable_event": {
    "custom_event": {
      "organisation": {
        "id": 1.1
      },
      "template": {
        "id": 1.1
      },
      "configuration_properties": [
        {
          "property": "string",
          "value": "string",
          "value_array": [
            "string"
          ]
        }
      ],
      "name": "string",
      "id": "string",
      "supportedTargetingParameters": [
        "string"
      ],
      "supportedActions": [
        "string"
      ]
    },
    "system_event": {
      "id": "605",
      "parentOrg": {
        "id": 1.1
      },
      "eventType": {
        "id": 1.1
      },
      "name": "Endpoint data traffic limit warning",
      "translationKeyName": "string",
      "description": "Endpoint data traffic limit warning",
      "translationKeyDescription": "string",
      "supportedTargetingParameters": [
        "string"
      ],
      "eventOutputParameters": [
        {
          "parameter": "string",
          "type": "string",
          "description": "string"
        }
      ],
      "supportedActions": [
        "string"
      ],
      "event_type": {
        "id": 65
      },
      "parent_organisation": {
        "id": 2
      },
      "supported_actions": [
        {
          "configuration_properties": [
            {
              "default": null,
              "description": "List of mail addresses to notify",
              "property": "recipients",
              "required": true,
              "type": "email[]"
            }
          ],
          "description": "Send notification via email",
          "id": "system-send_notification_with_email",
          "name": "Send notification via email",
          "required_event_output_parameters": [
            {
              "description": "Standard description of the event",
              "parameter": "event_description",
              "type": "string"
            }
          ],
          "status": "active",
          "translation_key_description": "Send notification with email D",
          "translation_key_name": "Send notification with email N",
          "type": "system"
        }
      ],
      "supported_targeting_parameters": [
        {
          "description": "Service Policy",
          "parameter": "service_policy",
          "type": "number[]"
        },
        {
          "description": "Endpoint Tag",
          "parameter": "endpoint_tag",
          "type": "string[]",
          "validators": [
            {
              "type": "minCount",
              "value": 1
            }
          ]
        }
      ],
      "translation_key_description": "endpoint_data_traffic_limit_warning_d",
      "translation_key_name": "endpoint_data_traffic_limit_warning_n"
    }
  },
  "configured_actions": [
    {
      "action": {
        "id": "system-send_notification_with_email",
        "configuration_properties": [
          {
            "default": null,
            "description": "list of mail addresses to notify",
            "property": "recipients",
            "required": true,
            "type": "email[]"
          }
        ],
        "description": "Send notification via email",
        "name": "Send notification via email",
        "required_event_output_parameters": [
          {
            "description": "Standard description of the event",
            "parameter": "event_description",
            "type": "string"
          }
        ],
        "status": "active",
        "translation_key_description": "Send notification with email D",
        "translation_key_name": "Send notification with email N",
        "type": "system"
      },
      "properties": [
        {
          "property": "recipients",
          "value": "string",
          "value_array": [
            "foo@bar.emnify"
          ]
        }
      ],
      "recipients": {
        "email": [
          "string"
        ]
      }
    }
  ],
  "targeting_properties": [
    {
      "property": "service_policy",
      "value": "string",
      "value_array": [
        "3"
      ]
    }
  ],
  "created_by": {
    "id": 1,
    "name": "John Doe"
  }
}
```

**SDK Code**

```python System Event
import requests

url = "https://cdn.emnify.net/api/v1/automation/id"

payload = {
    "name": "System event notification email",
    "description": "Sends a notification via email for a system event.
",
    "status": "active",
    "configured_actions": [
        {
            "action": { "id": "system-send_notification_with_email" },
            "properties": [
                {
                    "property": "recipients",
                    "value": "string",
                    "value_array": ["foo@bar.emnify"]
                }
            ]
        }
    ],
    "targeting_properties": [
        {
            "property": "service_policy",
            "value": "string",
            "value_array": ["3"]
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript System Event
const url = 'https://cdn.emnify.net/api/v1/automation/id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"System event notification email","description":"Sends a notification via email for a system event.\n","status":"active","configured_actions":[{"action":{"id":"system-send_notification_with_email"},"properties":[{"property":"recipients","value":"string","value_array":["foo@bar.emnify"]}]}],"targeting_properties":[{"property":"service_policy","value":"string","value_array":["3"]}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go System Event
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://cdn.emnify.net/api/v1/automation/id"

	payload := strings.NewReader("{\n  \"name\": \"System event notification email\",\n  \"description\": \"Sends a notification via email for a system event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"3\"\n      ]\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby System Event
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/automation/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"System event notification email\",\n  \"description\": \"Sends a notification via email for a system event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"3\"\n      ]\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java System Event
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://cdn.emnify.net/api/v1/automation/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"System event notification email\",\n  \"description\": \"Sends a notification via email for a system event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"3\"\n      ]\n    }\n  ]\n}")
  .asString();
```

```php System Event
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://cdn.emnify.net/api/v1/automation/id', [
  'body' => '{
  "name": "System event notification email",
  "description": "Sends a notification via email for a system event.\\n",
  "status": "active",
  "configured_actions": [
    {
      "action": {
        "id": "system-send_notification_with_email"
      },
      "properties": [
        {
          "property": "recipients",
          "value": "string",
          "value_array": [
            "foo@bar.emnify"
          ]
        }
      ]
    }
  ],
  "targeting_properties": [
    {
      "property": "service_policy",
      "value": "string",
      "value_array": [
        "3"
      ]
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp System Event
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/automation/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"System event notification email\",\n  \"description\": \"Sends a notification via email for a system event.\\n\",\n  \"status\": \"active\",\n  \"configured_actions\": [\n    {\n      \"action\": {\n        \"id\": \"system-send_notification_with_email\"\n      },\n      \"properties\": [\n        {\n          \"property\": \"recipients\",\n          \"value\": \"string\",\n          \"value_array\": [\n            \"foo@bar.emnify\"\n          ]\n        }\n      ]\n    }\n  ],\n  \"targeting_properties\": [\n    {\n      \"property\": \"service_policy\",\n      \"value\": \"string\",\n      \"value_array\": [\n        \"3\"\n      ]\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift System Event
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "System event notification email",
  "description": "Sends a notification via email for a system event.
",
  "status": "active",
  "configured_actions": [
    [
      "action": ["id": "system-send_notification_with_email"],
      "properties": [
        [
          "property": "recipients",
          "value": "string",
          "value_array": ["foo@bar.emnify"]
        ]
      ]
    ]
  ],
  "targeting_properties": [
    [
      "property": "service_policy",
      "value": "string",
      "value_array": ["3"]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/automation/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```