---
title: "WebhookTriggers: Create job"
method: POST
path: "/job/webhook-triggers"
tags: ["Jobs"]
---

# WebhookTriggers: Create job

`POST /job/webhook-triggers`

## Request

- Base URL: `https://api.lytics.io/v2`
- URL: `https://api.lytics.io/v2/job/webhook-triggers`
- Auth: API key in header `Authorization`

Create a WebhookTriggers job

## Query parameters

- `account_id` string

## Request body `*/*`

- object
  - `auth_ids` string[]: Authorization IDs associated with the Job
  - `config` object, required: Job configuration, unique per-workflow
    - `additionalProperties` object: Additional configuration properties for use by templates. Jsonnet templates can access these values using lytemplates.jobConfGet("addtional_properties")
    - `audience_events` 'enters_only' | 'exits_only': Select which type of audience trigger events to send webhooks
    - `batch_flush_duration` integer: If Batch Events is selected, specify the duration in seconds to wait before sending a batch (when batch does not hit the batch size). If left empty, the default flush duration is 5 seconds. Maximum is 300 seconds.
    - `batch_requests` boolean: Select to batch user events, and send as an array of events in the payload. Batches will be sent every 5 seconds or immediately when the batch size specified below is hit first
    - `batch_size` integer: If Batch Events is selected, specify the max number of user events to be sent in each batch. If left empty, the default batch size is 10
    - `cloudevents` boolean
    - `cloudevents_source` string
    - `cloudevents_type` string
    - `field_changes` string[]: Select up to 75 user fields to trigger user change events. For any user in the exported audience, if any of the selected field values change, then the user field change event will be sent to the webhook.
    - `http_method` 'GET' | 'POST' | 'PUT' | 'PATCH': Select the HTTP method to use for the webhook request. If not provided, the default method is POST.
    - `include_segs` boolean: Select to include the entity's audience membership as a field on the payload called 'segments_all'
    - `segment_ids` string[], required
    - `template_id` string: Select a template to use for the webhook payload. If left empty, the payload will be sent as is.
    - `user_limit` integer: Maximum number of users to send before the limit resets at the specified time. Set to 0 for no limit.
    - `user_limit_day_of_week` string: Select the day of the week to reset the user limit count.
    - `user_limit_frequency` string: Select how frequently to reset the user limit count.
    - `user_limit_time_of_day` string: Select the time of day to reset the user limit count.
    - `user_limit_timezone` string: Select the timezone for the time of day to reset the user limit count.
    - `webhook_url` string, required
    - `withbackfill` boolean: Send users who already exist in the selected Lytics audience
    - `worker_count` integer: Set the max number simultaneous webhooks calls that can be handled at once (max 20)
  - `description` string: A user-defined description
  - `drop_events_during_quiet_window` boolean
  - `expires_at` string, date-time
  - `monitoring` object: Inline monitoring config. On write: omit to keep, null to clear, or a config to set.
  - `name` string, required: A user-defined name
  - `quiet_period` integer
  - `quiet_time_of_day` string
  - `quiet_timezone` string

## Response `201`

WebhookTriggers Job

- object
  - `_meta` object: Response Metadata
  - `data` object: Response Payload
    - `account_id` string: Lytics Account ID
    - `anomaly_rule` ModelsAnomalyRuleResp
      - `aid` integer
      - `checks` ModelsRuleCheckConfigReq[]
        - `allowable_violations` integer
        - `interval` string
        - `lookback_count` integer
        - `max_threshold` integer
        - `metric_type` string
        - `min_threshold` integer
        - `type` string
        - `variance_pct` number
      - `created` string
      - `id` string
      - `subject_id` string
      - `subject_type` string
      - `updated` string
    - `api_token_auth_id` string: this is set when work is create using access token
    - `auth_ids` string[]: Authorization IDs associated with the Job
    - `config` object, required: Job configuration, unique per-workflow
      - `additionalProperties` object: Additional configuration properties for use by templates. Jsonnet templates can access these values using lytemplates.jobConfGet("addtional_properties")
      - `audience_events` 'enters_only' | 'exits_only': Select which type of audience trigger events to send webhooks
      - `batch_flush_duration` integer: If Batch Events is selected, specify the duration in seconds to wait before sending a batch (when batch does not hit the batch size). If left empty, the default flush duration is 5 seconds. Maximum is 300 seconds.
      - `batch_requests` boolean: Select to batch user events, and send as an array of events in the payload. Batches will be sent every 5 seconds or immediately when the batch size specified below is hit first
      - `batch_size` integer: If Batch Events is selected, specify the max number of user events to be sent in each batch. If left empty, the default batch size is 10
      - `cloudevents` boolean
      - `cloudevents_source` string
      - `cloudevents_type` string
      - `field_changes` string[]: Select up to 75 user fields to trigger user change events. For any user in the exported audience, if any of the selected field values change, then the user field change event will be sent to the webhook.
      - `http_method` 'GET' | 'POST' | 'PUT' | 'PATCH': Select the HTTP method to use for the webhook request. If not provided, the default method is POST.
      - `include_segs` boolean: Select to include the entity's audience membership as a field on the payload called 'segments_all'
      - `segment_ids` string[], required
      - `template_id` string: Select a template to use for the webhook payload. If left empty, the payload will be sent as is.
      - `user_limit` integer: Maximum number of users to send before the limit resets at the specified time. Set to 0 for no limit.
      - `user_limit_day_of_week` string: Select the day of the week to reset the user limit count.
      - `user_limit_frequency` string: Select how frequently to reset the user limit count.
      - `user_limit_time_of_day` string: Select the time of day to reset the user limit count.
      - `user_limit_timezone` string: Select the timezone for the time of day to reset the user limit count.
      - `webhook_url` string, required
      - `withbackfill` boolean: Send users who already exist in the selected Lytics audience
      - `worker_count` integer: Set the max number simultaneous webhooks calls that can be handled at once (max 20)
    - `created` string
    - `deleted` boolean: The Job has been deleted
    - `description` string: A user-defined description
    - `drop_events_during_quiet_window` boolean
    - `expires_at` string, date-time
    - `id` string: A Lytics-assigned, immutable unique ID for the Job
    - `meta` object: Extra meta data about the job
    - `monitoring` object: Inline monitoring config. On write: omit to keep, null to clear, or a config to set.
    - `name` string, required: A user-defined name
    - `quiet_period` integer
    - `quiet_time_of_day` string
    - `quiet_timezone` string
    - `sleep_until` string
    - `status` 'runnable' | 'sleeping' | 'paused' | 'completed' | 'fault' | 'failed' | 'killed' | 'deleted' | 'unknown': The status of the job
    - `updated` string
    - `user_id` string: The user ID that created or updated the job
    - `workflow` string: The workflow slug
    - `workflow_id` string: The workflow ID
  - `request_id` string
  - `status` integer: HTTP Status Code

## Other responses

- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-03** `d8e975057aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lytics/apis/lytics-api/changes/job/webhook-triggers/post.md)

---

[API](https://skmtc.dev/lytics/apis/lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/lytics-api/revisions/d8e975057aec?raw)
