Create

Create a new event hook

The created event hook will only react to events fired for the currently active account.

Tokens

This action requires the following tokens:

  • eventhook-manage

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
event String   Name of the event to create an event hook for
type String   The type of event hook to create
target String   The target of this event hook. The format of the target depends on the type of this event hook

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash ID of this event hook
event String Name of the event this event hook reacts on
account

Account that this event hook reacts on; if not set, this event is not limited to an account

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
type String Label of the type of this event hook
target String Target of this event hook
createduser

If set, the user that created this event hook

The value of this field is an object containing the following fields:

Name Type Description
id Hash User ID
username String User name
createdapplication

If set, the application that created this event hook

The value of this field is an object containing the following fields:

Name Type Description
id Hash Application ID
name String Application name
description String Application description
iplock IP Mask IP-lock data for this application
datecreated DateTime When the application was created
datemodified DateTime When the application was last modified
active Boolean Whether this application is active
account Hash Account for this application
customer Hash Customer for this application
timezone TimeZone Timezone for this application

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_EVENT_NOT_FOUND (150)
The given event name is not an existing event.
STATUS_EVENT_HOOK_TYPE_NOT_FOUND (170)
The given event hook type is not valid.
STATUS_ACCESS_DENIED (4)
 
STATUS_EVENT_HOOK_INVALID_TARGET (161)