v51

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2026-08-011534301009.2 KB
Notifications

Get notification event

Get a notification event by id.

get/api/v1/notification/events/{eventId}

Path parameters

eventIdstring required

Response

The request has succeeded.

idstring required

A unique identifier of the notification event.

type'entitlements.balance.threshold' | 'entitlements.reset' | 'invoice.created' | 'invoice.updated' required

Type of the notification event.

createdAtstring date-time required

Timestamp when the notification event was created in RFC 3339 format.

annotationsAnnotations

Set of key-value pairs managed by the system. Cannot be modified by user.

Example response

{
  "id": "01J2KNP1YTXQRXHTDJ4KPR7PZ0",
  "createdAt": "2023-01-01T01:01:01.001Z",
  "rule": {
    "createdAt": "2024-01-01T01:01:01.001Z",
    "updatedAt": "2024-01-01T01:01:01.001Z",
    "deletedAt": "2024-01-01T01:01:01.001Z",
    "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "name": "Balance threshold reached",
    "disabled": true,
    "channels": [
      {
        "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
      }
    ],
    "annotations": {
      "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
    },
    "metadata": {
      "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
    },
    "thresholds": [
      {
        "value": 100
      }
    ],
    "features": [
      {
        "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "key": "gpt4_tokens"
      }
    ]
  },
  "deliveryStatus": [
    {
      "reason": "Failed to dispatch event due to provider error.",
      "updatedAt": "2023-01-01T01:01:01.001Z",
      "channel": {
        "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
      },
      "annotations": {
        "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
      },
      "nextAttempt": "2023-01-01T01:01:01.001Z",
      "attempts": [
        {
          "timestamp": "2023-01-01T01:01:01.001Z"
        }
      ]
    }
  ],
  "payload": {
    "id": "01J2KNP1YTXQRXHTDJ4KPR7PZ0",
    "timestamp": "2023-01-01T01:01:01.001Z",
    "data": {
      "entitlement": {
        "createdAt": "2024-01-01T01:01:01.001Z",
        "updatedAt": "2024-01-01T01:01:01.001Z",
        "deletedAt": "2024-01-01T01:01:01.001Z",
        "metadata": {
          "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
        },
        "activeFrom": "2023-01-01T01:01:01.001Z",
        "activeTo": "2023-01-01T01:01:01.001Z",
        "annotations": {
          "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
        },
        "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "subjectKey": "customer-1",
        "featureKey": "example-feature-key",
        "featureId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "lastReset": "2023-01-01T01:01:01.001Z",
        "currentUsagePeriod": {
          "from": "2023-01-01T01:01:01.001Z",
          "to": "2023-02-01T01:01:01.001Z"
        },
        "measureUsageFrom": "2023-01-01T01:01:01.001Z",
        "usagePeriod": {
          "interval": "DAY",
          "intervalISO": "P1D",
          "anchor": "2023-01-01T01:01:01.001Z"
        }
      },
      "feature": {
        "createdAt": "2024-01-01T01:01:01.001Z",
        "updatedAt": "2024-01-01T01:01:01.001Z",
        "deletedAt": "2024-01-01T01:01:01.001Z",
        "archivedAt": "2023-01-01T01:01:01.001Z",
        "metadata": {
          "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
        },
        "meterSlug": "tokens_total",
        "meterGroupByFilters": {
          "model": "gpt-4",
          "type": "input"
        },
        "advancedMeterGroupByFilters": {
          "model": {
            "$in": [
              "gpt-4",
              "gpt-4o"
            ]
          },
          "type": {
            "$eq": "input"
          }
        },
        "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
      },
      "subject": {
        "createdAt": "2025-01-01T01:01:01.001Z",
        "updatedAt": "2025-02-01T01:01:01.001Z",
        "deletedAt": "2025-03-01T01:01:01.001Z",
        "id": "01G65Z755AFWAKHE12NY0CQ9FH",
        "key": "customer-id",
        "displayName": "Customer Name",
        "metadata": {
          "hubspotId": "123456"
        },
        "stripeCustomerId": "cus_JMOlctsKV8"
      },
      "value": {
        "hasAccess": true,
        "balance": 100,
        "usage": 50,
        "totalAvailableGrantAmount": 100,
        "config": "{ key: \"value\" }"
      },
      "customer": {
        "id": "01G65Z755AFWAKHE12NY0CQ9FH",
        "name": "ACME Inc.",
        "usageAttribution": {
          "subjectKeys": [
            "my_subject_key"
          ]
        },
        "createdAt": "2024-01-01T01:01:01.001Z",
        "updatedAt": "2024-01-01T01:01:01.001Z"
      }
    }
  },
  "annotations": {
    "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
  }
}