# Mutations / Security

# Security

**Mutation**
## createSecurityEvent — Returns [SecurityEvent](/documentation/Objects/Security-Event#SecurityEvent)

<p class="scopes"><span class="scope scope--none">No scope required</span></p>

| Arguments | Type | Description |
| --- | --- | --- |
| outlet | [ID](/documentation/Types/UUID#UUID) | The outlet the security event occurred in |
| register | [ID](/documentation/Types/UUID#UUID) | The register the security event occurred on |
| user | [ID](/documentation/Types/UUID#UUID) | The user who caused the event, if not specified it defaults to the current user |
| event | [SecurityEventEnum!](/documentation/Enums/Miscellaneous#SecurityEventEnum) | The event that occurred, if specifying your own event, use the CUSTOM_EVENT type |
| customEvent | *String* | The custom event that occurred, only specify when using the CUSTOM_EVENT type |
| metaData | [JSON](/documentation/Types/JSON#JSON) | Any internal data relating to the event |
| ipv4 | [IPv4](/documentation/Types/IPV4#IPV4) | The IPv4 Address this event originated from, if not specified it will use the current request's IPv4 address |
| ipv6 | [IPv6](/documentation/Types/IPV6#IPV6) | The IPv6 Address this event originated from, if not specified this will use the current request's IPv6 address |
| timestamp | [DateTime](/documentation/Types/Date-Time#DateTime) | The timestamp this event occurred, if not specified it will use the current timestamp |

**Example Mutation**

```graphql
mutation CreateSecurityEvent($event: SecurityEventEnum!) {
    createSecurityEvent(event: $event) {
        id,
        deviceId,
        event,
        metaData,
        ipv4
    }
}

# Example variables
{
    "event": "LOGIN"
}
```