Skip to content

sending Graph Node

Back to Index

Root Set Name: sendings

Fields
categoryStringValue
createdAtDateTimeOffsetValue
dataDynamicFieldsValue
dynamicDynamicFieldsValue
errorMessageStringValue
processedAtDateTimeOffsetValue
recipientStringValue
retryCountIntValue
sendingIdUuidValue
sentAtDateTimeOffsetValue
statusClrEnumValue`1
transportClrEnumValue`1
Edges
NameTypeCardinality

Query Sending records through the Graph API to monitor email delivery status, track failures, and analyze communication patterns.

Common Query Patterns

Monitor Recent Activity

Track recently sent emails across your system:

POST https://<hantera-hostname>/resources/graph
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[
{
"edge": "sendings",
"filter": "createdAt >= '2025-10-29T00:00:00Z'",
"orderBy": "createdAt desc",
"limit": 50,
"node": {
"fields": ["sendingId", "category", "recipient", "status", "createdAt", "sentAt"]
}
}
]

What this does: Returns the 50 most recent sendings from October 29th onwards, ordered by creation time.

Find Failed Deliveries

Identify emails that failed to deliver:

POST https://<hantera-hostname>/resources/graph
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[
{
"edge": "sendings",
"filter": "status == 'bounced'",
"orderBy": "createdAt desc",
"node": {
"fields": ["sendingId", "category", "recipient", "errorMessage", "retryCount", "createdAt"]
}
}
]

What this does: Returns all bounced emails with their error messages and retry counts.

Query by Category

Filter sendings by their category (e.g., password resets, order confirmations):

POST https://<hantera-hostname>/resources/graph
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[
{
"edge": "sendings",
"filter": "category == 'order_confirmation' and status == 'sent'",
"orderBy": "sentAt desc",
"limit": 100,
"node": {
"fields": ["sendingId", "recipient", "sentAt", "dynamic"]
}
}
]

What this does: Returns the 100 most recently sent order confirmation emails.

Monitor Pending Queue

Check the current queue depth to monitor system health:

POST https://<hantera-hostname>/resources/graph
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[
{
"edge": "sendings",
"alias": "pending",
"filter": "status == 'pending'",
"count": true
},
{
"edge": "sendings",
"alias": "recent",
"filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'sent'",
"count": true
}
]

What this does: Returns two counts: pending emails in queue and successfully sent emails today.

Integration with Custom Fields

Sending records include a dynamic field that stores custom data passed when creating the sending. You can define custom Graph fields to query this data:

Define a Custom Field

uri: /resources/registry/graph/sending/fields/orderId
spec:
value:
type: text
source: dynamic->'orderId'

Query Using Custom Field

POST https://<hantera-hostname>/resources/graph
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[
{
"edge": "sendings",
"filter": "orderId == '550e8400-e29b-41d4-a716-446655440000'",
"node": {
"fields": ["sendingId", "recipient", "status", "orderId"]
}
}
]

What this does: Finds all emails sent related to a specific order.

Working with Status Values

The status field tracks the lifecycle of each sending:

  • pending: Queued, waiting to be processed
  • sent: Successfully delivered to mail server
  • bounced: Delivery failed after retries exhausted
  • cancelled: Cancelled before processing (via REST API)

The cancelledAt field stores the timestamp when a sending was cancelled. Only pending sendings can be cancelled using the DELETE /resources/sendings/{id} REST endpoint.

Example: Monitoring delivery rates

POST https://<hantera-hostname>/resources/graph
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[
{
"edge": "sendings",
"alias": "sent",
"filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'sent'",
"count": true
},
{
"edge": "sendings",
"alias": "bounced",
"filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'bounced'",
"count": true
},
{
"edge": "sendings",
"alias": "pending",
"filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'pending'",
"count": true
}
]

Transport Types

The transport field indicates the communication channel:

  • email: Email delivery (currently supported)
  • sms: SMS delivery (future)
  • push: Push notification (future)

Currently, only email transport is implemented.

Authorization

Required Permissions:

graph/sending:query # Query sendings
graph/sending:field # Access individual fields

Cancelled Sendings

Query cancelled sendings to track cancellation activity:

POST https://<hantera-hostname>/resources/graph
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[
{
"edge": "sendings",
"filter": "status == 'cancelled'",
"orderBy": "cancelledAt desc",
"limit": 20,
"node": {
"fields": ["sendingId", "recipient", "category", "createdAt", "cancelledAt"]
}
}
]

What this does: Returns the 20 most recently cancelled sendings.

Back to Index