sending Graph Node
Back to IndexRoot Set Name: sendings
Fields
category | StringValue |
createdAt | DateTimeOffsetValue |
data | DynamicFieldsValue |
dynamic | DynamicFieldsValue |
errorMessage | StringValue |
processedAt | DateTimeOffsetValue |
recipient | StringValue |
retryCount | IntValue |
sendingId | UuidValue |
sentAt | DateTimeOffsetValue |
status | ClrEnumValue`1 |
transport | ClrEnumValue`1 |
Edges
| Name | Type | Cardinality |
|---|
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/graphAuthorization: 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"] } }]curl -i -X POST \ https://<hantera-hostname>/resources/graph \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "edge": "sendings", "filter": "createdAt >= '2025-10-29T00:00:00Z'", "orderBy": "createdAt desc", "limit": 50, "node": { "fields": ["sendingId", "category", "recipient", "status", "createdAt", "sentAt"] } }]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/graph" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[ { "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/graphAuthorization: Bearer <YOUR TOKEN>Content-Type: application/json
[ { "edge": "sendings", "filter": "status == 'bounced'", "orderBy": "createdAt desc", "node": { "fields": ["sendingId", "category", "recipient", "errorMessage", "retryCount", "createdAt"] } }]curl -i -X POST \ https://<hantera-hostname>/resources/graph \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "edge": "sendings", "filter": "status == 'bounced'", "orderBy": "createdAt desc", "node": { "fields": ["sendingId", "category", "recipient", "errorMessage", "retryCount", "createdAt"] } }]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/graph" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[ { "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/graphAuthorization: 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"] } }]curl -i -X POST \ https://<hantera-hostname>/resources/graph \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "edge": "sendings", "filter": "category == 'order_confirmation' and status == 'sent'", "orderBy": "sentAt desc", "limit": 100, "node": { "fields": ["sendingId", "recipient", "sentAt", "dynamic"] } }]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/graph" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[ { "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/graphAuthorization: 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 }]curl -i -X POST \ https://<hantera-hostname>/resources/graph \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "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 }]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/graph" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[ { "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/orderIdspec: value: type: text source: dynamic->'orderId'Query Using Custom Field
POST https://<hantera-hostname>/resources/graphAuthorization: Bearer <YOUR TOKEN>Content-Type: application/json
[ { "edge": "sendings", "filter": "orderId == '550e8400-e29b-41d4-a716-446655440000'", "node": { "fields": ["sendingId", "recipient", "status", "orderId"] } }]curl -i -X POST \ https://<hantera-hostname>/resources/graph \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "edge": "sendings", "filter": "orderId == '550e8400-e29b-41d4-a716-446655440000'", "node": { "fields": ["sendingId", "recipient", "status", "orderId"] } }]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/graph" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[ { "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 processedsent: Successfully delivered to mail serverbounced: Delivery failed after retries exhaustedcancelled: 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/graphAuthorization: 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 }]curl -i -X POST \ https://<hantera-hostname>/resources/graph \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "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 }]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/graph" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[ { "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 sendingsgraph/sending:field # Access individual fieldsCancelled Sendings
Query cancelled sendings to track cancellation activity:
POST https://<hantera-hostname>/resources/graphAuthorization: Bearer <YOUR TOKEN>Content-Type: application/json
[ { "edge": "sendings", "filter": "status == 'cancelled'", "orderBy": "cancelledAt desc", "limit": 20, "node": { "fields": ["sendingId", "recipient", "category", "createdAt", "cancelledAt"] } }]curl -i -X POST \ https://<hantera-hostname>/resources/graph \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "edge": "sendings", "filter": "status == 'cancelled'", "orderBy": "cancelledAt desc", "limit": 20, "node": { "fields": ["sendingId", "recipient", "category", "createdAt", "cancelledAt"] } }]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/graph" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[ { "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.
Related Resources
- Sendings Resource - Overview of the Sending resource and REST API
- Sending Emails Guide - Complete guide to sending emails
- resources.sendEmail() Function - Filtrera function for sending emails
- Graph API Overview - Learn more about querying with Graph