跳到主要内容

CreateWebhooksConfigRequestDto

The target a webhook subscription calls, the events it listens for, and the secret it signs with.

NameTypeDescriptionNotes
nameStringThe label the subscription is listed under. It is for the administrator reading the list and is never sent to the target; it does not have to be unique.[required] [example: Production Webhook] [minLength: 0] [maxLength: 50]
uriStringThe address the portal posts the event payload to. It has to be an absolute http or https address outside the installation own network, and it is probed before anything is stored: it must answer a HEAD request with a success code, and a redirect does not count as one.[required] [example: https://example.com/webhook] [minLength: 1]
secretKeyStringThe shared secret the payload signature is computed with, so the receiver can tell a genuine call from a forged one. It has to satisfy the portal password rules published by GET api/2.0/settings/security/password, and it is never echoed back by any operation. On an update an empty value keeps the secret already stored.[optional] [example: my-secret-key-123] [minLength: 0] [maxLength: 50] [nullable]
enabledBooleanWhether the subscription delivers at all. While it is off the matching events are dropped rather than queued, so nothing from that period arrives once it is switched on again.[optional] [example: true]
sslBooleanWhether the target certificate is verified. Setting it demands an https target with a valid certificate; leaving it off delivers without checking the certificate at all.[optional] [example: true]
triggersWebhookTriggerThe events the subscription listens for, as a bitmask combining the flags; 0 subscribes to all of them. Take the flags the caller role is allowed to use from GET api/2.0/settings/webhook/triggers, since a flag beyond that set is refused with 400. A subscription still only fires for events its creator may see.[optional] [enum: 0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824]
targetIdStringThe single entity the subscription is narrowed to, by its identifier - a room or a file, for instance. Leaving it out delivers events about every entity the subscribed triggers cover.[optional] [example: 00000000-0000-0000-0000-000000000001] [minLength: 0] [maxLength: 255] [nullable]