ReferenceNotifications (webhooks)

undeliveredNotifications query

Retrieves undelivered notifications for a given event type, including the reason for the failure.

Syntax

1query {
2 undeliveredNotifications(
3 limit: Int,
4 cursor: String,
7}

Example

This example retrieves undelivered MessageThreadCreated notifications.

1query {
2 undeliveredNotifications(
3 limit: 3,
4 cursor: "9sjala03715723043xlld",
5 filters: {
6 eventType: "MessageThreadCreated",
7 creationDateTime: {
8 from: "2024-01-01T00:00:00Z",
9 to: "2024-06-15T23:59:59Z",
10 }
11 }
12 ) {
13 totalCount
14 cursor
15 elements {
16 notification {
17 eventType
18 creationDateTime
19 notificationId
20 payload
21 }
22 error {
23 code
24 message
25 }
26 }
27 }
28}

Arguments

NameDescription

cursor

Cursor value for this set of results.

Type: String

filters

Required.

Event type and creation date range to use to filter results.

Type: UndeliveredNotificationsFiltersInput

limit

Maximum number of notifications to be retrieved (up to 10).

Type: Int

Types


Name
Type
DateTime
DateTime

Scalar that represents a date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the date-time format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.

DateTimeRangeFilterInput
InputObject

Date and time range.

FieldDescription
fromNot nullable.

Beginning date of the date range.

Type: DateTime
operator

Whether the dates are inclusive or exclusive of the to/from dates.

Type: RangeOperator
toNot nullable.

Ending date of the date range.

Type: DateTime
Int
Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

JSON
JSON

JSON values as specified by ECMA-404.

Notification
Object

Notification details.

FieldDescription
creationDateTimeNot nullable.

Creation date and time of the notification.

Type: DateTime
eventTypeNot nullable.

Event type.

Type: String
notificationIdNot nullable.

Notification identifier.

Type: String
payloadNot nullable.

Notification payload.

Type: JSON
NotificationError
Object

Details about why the notification could not be delivered.

FieldDescription
codeNot nullable.

Error code. Values include DELIVERY_ERROR and SECRET_EXPIRED.

Type: String
messageNot nullable.

Error description.

Type: String
RangeOperator
Enum

"Values that indicate whether the specified dates are inclusive or exclusive.

NameDescription
INCLUSIVE

Includes messages or message threads that occurred on the specified dates in the results.

EXCLUSIVE

Excludes messages or message threads that occurred on the specified dates in the results.

String
String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

UndeliveredNotification
Object

Undelivered notification and the reason why it could not be delivered.

FieldDescription
error

Error that encountered when attempting to deliver the notification.

Type: NotificationError
notificationNot nullable.

Payload of the notification.

Type: Notification
UndeliveredNotificationsFiltersInput
InputObject

Event type and creation date range to use to filter results.

FieldDescription
creationDateTime

Creation date and time of the notification.

Type: DateTimeRangeFilterInput
eventType

Event type.

Type: String
UndeliveredNotificationsResponse
Object

Number of undelivered notifications and details of each.

FieldDescription
cursor

Value of the cursor of the last notification in the current page (empty if no more pages are available).

Type: String
elementsNot nullable.

List of undelivered notifications.

Type: Array of UndeliveredNotification
totalCountNot nullable.

Total number of notifications that could not be delivered.

Type: Int