Skip to content
Markets open

API reference

Notifications

In-app notifications for your account.

5 operationsBase URL https://packetexchange.io/api/v1Postman collection

List your notifications

GET/api/v1/notifications

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Unread critical notifications first, then newest activity first, with the unread and unread-critical counts.

Parameters

NameInTypeDescription
unreadquerystringOnly unread notificationsOne of 1, true
limitqueryinteger-

Response 200

FieldTypeDescription
datarequiredobject-
notificationsrequireddata.notificationsobject[]-
idrequireddata.notifications[].idstring (uuid)-
userIdrequireddata.notifications[].userIdstring (uuid)-
typerequireddata.notifications[].typestringMachine-readable kind, e.g. webhook_failing, connection, route_check_failed
titlerequireddata.notifications[].titlestring-
messagerequireddata.notifications[].messagestring-
readrequireddata.notifications[].readboolean-
datarequireddata.notifications[].dataobject | null-
createdAtrequireddata.notifications[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
severityrequireddata.notifications[].severitystringcritical = something is broken and needs your action (a failing route, a suspension, traffic stopped)One of info, warning, critical
linkrequireddata.notifications[].linkstring | nullDashboard path the notification opens, when it has one
occurrencesrequireddata.notifications[].occurrencesintegerHow many events this notification groups (repeats update one notification instead of adding more)
lastEventAtrequireddata.notifications[].lastEventAtstring (date-time) | nullWhen a grouped notification was last updated; null if never
unreadCountrequireddata.unreadCountinteger-
criticalUnreadCountrequireddata.criticalUnreadCountintegerUnread notifications that need action

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Mark a notification as read

POST/api/v1/notifications/{id}/read

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

Returns the standard envelope with no documented data fields.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get your notification email preference

GET/api/v1/notifications/preferences

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Whether unread critical notifications are emailed to you as a digest (on by default).

Response 200

FieldTypeDescription
datarequiredobject-
actionEmailrequireddata.actionEmailbooleanEmail me about issues that need action: at most one email every 4 hours listing unread critical notifications

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Set your notification email preference

PUT/api/v1/notifications/preferences

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Turn the "needs attention" digest email on or off. The digest lists unread critical notifications, at most once every 4 hours. Security and account emails are not affected.

Request body (application/json)

FieldTypeDescription
actionEmailrequiredboolean-

Response 200

FieldTypeDescription
datarequiredobjectSame fields as NotificationEmailPrefs, shown earlier on this page.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Mark all notifications as read

POST/api/v1/notifications/read-all

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

Returns the standard envelope with no documented data fields.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.