---
title: "List smart notifications"
method: GET
path: "/v2/organizations/{organization_id}/insights/smart_notifications"
tags: ["smart_notifications"]
---

# List smart notifications

`GET /v2/organizations/{organization_id}/insights/smart_notifications`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/organizations/{organization_id}/insights/smart_notifications`
- Auth: OAuth 2
  - Authorization code: `https://account.hubstaff.com/authorizations/new`
  - Token URL: `https://account.hubstaff.com/access_tokens` scopes: `hubstaff:read`, `hubstaff:write`
- TypeScript: <https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/docs/v2/organizations/:organization_id/insights/smart_notifications/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the smart notification ocurrences for the given organization. By default, the API returns only the occurrences for which the API caller (current user) is a recipient of the notification.

Start and stop dates are required, the remaining parameters are optional.

When using the `user_ids` or `team_ids` filter, the API will filter the results based on the users who triggered the notification, not the users who will receive the notification.

## Path parameters

- `organization_id` integer, required

## Query parameters

- `page_start_id` integer
- `page_limit` integer
- `user_ids` integer[]
- `team_ids` integer[]
- `created[start]` string, date-time, required
- `created[stop]` string, date-time, required
- `rule_id` integer
- `include` string[]

## Response `200`

A list of smart notifications ocurrences

- object
  - `smart_notifications` SmartNotification[]
    - `id` integer, required: Smart notification ID
    - `matches` SmartNotificationMatch[], required: Matches that triggered the notification, i.e. users who violated the rule
      - `user_id` integer, required: User ID
      - `value` number, float, required: Value of the metric that the user got for the rule specified metric
    - `total_count` integer, required: Total number of matches/users who triggered the notification
    - `rule_snapshot` SmartNotificationRuleSnapshot, required
      - `id` integer, required: Smart notification rule ID
      - `name` string, required: Smart notification rule name
      - `frequency` string, required: Determines how often the conditions for notifications are checked
      - `metric_type` string, required: Metric type being monitored
      - `condition` string, required: Comparison condition that triggered the notification
      - `condition_value` number, float, required: Rule threshold value (in seconds if metric type is work_time or time_spent_in_tool
      - `time_unit` string: Duration of time over which the rule was evaluated
    - `from` unknown, required
    - `to` unknown, required
    - `created_at` string, date-time, required: When the record was created

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `403`: API access is only for organizations on an active plan
- `404`: Could not find record
- `429`: Rate limit exceeded

---

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