HomeGuidesAPI Reference
Log In
API Reference

Webhooks events and payloads

Process execution webhooks are used during the execution of processes you run on spektr's platform.

Read more about webhooks in spektr here.

🚧

WIP

These events are work in progress and their definition might slightly change in the final version.

WebhookDescriptionStatus
PROCESS_RUN_STARTEvent created when a process starts runningAvailable
PROCESS_RUN_ENDEvent created when a process finishes runningAvailable
STEP_INITEvent created when a form step is called in a process executionWIP
STEP_SUBMITEvent created when a form step is submitted by the userWIP
SERVICE_RUNEvent created when a service response is receivedAvailable
ALERT_CREATEDEvent created when an alert is createdWIP
ALERT_RESOLVEDEvent created when an alert is resolvedAvailable
CUSTOMER_TAG_ADDEDEvent created when a tag is added to a customer by a process or a userAvailable
CUSTOMER_TAG_REMOVEDEvent created when a tag is removed from a customer by a userAvailable
CUSTOMER_STATUS_CHANGEDEvent created when the status of a customer changes through a status node or manually by a userAvailable

PROCESS_RUN_START

{
  "id": "<event-id>",
  "spektrId": "<id end-user related to this event>",
  "type": "process_run_start",
  "delivered": true,
  "createdAt": 1672531199000,
  "reference": "optional-reference",
  "data": {
    "processType": "risk",
    "processName": "Risk Assessment",
    "processId": "12345",
    "contextId": "67890"
  }
}
NameTypeDescription
idstringEvent ID.
spektrIdstringID of the end-user related to this event.
typestringType of event, e.g., process_run_start.
deliveredboolean \null
createdAtnumberEpoch timestamp when the event was created.
processTypestringType of process, e.g., 'risk', 'monitoring', 'onboarding', etc.
processNamestringName of the process.
processIdstringID of the process.
contextIdstringID of the run.
referencestringOptional value passed to the onboarding process through a query param.

PROCESS_RUN_END

{
  "id": "<event-id>",
  "spektrId": "<id end-user related to this event>",
  "type": "<event-type>",
  "delivered": null,
  "process_name": "<process-name>",
  "process_output": "<process-output>",
  "files": {
    "clientFiles": ["<file1>", "<file2>"]
  },
  "fields": [
    {
      "key": "<field-key>",
      "label": "<field-label>",
      "helptext": "<field-helptext>",
      "placeholder": "<field-placeholder>",
      "internalId": "<field-internal-id>",
    }
  ],
  "data": {},
  "createdAt": 1672531199000
}
NameTypeDescription
idstringEvent identifier.
spektrIdstringID of the end-user related to this event.
typestringEvent type, e.g. process_run_end
deliveredboolean \null
process_namestringName of the process.
process_outputstringOutput of the process.
files.clientFilesArray of stringsContains urls for end-user files. Valid for 24 hour.
fieldsArray of FieldsList of fields.
field.keystring \null
field.labelstring \null
field.helptextstring \null
field.placeholderstring \null
field.internalIdstring \null
childrenArray of FieldsOptional child fields. Max 1 recursive depth.
dataobjectkey-value entries from end-user or external services. 'key' corresponds to field.key when entry was submitted by end-user.
createdAtnumberEpoch timestamp when the event was created.

STEP_SUBMIT (WIP)

Documentation will be made available when this event type is publicly available.

SERVICE_RUN

{
  "id": "<event-id>",
  "spektrId": "<id end-user related to this event>",
  "type": "service_run",
  "delivered": true,
  "createdAt": 1672531199000,
  "data": {
    "vendorType": "service type",
    "contextId":"<process run id",
    "processId":"<process id>",
    "processName": "process name",
    "processType": "process type",
    "reference": "optional-reference"
  }
}
NameTypeDescription
idstringEvent ID.
spektrIdstringID of the end-user related to this event.
typestringType of event, e.g., "service_run".
deliveredbooleanTrue if the event is already delivered via webhook, falsy otherwise.
createdAtnumberEpoch timestamp when the event was created.
data.vendorTypestringType of the vendor.
data.contextIdstringID of the process run.
data.processIdstringID of the process.
data.processNamestringName of the process.
data.processTypestringType of process, e.g., 'risk', 'monitoring', 'onboarding', etc.
data.referencestring \null

ALERT_CREATED (WIP)

Documentation will be made available when this event type is publicly available.

ALERT_RESOLVED

{
  "id": "<event-id>",
  "spektrId": "<id end-user related to this event>",
  "type": "alert_resolved",
  "delivered": true,
  "createdAt": 1672531199000,
  "data": {
		"contextId":"<process-run-id",
    "processId":"<process-id>",
		"userId":"<user-id that resolved alert>",
		"alertId":"<alert-id>",
		"alertName": "<alert name>
  }
}
NameTypeDescription
idstringEvent ID.
spektrIdstringID of the end-user related to this event.
typestringType of event, e.g., "alert_resolved".
deliveredbooleanTrue if the event is already delivered via webhook, falsy otherwise.
createdAtnumberEpoch timestamp when the event was created.
data.contextIdstringID of the process run.
data.processIdstringProcess ID.
data.userIdstringID of the user who resolved the alert.
data.alertIdstringAlert ID.
data.alertNamestringName of the alert.

CUSTOMERTAG<ADD|REMOVE>

{
  "id": "<event-id>",
  "spektrId": "<id end-user to/from which the tag was added/removed>",
  "type": "customer_tag_add" | "customer_tag_remove",
  "delivered": true,
  "createdAt": 1672531199000,
  "data": {
    "tagId": "<tag-id>",
    "action": "add" | "remove",
		"userId":"<user-id that added/removed the tag>",
		"processId":"<process-id that added/removed>"
  }
NameTypeDescription
idstringEvent ID.
spektrIdstringID of the end-user to which the tag was added.
typestringType of event, e.g., "customer_tag_add" or "customer_tag_remove"
deliveredbooleanTrue if the event is already delivered via webhook, false otherwise.
createdAtnumberEpoch timestamp when the event was created.
data.tagIdstringTag ID.
data.actionstringAction performed, i.e., 'add' or 'remove'
data.userIdstring \null
data.processIdstring \null

CUSTOMER_STATUS_CHANGED

{
  "id": "<event-id>",
  "spektrId": "<id end-user to which the tag was added>",
  "type": "customer_tag_add",
  "delivered": true,
  "createdAt": 1672531199000,
  "data": {
    "oldStatus": "<old status>",
		"newStatus":"<new status>",
    "customerName": "name of the end-user (individual or corporation)",
		"userId":"<user-id that changed the status if changed by user>",
    "processId": "<process-id that changed the status if changed by a process>",
		"processName": "<process name that changed the status if changed by a process>"
  }
}
NameTypeDescription
idstringEvent ID.
spektrIdstringID of the end-user to which the tag was added.
typestringType of event, e.g., "customer_tag_add".
deliveredbooleanTrue if the event is already delivered via webhook, falsy otherwise.
createdAtnumberEpoch timestamp when the event was created.
data.oldStatusstringOld status before the change.
data.newStatusstringNew status after the change.
data.customerNamestringName of the end-user (individual or corporation).
data.userIdstring \null
data.processIdstring \null
data.processNamestring \null