adsum API, automations package (1.0.0)

Download OpenAPI specification:

License: GPL-2.0-or-later

The operations of the automations package, merged into the published contract when the package is installed (see WebVision\Adsum\Core\Shared\Api\Contract\OpenApiDocument). Linted on its own.

Automations

Mails and in-app messages sent when something happens or a date comes round, with conditions, recipients, a test run, a run log and presets.

List the automations of the company

HR only; managers, employees and admins without HR receive 403. Sorted by name. Only the automations of the caller's company.

Authorizations:
bearerAuthsessionCookie
query Parameters
triggerKey
string (TriggerKey) ^[a-z][A-Za-z]*\.[a-z][A-Za-z]*$
Examples: triggerKey=employee.changed

The key of a trigger of an installed package, such as employee.birthday.

active
boolean
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Add an automation

The name is unique in the company (name). The trigger is one of an installed package (triggerKey); the conditions use its attributes with operators and values of their type (conditions[0].value); the roles are roles of the trigger, the employees employees of the company, the addresses valid (recipients.addresses[0]). The mail template and the document templates are templates of the company in the trigger's placeholder context. A placeholder of a data category one of the recipients may not receive is refused on recipients, naming the placeholder and the recipient. The change history records it.

Authorizations:
bearerAuthsessionCookie
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Idempotency-Key
string <uuid>

Client-generated key (UUID) making a POST safe to retry. A repeated key with an identical body returns the original response; with a different body it yields 422. While the first request with the key still runs, a repetition yields 409 (idempotency-request-in-progress) and does nothing; after a server error the key is free again.

Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

Unique in the company, without regard to case.

triggerKey
required
string (TriggerKey) ^[a-z][A-Za-z]*\.[a-z][A-Za-z]*$

The key of a trigger of an installed package, such as employee.birthday.

match
string (Match)
Enum: "all" "any"

all holds when every entry holds, any when one does.

Array of Comparison (object) or ConditionGroup (object) (Condition) <= 20 items

Without conditions the automation fires for every event of the trigger.

watchedAttributes
Array of strings unique

For a changed trigger without conditions, the attributes whose change fires it; all attributes of the trigger when empty.

offsetDays
integer [ -30 .. 30 ]

For a date trigger, the days before (negative) or after the date; 0 otherwise.

required
object (AutomationRecipients)

Roles of the trigger, fixed employees of the company and up to 10 fixed addresses; at least one of them. Every recipient receives a mail of their own, and a person reached twice receives one.

channel
string (Channel)
Enum: "email" "inApp" "both"

E-mail, an in-app message or both; external addresses always get e-mail.

mailTemplateId
required
string <uuid> (Uuid)
documentTemplateIds
Array of strings <uuid> (Uuid) <= 5 items unique [ items <uuid > ]

Templates attached to the mail as PDF, rendered for each recipient.

senderDisplay
string (SenderDisplay)
Enum: "company" "actorName"

The display name of the mails: the company's sender name (company), or " via " (actorName) with the actor's work address to reply to; events without an actor use the company's name.

active
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "triggerKey": "employee.changed",
  • "match": "all",
  • "conditions": [
    ],
  • "watchedAttributes": [
    ],
  • "offsetDays": -30,
  • "recipients": {
    },
  • "channel": "email",
  • "mailTemplateId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "documentTemplateIds": [
    ],
  • "senderDisplay": "company",
  • "active": true
}

Response samples

Content type
application/json
{
  • "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "name": "string",
  • "triggerKey": "employee.changed",
  • "match": "all",
  • "conditions": [
    ],
  • "watchedAttributes": [
    ],
  • "offsetDays": 0,
  • "recipients": {
    },
  • "channel": "email",
  • "mailTemplateId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "documentTemplateIds": [
    ],
  • "senderDisplay": "company",
  • "active": true,
  • "createdAt": "2026-10-01T08:15:00+02:00",
  • "updatedAt": "2026-10-01T08:15:00+02:00"
}

Read an automation

Authorizations:
bearerAuthsessionCookie
path Parameters
id
required
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Responses

Response samples

Content type
application/json
{
  • "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "name": "string",
  • "triggerKey": "employee.changed",
  • "match": "all",
  • "conditions": [
    ],
  • "watchedAttributes": [
    ],
  • "offsetDays": 0,
  • "recipients": {
    },
  • "channel": "email",
  • "mailTemplateId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "documentTemplateIds": [
    ],
  • "senderDisplay": "company",
  • "active": true,
  • "createdAt": "2026-10-01T08:15:00+02:00",
  • "updatedAt": "2026-10-01T08:15:00+02:00"
}

Change, activate or deactivate an automation

Checked like a new automation. The change applies to the next event; an event already evaluated is not evaluated again.

Authorizations:
bearerAuthsessionCookie
path Parameters
id
required
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

If-Match
required
string

ETag of the representation being modified (optimistic locking). A stale value yields 412.

Request Body schema: application/json
required
name
string [ 1 .. 100 ] characters
triggerKey
string (TriggerKey) ^[a-z][A-Za-z]*\.[a-z][A-Za-z]*$

The key of a trigger of an installed package, such as employee.birthday.

match
string (Match)
Enum: "all" "any"

all holds when every entry holds, any when one does.

Array of Comparison (object) or ConditionGroup (object) (Condition) <= 20 items
watchedAttributes
Array of strings unique
offsetDays
integer [ -30 .. 30 ]
object (AutomationRecipients)

Roles of the trigger, fixed employees of the company and up to 10 fixed addresses; at least one of them. Every recipient receives a mail of their own, and a person reached twice receives one.

channel
string (Channel)
Enum: "email" "inApp" "both"

E-mail, an in-app message or both; external addresses always get e-mail.

mailTemplateId
string <uuid> (Uuid)
documentTemplateIds
Array of strings <uuid> (Uuid) <= 5 items unique [ items <uuid > ]
senderDisplay
string (SenderDisplay)
Enum: "company" "actorName"

The display name of the mails: the company's sender name (company), or " via " (actorName) with the actor's work address to reply to; events without an actor use the company's name.

active
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "triggerKey": "employee.changed",
  • "match": "all",
  • "conditions": [
    ],
  • "watchedAttributes": [
    ],
  • "offsetDays": -30,
  • "recipients": {
    },
  • "channel": "email",
  • "mailTemplateId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "documentTemplateIds": [
    ],
  • "senderDisplay": "company",
  • "active": true
}

Response samples

Content type
application/json
{
  • "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "name": "string",
  • "triggerKey": "employee.changed",
  • "match": "all",
  • "conditions": [
    ],
  • "watchedAttributes": [
    ],
  • "offsetDays": 0,
  • "recipients": {
    },
  • "channel": "email",
  • "mailTemplateId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "documentTemplateIds": [
    ],
  • "senderDisplay": "company",
  • "active": true,
  • "createdAt": "2026-10-01T08:15:00+02:00",
  • "updatedAt": "2026-10-01T08:15:00+02:00"
}

Delete an automation

An event after the deletion sends nothing; the runs of the automation are deleted with it.

Authorizations:
bearerAuthsessionCookie
path Parameters
id
required
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Responses

Response samples

Content type
application/problem+json
{
  • "type": "../dictionary",
  • "title": "string",
  • "status": 0,
  • "detail": "string",
  • "instance": "../dictionary",
  • "code": 0,
  • "correlationId": "string",
  • "violations": [
    ],
  • "dependents": [
    ]
}

List the triggers of the installed packages

Each trigger with its attributes, placeholders and recipient roles, labelled in the caller's language. A package that is not installed contributes nothing.

Authorizations:
bearerAuthsessionCookie
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

List the runs of the company's automations

Each firing of an automation with its recipients and their outcome, the newest first. Runs are kept 365 days. from and to are days in the company's time zone, both included.

Authorizations:
bearerAuthsessionCookie
query Parameters
automationId
string <uuid> (Uuid)
Examples: automationId=0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b
outcome
string (RunOutcome)
Enum: "completed" "failed"

completed when the messages were handed on, failed with the error otherwise.

from
string <date> (Date)
Examples: from=2026-10-01

Inclusive start date of the period.

to
string <date> (Date)
Examples: to=2026-10-01

Inclusive end date of the period.

page
integer >= 1
Default: 1
perPage
integer [ 1 .. 200 ]
Default: 50
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "meta": {
    }
}

Try an automation against a record

Evaluates a saved or an unsaved automation against a record of its trigger's subject and returns whether the conditions hold, the recipients with the reason one would be skipped, and the mail per language, without sending anything. With sendToMe the mail in the caller's language goes to the caller alone. A record the company does not have is refused on subjectId.

Authorizations:
bearerAuthsessionCookie
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Request Body schema: application/json
required
automationId
string <uuid> (Uuid)
object (AutomationInput)
subjectId
required
string <= 64 characters

The record of the trigger's subject to test against, such as an employee.

sendToMe
boolean

Sends the rendered mail to the caller only.

Responses

Request samples

Content type
application/json
{
  • "automationId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "automation": {
    },
  • "subjectId": "string",
  • "sendToMe": true
}

Response samples

Content type
application/json
{
  • "conditionsMet": true,
  • "recipients": [
    ],
  • "renderings": [
    ],
  • "sentToMe": true
}

List the ready-made automations of the installed packages

Authorizations:
bearerAuthsessionCookie
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Copy a preset into the company

Adds the preset's mail template with its English and German texts and an active automation using it, both named after the preset in the caller's language. A preset whose name the company has already answers 409.

Authorizations:
bearerAuthsessionCookie
path Parameters
key
required
string^[a-z][A-Za-z]{1,59}$
header Parameters
Company-Id
string <uuid> (Uuid)
Examples: 0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b

Company context of the request. Defaults to the user's home company. A company the user has no role in yields 403.

Responses

Response samples

Content type
application/json
{
  • "id": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "name": "string",
  • "triggerKey": "employee.changed",
  • "match": "all",
  • "conditions": [
    ],
  • "watchedAttributes": [
    ],
  • "offsetDays": 0,
  • "recipients": {
    },
  • "channel": "email",
  • "mailTemplateId": "0192a3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b",
  • "documentTemplateIds": [
    ],
  • "senderDisplay": "company",
  • "active": true,
  • "createdAt": "2026-10-01T08:15:00+02:00",
  • "updatedAt": "2026-10-01T08:15:00+02:00"
}