# Archive Workflow

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/automation/workflows/{id}/archive:
    put:
      summary: Archive Workflow
      deprecated: false
      description: ''
      tags:
        - API Reference/Management API/Automation/Workflows
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          schema:
            type: integer
            minimum: 1
        - name: Content-Type
          in: header
          description: '[Details](doc-341635)'
          required: true
          example: application/json
          schema:
            type: string
            default: application/json
            const: application/json
        - name: X-User-Agent
          in: header
          description: Arbitrary identifier of your client. [Details](doc-341635)
          required: true
          example: '{{X_USER_AGENT}}'
          schema:
            type: string
            default: '{{X_USER_AGENT}}'
        - name: X-Product-Name
          in: header
          description: API Product for API context. [Details](doc-341635)
          required: true
          example: '{{PRODUCT_NAME}}'
          schema:
            type: string
            default: '{{PRODUCT_NAME}}'
        - name: X-Loyalty-Club-Slug
          in: header
          description: LoyaltyClub for API context. [Details](doc-342138)
          required: false
          example: '{{LOYALTY_CLUB_SLUG}}'
          schema:
            type: string
            default: '{{LOYALTY_CLUB_SLUG}}'
        - name: X-Customer
          in: header
          description: Customer for API context.  [Details](doc-342139)
          required: false
          example: '{{CUSTOMER_ID}}'
          schema:
            type: string
            default: '{{CUSTOMER_ID}}'
        - name: Authorization
          in: header
          description: '[Member](doc-342129) or [User](doc-342130) Authorization.'
          required: false
          example: Bearer {{_OAUTH_TOKEN}}
          schema:
            type: string
            default: Bearer {{_OAUTH_TOKEN}}
        - name: X-Client-Authorization
          in: header
          description: '[Token](doc-342128) Authorization.'
          example: '{{API_TOKEN}}'
          schema:
            type: string
            default: '{{API_TOKEN}}'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  workflow:
                    $ref: '#/components/schemas/Workflow'
                x-apidog-orders:
                  - workflow
                required:
                  - workflow
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Success
        '404':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  error:
                    type: string
                    examples:
                      - Record not found
                x-apidog-orders:
                  - error
                required:
                  - error
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: API Reference/Management API/Automation/Workflows
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/346351/apis/api-4043313-run
components:
  schemas:
    Workflow:
      type: object
      properties:
        id: &ref_1
          $ref: '#/components/schemas/id1'
          description: Primary identifier of the record
          readOnly: true
        created_at: &ref_2
          type: string
          description: Time at which the record was created
          format: date-time
          readOnly: true
          examples:
            - '2022-11-15T16:25:58.099512Z'
        updated_at: &ref_3
          type: string
          description: Time at which the record was updated for the last time
          format: date-time
          readOnly: true
          examples:
            - '2022-11-15T16:25:58.099512Z'
        archived_at: &ref_17
          type: string
          description: Time at which the record was archived
          format: date-time
          readOnly: true
          examples:
            - '2022-11-15T16:25:58.099512Z'
          nullable: true
        workflow_group_id:
          description: ID of the [Group](doc-356869) that the workflow belongs to
          anyOf:
            - &ref_11
              description: ID of the [Group](doc-356869) that the workflow belongs to
              $ref: '#/components/schemas/id'
            - type: 'null'
        name:
          type: string
          examples:
            - When link is clicked, send a message
        starts_at: &ref_0
          $ref: '#/components/schemas/date'
        ends_at: *ref_0
        enabled:
          type: boolean
          description: When false, the workflow is disabled - it never triggers anything
          default: false
        lifecycle_status:
          type: string
          description: >-
            Describes temporal status of the Workflow based on starts_at and
            ends_at
          enum:
            - expired
            - ongoing
            - upcoming
          x-apidog-enum:
            - value: expired
              name: ''
              description: ''
            - value: ongoing
              name: ''
              description: ''
            - value: upcoming
              name: ''
              description: ''
          readOnly: true
        trigger:
          oneOf:
            - $ref: '#/components/schemas/MemberEvent'
            - $ref: '#/components/schemas/Cron'
        conditions:
          type: object
          properties:
            audience_id:
              type: integer
              description: >-
                When present, member has to be a member of given audience for
                the workflow to be started
              examples:
                - 57891
              nullable: true
          x-apidog-orders:
            - audience_id
          required:
            - audience_id
          description: Additional conditions needed to execute the actions
          x-apidog-ignore-properties: []
          nullable: true
        actions:
          type: array
          items: &ref_13
            $ref: '#/components/schemas/WorkflowAction'
          description: '[Actions](doc-356868) executed when the trigger is activated'
          readOnly: true
          maxItems: 5
          uniqueItems: true
      x-apidog-orders:
        - 01KD104ZAJ2GDT8MDBRKWY5RDY
        - 01KD1056HE1PXX4H373ETYDCNN
        - workflow_group_id
        - name
        - starts_at
        - ends_at
        - enabled
        - lifecycle_status
        - trigger
        - conditions
        - actions
      x-apidog-refs:
        01KD104ZAJ2GDT8MDBRKWY5RDY: &ref_10
          $ref: '#/components/schemas/Base%20record%20attributes'
        01KD1056HE1PXX4H373ETYDCNN:
          $ref: '#/components/schemas/archived_at'
      required:
        - id
        - created_at
        - updated_at
        - archived_at
        - workflow_group_id
        - name
        - starts_at
        - ends_at
        - enabled
        - lifecycle_status
        - trigger
        - conditions
        - actions
      x-apidog-ignore-properties:
        - id
        - created_at
        - updated_at
        - archived_at
      x-apidog-folder: ''
    WorkflowAction:
      oneOf:
        - $ref: '#/components/schemas/SendMessage'
        - $ref: '#/components/schemas/GrantOffer'
        - $ref: '#/components/schemas/GrantPoints'
        - $ref: '#/components/schemas/AddToGroup'
        - $ref: '#/components/schemas/RemoveFromGroup'
        - $ref: '#/components/schemas/AddToProgram'
        - $ref: '#/components/schemas/RemoveFromProgram'
        - $ref: '#/components/schemas/CallWebhook'
      x-apidog-folder: ''
    CallWebhook:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: &ref_4
              type: string
              enum:
                - minute
                - hour
                - day
                - week
                - month
                - quarter
              x-apidog-enum:
                - value: minute
                  name: ''
                  description: ''
                - value: hour
                  name: ''
                  description: ''
                - value: day
                  name: ''
                  description: ''
                - value: week
                  name: ''
                  description: ''
                - value: month
                  name: ''
                  description: ''
                - value: quarter
                  name: ''
                  description: ''
              examples:
                - day
            limit: &ref_5
              type: integer
              description: Maximum number of action executions for member
              examples:
                - 5
              minimum: 1
          x-apidog-orders: &ref_6
            - period
            - limit
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: &ref_7
          type: integer
          description: Total maximum number of action executions for member
          minimum: 1
          examples:
            - 100
          nullable: true
        delay_seconds: &ref_8
          type: integer
          description: >-
            The number of seconds to wait before action execution after the
            trigger activation 
          minimum: 1
          maximum: 86400
          examples:
            - 90
          nullable: true
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: &ref_9
          type: string
          description: Type of workflow action
          enum:
            - add_to_group
            - add_to_program
            - call_webhook
            - grant_offer
            - grant_points
            - remove_from_group
            - remove_from_program
            - send_message
          x-apidog-enum:
            - value: add_to_group
              name: ''
              description: ''
            - value: add_to_program
              name: ''
              description: ''
            - value: call_webhook
              name: ''
              description: ''
            - value: grant_offer
              name: ''
              description: ''
            - value: grant_points
              name: ''
              description: ''
            - value: remove_from_group
              name: ''
              description: ''
            - value: remove_from_program
              name: ''
              description: ''
            - value: send_message
              name: ''
              description: ''
        url:
          type: string
          format: uri
          examples:
            - https://example.com/webhook
          description: URL to send the webhook notification
        secret:
          type: string
          description: String that may be used to authenticate the webhook requests
          examples:
            - 1dbaf751ad4cd3a0ee592707e81abb6e
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - url
        - secret
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: &ref_12
          $ref: '#/components/schemas/_Core'
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - url
        - secret
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
      x-apidog-folder: ''
    _Core:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
      x-apidog-orders:
        - frequency
        - total_limit
        - delay_seconds
        - 01KFAN95RZPAERVYV0GYTCV0KC
        - type
      x-apidog-refs:
        01KFAN95RZPAERVYV0GYTCV0KC: *ref_10
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
      x-apidog-ignore-properties:
        - id
        - created_at
        - updated_at
      x-apidog-folder: ''
    RemoveFromProgram:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
        program_id: *ref_11
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - program_id
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: *ref_12
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - program_id
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
      x-apidog-folder: ''
    AddToProgram:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
        program_id: *ref_11
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - program_id
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: *ref_12
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - program_id
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
      x-apidog-folder: ''
    RemoveFromGroup:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
        group_id: *ref_11
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - group_id
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: *ref_12
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - group_id
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
      x-apidog-folder: ''
    AddToGroup:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
        group_id: *ref_11
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - group_id
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: *ref_12
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - group_id
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
      x-apidog-folder: ''
    GrantPoints:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
        points:
          type: integer
          description: Number of points to grant
          minimum: 1
          examples:
            - 45
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - points
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: *ref_12
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - points
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
      x-apidog-folder: ''
    GrantOffer:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
        offer_id: *ref_11
        feedback:
          type: object
          properties:
            timeout_days: &ref_14
              type: integer
              maximum: 365
              minimum: 1
              examples:
                - 14
              description: |
                Number of days for gathering the feedback from user
            success_action: *ref_13
            timeout_action: *ref_13
          x-apidog-orders: &ref_15
            - timeout_days
            - success_action
            - timeout_action
          required:
            - timeout_days
            - success_action
            - timeout_action
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - offer_id
        - 01KDQTC93GXNEJHTH5Y6DM2QTW
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: *ref_12
        01KDQTC93GXNEJHTH5Y6DM2QTW: &ref_16
          $ref: '#/components/schemas/_Feedback'
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - offer_id
        - feedback
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - feedback
      x-apidog-folder: ''
    _Feedback:
      type: object
      properties:
        feedback:
          type: object
          properties:
            timeout_days: *ref_14
            success_action: *ref_13
            timeout_action: *ref_13
          x-apidog-orders: *ref_15
          required:
            - timeout_days
            - success_action
            - timeout_action
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - feedback
      required:
        - feedback
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    SendMessage:
      type: object
      properties:
        frequency:
          type: object
          properties:
            period: *ref_4
            limit: *ref_5
          x-apidog-orders: *ref_6
          description: >-
            When present, describes how often the action can be executed for the
            same member in the given period
          required:
            - period
            - limit
          x-apidog-ignore-properties: []
          nullable: true
        total_limit: *ref_7
        delay_seconds: *ref_8
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
        type: *ref_9
        message_id: *ref_11
        feedback:
          type: object
          properties:
            timeout_days: *ref_14
            success_action: *ref_13
            timeout_action: *ref_13
          x-apidog-orders: *ref_15
          required:
            - timeout_days
            - success_action
            - timeout_action
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - 01KDQJQW241AG543HFQ47CQZNB
        - message_id
        - 01KDQTBCA95PQ5P7FEYA48GRJD
      x-apidog-refs:
        01KDQJQW241AG543HFQ47CQZNB: *ref_12
        01KDQTBCA95PQ5P7FEYA48GRJD: *ref_16
      required:
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - message_id
        - feedback
      x-apidog-ignore-properties:
        - frequency
        - total_limit
        - delay_seconds
        - id
        - created_at
        - updated_at
        - type
        - feedback
      x-apidog-folder: ''
    Cron:
      type: object
      properties:
        type:
          type: string
          const: cron
        recurrence:
          $ref: '#/components/schemas/Recurrence'
        hour:
          type: string
          description: '"HH:mm" format - in a time zone of the Loyalty Club'
          examples:
            - '09:00'
        frequency:
          type: object
          properties:
            period:
              type: string
              enum:
                - minute
                - hour
                - day
                - week
                - month
                - quarter
              x-apidog-enum:
                - value: minute
                  name: ''
                  description: ''
                - value: hour
                  name: ''
                  description: ''
                - value: day
                  name: ''
                  description: ''
                - value: week
                  name: ''
                  description: ''
                - value: month
                  name: ''
                  description: ''
                - value: quarter
                  name: ''
                  description: ''
              examples:
                - day
            occurrences_threshold:
              type: integer
              description: >-
                Minimum number of event occurrences before the trigger is
                activated
              minimum: 3
              nullable: true
            activations_limit:
              type: integer
              description: Maximum number of trigger activations
              minimum: 1
              examples:
                - 5
              nullable: true
          x-apidog-orders:
            - period
            - occurrences_threshold
            - activations_limit
          description: >-
            Describes how often the trigger should be activated for the same
            member during the given period
          required:
            - period
            - occurrences_threshold
            - activations_limit
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - type
        - recurrence
        - hour
        - frequency
      required:
        - type
        - recurrence
        - hour
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Recurrence:
      oneOf:
        - $ref: '#/components/schemas/Recurrence%3A%3ADaily'
        - $ref: '#/components/schemas/Recurrence%3A%3AWeekly'
        - $ref: '#/components/schemas/Recurrence%3A%3AMonthly'
      x-apidog-folder: ''
    Recurrence::Monthly:
      type: object
      properties:
        frequency:
          type: string
          const: monthly
        interval:
          type: integer
          minimum: 1
          examples:
            - 4
          description: How many months must pass between each repetition
        days:
          oneOf:
            - type: object
              properties:
                unit:
                  type: string
                  const: day
                days:
                  type: array
                  items:
                    type: integer
                    description: >-
                      Day of the month - between 1 and 31. Negative values are
                      also acceptable, for example -1 is the last day of the
                      month
                    minimum: -31
                    maximum: 31
                    examples:
                      - 2
                  description: Month days
                  minItems: 1
                  uniqueItems: true
              x-apidog-orders:
                - unit
                - days
              required:
                - unit
                - days
              description: For month days
              x-apidog-ignore-properties: []
            - type: object
              properties:
                unit:
                  type: string
                  const: weekday
                days:
                  type: array
                  items:
                    type: object
                    properties:
                      day:
                        type: integer
                        description: 0 - Sunday, (...),  6 - Saturday
                        examples:
                          - 3
                        minimum: 0
                        maximum: 6
                      weeks:
                        type: array
                        items:
                          type: integer
                          examples:
                            - 2
                        description: >-
                          On which week of the month the occurence should
                          happen. Between 1 and 5. Negative values are also
                          acceptable, for example -1 is the last week of the
                          month
                        examples:
                          - - 3
                            - 5
                        minItems: 1
                        uniqueItems: true
                        maxItems: 5
                    x-apidog-orders:
                      - day
                      - weeks
                    required:
                      - day
                      - weeks
                    description: >-
                      Week day of the month the occurrence should happen. Each
                      week day defines month weeks.

                      At least one has to be provided.
                    x-apidog-ignore-properties: []
                  description: Week days with numbers of the month
                  minItems: 1
                  uniqueItems: true
              x-apidog-orders:
                - unit
                - days
              required:
                - unit
                - days
              description: For week days
              x-apidog-ignore-properties: []
          description: On which days the occurrence should happen
      x-apidog-orders:
        - frequency
        - interval
        - days
      required:
        - frequency
        - interval
        - days
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Recurrence::Weekly:
      type: object
      properties:
        frequency:
          type: string
          const: daily
        interval:
          type: integer
          minimum: 1
          examples:
            - 4
          description: How many weeks must pass between each repetition
        days:
          type: array
          items:
            oneOf:
              - type: integer
                description: >-
                  Between 0 and 6. Negative values are also acceptable - for
                  example -1 is the last day of the week
                minimum: -7
                maximum: 6
                examples:
                  - 2
            description: 0 - Sunday, (...),  6 - Saturday
          description: On which week days the occurrence should happen
          minItems: 1
          maxItems: 7
          uniqueItems: true
      x-apidog-orders:
        - frequency
        - interval
        - days
      required:
        - frequency
        - interval
        - days
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Recurrence::Daily:
      type: object
      properties:
        frequency:
          type: string
          const: daily
        interval:
          type: integer
          minimum: 1
          examples:
            - 4
          description: How many days must pass between each repetition
      x-apidog-orders:
        - frequency
        - interval
      required:
        - frequency
        - interval
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    MemberEvent:
      type: object
      properties:
        type:
          type: string
          const: member_event
        event_type:
          type: string
          description: Available list of types may be retrieved [here](api-4025222)
          examples:
            - offer_used
        event_properties:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: present
                x-apidog-orders:
                  - name
                  - operator
                required:
                  - name
                  - operator
                description: The value of property is present (not null)
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: equals
                  value:
                    type: string
                    examples:
                      - 34
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: The value of property is equal to the given one
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: not_equals
                  value:
                    type: string
                    examples:
                      - 34
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: The value of property is different from the given one
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: in
                  value:
                    type: array
                    items:
                      type: string
                    examples:
                      - - 4
                        - 15
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: The value of property is equal to one of the given ones
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: not_in
                  value:
                    type: array
                    items:
                      type: string
                    examples:
                      - - 4
                        - 15
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: The value of property is different from all the given ones
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: lower
                  value:
                    type: string
                    examples:
                      - 34
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: The value of property is lower than the given one
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: equals_or_lower
                  value:
                    type: string
                    examples:
                      - 34
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: >-
                  The value of property is lower than given or equal to given
                  one
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: greater
                  value:
                    type: string
                    examples:
                      - 34
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: The value of property is greater than the given one
                x-apidog-ignore-properties: []
              - type: object
                properties:
                  name:
                    type: string
                    description: Name of the property to filter by
                    examples:
                      - offer_id
                  operator:
                    type: string
                    const: equals_or_greater
                  value:
                    type: string
                    examples:
                      - 34
                x-apidog-orders:
                  - name
                  - operator
                  - value
                required:
                  - name
                  - operator
                  - value
                description: >-
                  The value of property is greater than given or equal to given
                  one
                x-apidog-ignore-properties: []
          description: >-
            A list of criteria that event properties must meet to activate this
            trigger
          nullable: true
        event_sources_whitelist:
          type: array
          items:
            type: string
            examples:
              - android
          examples:
            - null
          description: >-
            When set, only events generated by these [API
            Products](doc-341635#x-product-name) will activate the trigger.
            Mutually exclusive with the blacklist.
          minItems: 1
          nullable: true
        event_sources_blacklist:
          type: array
          items:
            type: string
            examples:
              - ios
          description: >-
            When set, events generated by these [API
            Products](doc-341635#x-product-name) will not activate the trigger.
            Mutually exclusive with the blacklist.
          minItems: 1
          nullable: true
        delay_seconds:
          type: integer
          description: When set, the trigger will be activated after this delay
          minimum: 1
          maximum: 86400
          examples:
            - 5
          nullable: true
        frequency:
          type: object
          properties:
            period:
              type: string
              enum:
                - minute
                - hour
                - day
                - week
                - month
                - quarter
              x-apidog-enum:
                - value: minute
                  name: ''
                  description: ''
                - value: hour
                  name: ''
                  description: ''
                - value: day
                  name: ''
                  description: ''
                - value: week
                  name: ''
                  description: ''
                - value: month
                  name: ''
                  description: ''
                - value: quarter
                  name: ''
                  description: ''
              examples:
                - day
            occurrences_threshold:
              type: integer
              description: >-
                Minimum number of event occurrences before the trigger is
                activated
              minimum: 3
              nullable: true
            activations_limit:
              type: integer
              description: Maximum number of trigger activations
              minimum: 1
              examples:
                - 5
              nullable: true
          x-apidog-orders:
            - period
            - occurrences_threshold
            - activations_limit
          description: >-
            Describes how often the trigger should be activated for the same
            member during the given period
          required:
            - period
            - occurrences_threshold
            - activations_limit
          x-apidog-ignore-properties: []
          nullable: true
        rate:
          type: integer
          minimum: 1
          examples:
            - null
          description: >-
            When set, the trigger will be activated on the each Nth occurence of
            the event
          nullable: true
        total_activations_limit:
          type: integer
          description: Total maximum number of allowed trigger activations for member
          minimum: 1
          examples:
            - 100
          nullable: true
      x-apidog-orders:
        - type
        - event_type
        - event_properties
        - event_sources_whitelist
        - event_sources_blacklist
        - delay_seconds
        - frequency
        - rate
        - total_activations_limit
      required:
        - type
        - event_type
        - event_properties
        - event_sources_whitelist
        - event_sources_blacklist
        - delay_seconds
        - frequency
        - rate
        - total_activations_limit
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    date:
      type: string
      format: date
      examples:
        - '2023-01-15'
      x-apidog-folder: ''
    id:
      type: integer
      title: ''
      description: Identifier
      examples:
        - 1
      minimum: 1
      x-apidog-folder: ''
    id1:
      type: integer
      description: Primary identifier of the record
      format: uint64
      readOnly: true
      examples:
        - 1
      x-apidog-folder: ''
    archived_at:
      type: object
      properties:
        archived_at: *ref_17
      x-apidog-orders:
        - archived_at
      required:
        - archived_at
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Base record attributes:
      type: object
      properties:
        id: *ref_1
        created_at: *ref_2
        updated_at: *ref_3
      x-apidog-orders:
        - id
        - created_at
        - updated_at
      required:
        - id
        - created_at
        - updated_at
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.mpc.dev.placewise.com
    description: Staging
security: []

```