---
updatedAt: 2026-04-29T00:49:36.000Z
agentTools:
  projectIndex: https://synaccess.readme.io/llms.txt
---

# Create An Event

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Cloud.Synaccess",
    "version": "1.3"
  },
  "servers": [
    {
      "url": "https://cloud.synaccess.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "authorization",
        "in": "header",
        "x-default": "Bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "tags": [
    {
      "name": "Events",
      "description": "Event monitoring and lifecycle endpoints."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Devices",
      "tags": [
        "Device Inventory",
        "Device Live Telemetry",
        "Device Logs",
        "Configuration",
        "Firmware"
      ]
    },
    {
      "name": "Power Control",
      "tags": [
        "Outlets",
        "PDU Outlet Groups",
        "Inlets",
        "Banks",
        "Sensors"
      ]
    },
    {
      "name": "Automation",
      "tags": [
        "Events",
        "Actions"
      ]
    },
    {
      "name": "Organization",
      "tags": [
        "Groups"
      ]
    }
  ],
  "paths": {
    "/v1/devices/{enclosure_serial_number}/events": {
      "post": {
        "summary": "Create An Event",
        "description": "",
        "operationId": "create-an-event",
        "parameters": [
          {
            "name": "enclosure_serial_number",
            "in": "path",
            "description": "Unique serial number for a device",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "code",
                  "params",
                  "actions"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name string up to 100 characters"
                  },
                  "code": {
                    "type": "integer",
                    "description": "Event code for a particular trigger. See event code table",
                    "format": "int32"
                  },
                  "params": {
                    "type": "array",
                    "description": "Array of strings, maximum 3 parameters. See event code table",
                    "items": {
                      "type": "string"
                    }
                  },
                  "actions": {
                    "type": "array",
                    "description": "array of previous created action IDs.",
                    "items": {
                      "type": "integer",
                      "format": "int32"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"triggered\": true,\n    \"numTicksBeyond\": 341625,\n    \"timeExecutedInEpoch\": 1711138418,\n    \"id\": 2,\n    \"name\": \"example autoping event\",\n    \"enabled\": true,\n    \"code\": 12,\n    \"params\": [\n        \"192.168.1.194\",\n        \"6\",\n        \"\"\n    ],\n    \"actions\": [\n        2\n    ],\n    \"enclosureSerialNumber\": 1000036\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "triggered": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "numTicksBeyond": {
                      "type": "integer",
                      "example": 341625,
                      "default": 0
                    },
                    "timeExecutedInEpoch": {
                      "type": "integer",
                      "example": 1711138418,
                      "default": 0
                    },
                    "id": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "name": {
                      "type": "string",
                      "example": "example autoping event"
                    },
                    "enabled": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "code": {
                      "type": "integer",
                      "example": 12,
                      "default": 0
                    },
                    "params": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "192.168.1.194"
                      }
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "example": 2,
                        "default": 0
                      }
                    },
                    "enclosureSerialNumber": {
                      "type": "integer",
                      "example": 1000036,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Events"
        ]
      }
    }
  }
}
```