Webhook events
What Nibify posts to your webhook endpoints: message.delivered, message.read, message.answered, message.expired, message.dismissed, message.cancelled.
Each event reaches the webhook endpoints of your project as a signed POST with a JSON body. Answering 2XX means: received. Any other answer is retried. How to check the signature, and what happens when your server does not answer: Webhooks and signatures.
Headers
| Field | Description |
|---|---|
nibify-signaturestring · required | t=<unix seconds>,v1=<hex>: HMAC-SHA256 of <t>.<raw body>, keyed with the Project’s signing secret. |
nibify-event-idstring · required | The event’s id, the same on every retry of it. |
message.delivered
A Device of the recipient confirmed the push arrived.
Payload
| Field | Description |
|---|---|
idstring · required | The event’s id, the same on every retry of it: deduplicate on it. |
typestring · required | Which of the six events this is. Always message.delivered. |
createdAtstring · required | When the event happened. An RFC 3339 timestamp. |
dataobject · required | The Message, and its two receipts. |
data.string · required | The Message this event is about. For a Request, the same as its requestId. |
data.string · required | The Environment the Message was sent into. One of test, live. |
data.string or null · required | The Request’s status as it stands, or null for a Notification, which has none. One of pending, answered, expired, dismissed, cancelled. |
data.string · required | When a phone of the recipient first confirmed the push arrived. An RFC 3339 timestamp. |
data.null · required | Not read yet: message.read says when it is. |
message.read
The recipient opened the Message.
Payload
| Field | Description |
|---|---|
idstring · required | The event’s id, the same on every retry of it: deduplicate on it. |
typestring · required | Which of the six events this is. Always message.read. |
createdAtstring · required | When the event happened. An RFC 3339 timestamp. |
dataobject · required | The Message, and its two receipts. |
data.string · required | The Message this event is about. For a Request, the same as its requestId. |
data.string · required | The Environment the Message was sent into. One of test, live. |
data.string or null · required | The Request’s status as it stands, or null for a Notification, which has none. One of pending, answered, expired, dismissed, cancelled. |
data.string · required | When a phone of the recipient first confirmed the push arrived. An RFC 3339 timestamp. |
data.string · required | When the person first opened the Message. An RFC 3339 timestamp. |
message.answered
The person answered a Request.
Payload
| Field | Description |
|---|---|
idstring · required | The event’s id, the same on every retry of it: deduplicate on it. |
typestring · required | Which of the six events this is. Always message.answered. |
createdAtstring · required | When the event happened. An RFC 3339 timestamp. |
dataobject · required | The Request, as it ended. |
data.string · required | The Request this event is about. |
data.string · required | The terminal state the Request reached. Always answered. |
data.string · required | The Environment the Message was sent into. One of test, live. |
data.object · required | The person’s answer. |
data.string · required | The Response’s id. |
data.string · required | The action the person chose. |
data.string · required | The id of the component the person answered with, or notification for a quick action on the push. |
data.object or null · required | The values the action sent back, or null when it sent none. |
data.string · required | When the person answered, by the phone’s clock. An RFC 3339 timestamp. |
data.string · required | When the answer reached Nibify. An RFC 3339 timestamp. |
message.expired
A Request reached its expiry unanswered.
Payload
| Field | Description |
|---|---|
idstring · required | The event’s id, the same on every retry of it: deduplicate on it. |
typestring · required | Which of the six events this is. Always message.expired. |
createdAtstring · required | When the event happened. An RFC 3339 timestamp. |
dataobject · required | The Request, as it ended. |
data.string · required | The Request this event is about. |
data.string · required | The terminal state the Request reached. Always expired. |
data.string · required | The Environment the Message was sent into. One of test, live. |
data.null · required | Only an answered Request has a Response. |
message.dismissed
The person declined a Request.
Payload
| Field | Description |
|---|---|
idstring · required | The event’s id, the same on every retry of it: deduplicate on it. |
typestring · required | Which of the six events this is. Always message.dismissed. |
createdAtstring · required | When the event happened. An RFC 3339 timestamp. |
dataobject · required | The Request, as it ended. |
data.string · required | The Request this event is about. |
data.string · required | The terminal state the Request reached. Always dismissed. |
data.string · required | The Environment the Message was sent into. One of test, live. |
data.null · required | Only an answered Request has a Response. |
message.cancelled
The agent cancelled a Request.
Payload
| Field | Description |
|---|---|
idstring · required | The event’s id, the same on every retry of it: deduplicate on it. |
typestring · required | Which of the six events this is. Always message.cancelled. |
createdAtstring · required | When the event happened. An RFC 3339 timestamp. |
dataobject · required | The Request, as it ended. |
data.string · required | The Request this event is about. |
data.string · required | The terminal state the Request reached. Always cancelled. |
data.string · required | The Environment the Message was sent into. One of test, live. |
data.null · required | Only an answered Request has a Response. |