Webhook

SPA: Creates a new Webhook resource.

Creates a new Webhook resource.

POST/api/spa/webhooks

Authorizations

X-AUTH-TOKEN
stringheaderrequired

Value for the X-AUTH-TOKEN header parameter.

Request Body

application/json
required

The new Webhook resource

{
  "identifier": "my-webhook",
  "type": "sftp-document",
  "priority": 1,
  "data": {
    "host": "sftp.example.com",
    "user": "sftp-user",
    "password": "sftp-password",
    "directory": "sftp-directory/sub-directory",
    "port": 22
  },
  "active": true,
  "activeFrom": "2024-01-01",
  "groupIdentifier": "my_group",
  "groupCondition": "data['contract']['balance'] > 0"
}

Response

201application/json

Webhook resource created

id
integer

Webhook ID generated by Output.Rocks.

Example: 12345

identifier
stringrequired

Customer Identifier, used for webhook selection in rendering process

Example: "my-webhook"

type
enum<string>

Webhook type

Available options: chargecloud-documentprerender-api-documentprerender-api-emailbinect-documentbinect-emailepostbusiness-documentepostbusiness-emailsftp-documentsftp-email

Example: "sftp-document"

priority
integer

Webhook execution priority

Example: 1

data
object

Webhook configuration data.<br><b>IMPORTANT:</b> data structure depends on webhook type

Example: {"host":"sftp.example.com","user":"sftp-user","password":"sftp-password","directory":"sftp-directory/sub-directory","port":22}

createdBy
string

User, created this entry

Example: "user1@company.com"

updatedBy
string

User, updated this entry

Example: "user1@company.com"

createdAt
string<date-time>

UTC date time of entry creation

Example: "2024-08-23T00:00:00+00:00"

updatedAt
string<date-time>

UTC date time of last entry update

Example: "2024-08-23T00:00:00+00:00"

active
boolean

Active flag. Default: true

Available options: truefalse

Example: true

activeFrom
string<date-time>

Date to activate the entry. Default: today

Example: "2024-01-01"

groupIdentifier
string

Optional group identifier to be used with group conditions

Example: "my_group"

groupCondition
string

Group condition.

Example: "data['contract']['balance'] > 0"