> 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.

# List custom event templates

GET https://cdn.emnify.net/api/v1/event/custom/template

Returns a list of all available custom event templates and their possible configuration parameters.
A template's `supported_action_ids` declares which actions are offered for the custom events deployed from it.
Templates aren't created through the API, so this list changes only with an emnify release.


Reference: https://docs.emnify.com/developers/api/custom-events/get-custom-event-templates

## Authentication

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

## Response

### 200

- `list of CustomEventTemplateOutputDto`

## Types

### CustomEventTemplateOutputDto

- `id` (string, required)
- `parent_organisation` (WithIdInputDto, required)
- `name` (string, required)
- `translationKeyName` (string, required)
- `status` (enum, required)
  - Allowed values: `active`, `disabled`
- `description` (string, required)
- `translationKeyDescription` (string, required)
- `configuration_properties` (list of ConfigurationPropertiesDto, required)
- `supported_targeting_parameters` (list of SupportedTargetingParametersDto, required)
- `supported_action_ids` (list of string, optional) — Action IDs the custom events deployed from this template declare support for, used to decide which actions are offered for those events. - 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.

### WithIdInputDto

- `id` (double, required)

### ConfigurationPropertiesDto

- `property` (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`
- `default` (string, required)
- `required` (boolean, required)
- `description` (string, required)
- `validators` (list of ValidatorDto, required)

### SupportedTargetingParametersDto

- `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)
- `validators` (list of ValidatorDto, required)

### ValidatorDto

- `validator_type` (enum, required)
  - Allowed values: `maxCount`, `minCount`, `min`, `max`, `minLength`, `maxLength`, `uniqueItems`
- `validator_value` (string, required)

## Examples

**Response**

```json
[
  {
    "id": "1",
    "parent_organisation": {
      "id": 2
    },
    "name": "PDP Threshold Count Over Time",
    "translationKeyName": "string",
    "status": "active",
    "description": "This event is triggered when more than [number] of PDPs are created in [time].\n",
    "translationKeyDescription": "string",
    "configuration_properties": [
      {
        "property": "count_of_pdp",
        "type": "number",
        "default": "5",
        "required": true,
        "description": "Number of PDP connections",
        "validators": [
          {
            "validator_type": "maxCount",
            "validator_value": "string"
          }
        ]
      },
      {
        "property": "duration",
        "type": "string",
        "default": "1w",
        "required": true,
        "description": "Duration of the PDP connection period (for example, '1D', '1w')",
        "validators": [
          {
            "validator_type": "maxCount",
            "validator_value": "string"
          }
        ]
      }
    ],
    "supported_targeting_parameters": [
      {
        "parameter": "service_policy",
        "type": "number[]",
        "description": "Service Policy",
        "validators": [
          {
            "validator_type": "maxCount",
            "validator_value": "string"
          }
        ]
      },
      {
        "parameter": "endpoint_tag",
        "type": "string[]",
        "description": "Endpoint Tag",
        "validators": [
          {
            "validator_type": "maxCount",
            "validator_value": "string"
          }
        ]
      }
    ],
    "supported_action_ids": [
      "system-send_notification_with_email"
    ],
    "translation_key_description": "PDP_THRESHOLD_COUNT_OVER_TIME_D",
    "translation_key_name": "PDP_THRESHOLD_COUNT_OVER_TIME_N"
  }
]
```

**SDK Code**

```python Available Custom Event Templates
import requests

url = "https://cdn.emnify.net/api/v1/event/custom/template"

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

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

print(response.json())
```

```javascript Available Custom Event Templates
const url = 'https://cdn.emnify.net/api/v1/event/custom/template';
const options = {method: 'GET', 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 Available Custom Event Templates
package main

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

func main() {

	url := "https://cdn.emnify.net/api/v1/event/custom/template"

	req, _ := http.NewRequest("GET", 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 Available Custom Event Templates
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/event/custom/template")

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

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

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

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

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/event/custom/template")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Available Custom Event Templates
using RestSharp;

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

```swift Available Custom Event Templates
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/event/custom/template")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```