# Create an Alert Endpoint: POST /api/v1/alerts Version: 1.0.0 ## Header parameters: - `Accept` (string) e.g. application/json Example: "application/json" - `Authorization` (string) e.g. Bearer Example: "Bearer " ## Request fields (application/json): - `id` (number) ID of the instance - `type` (string) could be 'Quantity' or 'DateReminder' - `threshold_method` (string) Allowed values for Quantity type: [ 'less_than_or_equal_to_min_quantity', 'quantity_greater_than', 'quantity_less_than', 'quantity_less_than_equal_to', 'quantity_greater_than_equal_to' ]; Allowed values for DateReminder type: [ 'before', 'after', 'same_day' ] - `threshold_value` (number) - `threshold_interval` (string) should be specified for DateReminder alerts. Could be one of ["days", "weeks", "months", "years"] - `recipient_groups` (array) describes the group which will be notified when alert triggers. If not specified 'owners' is added by default. Allowed values: [ 'owners', 'admins', 'members ] - `triggerable_type` (string) specifies a resource it should applied to. Could be either 'Node' for 'Quantity' type or 'CustomAttributeValue' for 'DateReminder' type. The CustomField should be of datetime field. - `triggerable_id` (number) specifies the ID of the resource either Item or CustomField - `is_deleted` (boolean) specifies whether the alert is deleted or not. - `is_fired` (boolean) specifies if the notification was sent to the recipient group or not. ## Response 200 fields (application/json): - `data` (object) - `data.item_id` (number) - `data.custom_attribute_id` (any,null) - `data.threshold_method` (string) - `data.threshold_value` (number) - `data.threshold_interval` (any,null) - `data.is_fired` (any,null) - `data.type` (string) - `data.is_deleted` (boolean) - `data.recipient_groups` (array) ## Response 400 fields (application/json): - `message` (string) ## Response 401 fields (application/json): - `message` (string)