/webhooks/{id}
Use this resource to get defails, update, or delete a webhook.
Get webhook details.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Body
Example
{
"url": "http://youragencysite.com/api/message_events",
"event_type": "failed",
"created_at": "2015-04-10T19:12:31Z",
"_links": {
"self": "/webhooks/21768"
}
}
Schema
Name | Type | Description |
---|---|---|
url | string |
The URL that the webhook will POST to when it executes. Example
|
event_type | string |
The type of message delivery event the webhook will execute on. Each event represents the state that a specific recipient has entered (e.g. the ‘failed’ event_type indicates that the recipient has entered the ‘failed’ state).
Valid Values:
Example
|
created_at | string |
The date and time when the webhook was created. Example
|
_links | object |
An object that defines links to related objects. Properties
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Webhook",
"type": "object",
"properties": {
"url": {
"description": "The URL that the webhook will POST to when it executes.\n",
"type": "string",
"example": "http://youragencysite.com/api/message_events"
},
"event_type": {
"description": "The type of message delivery event the webhook will execute on.\nEach event represents the state that a specific recipient has \nentered (e.g. the 'failed' event_type indicates that the recipient\nhas entered the 'failed' state).\n\n- sending: TMS is attempting to send the message to the recipient.\n- sent: TMS has successfully delivered the message to the recipient.\n- blacklisted: The recipient is on the delivery blacklist, thus the \n message was not delivered to the recipient.\n- canceled: Delivery of this message was canceled, thus the message\n was not delivered to the recipient.\n- failed: TMS encountered an error while attempting to deliver the\n message to the recipeint.\n- inconclusive: TMS has attempted to deliver the message to the\n recipient, but has not received notification of a successful \n nor failed delivery.\n",
"type": "string",
"enum": [
"sending",
"sent",
"canceled",
"blacklisted",
"failed",
"inconclusive"
],
"example": "sent"
},
"created_at": {
"description": "The date and time when the webhook was created.",
"type": "string",
"example": "2015-04-10T19:12:31Z"
},
"_links": {
"title": "Relational Links",
"description": "An object that defines links to related objects.",
"type": "object",
"properties": {
"self": {
"description": "Relative URI of the object",
"type": "string",
"example": "/webhooks/10040"
}
}
}
}
}
Body
Example
{
"error": "Invalid authentication token"
}
Update/modify a webhook.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Body
Example
{
"url": "http://youragencysite.com/api/message_events",
"event_type": "failed"
}
Schema
Name | Required | Type | Description |
---|---|---|---|
url | * | string |
The URL that the webhook will POST to when it executes. Example
|
event_type | * | string |
The type of message delivery event the webhook will execute on. Each event represents the state that a specific recipient has entered (e.g. the ‘failed’ event_type indicates that the recipient has entered the ‘failed’ state).
Valid Values:
Example
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "/webhooks/{id}",
"description": "Update/modify a webhook.",
"type": "object",
"properties": {
"url": {
"description": "The URL that the webhook will POST to when it executes.\n",
"type": "string",
"example": "http://youragencysite.com/api/message_events"
},
"event_type": {
"description": "The type of message delivery event the webhook will execute on.\nEach event represents the state that a specific recipient has \nentered (e.g. the 'failed' event_type indicates that the recipient\nhas entered the 'failed' state).\n\n- sending: TMS is attempting to send the message to the recipient.\n- sent: TMS has successfully delivered the message to the recipient.\n- blacklisted: The recipient is on the delivery blacklist, thus the \n message was not delivered to the recipient.\n- canceled: Delivery of this message was canceled, thus the message\n was not delivered to the recipient.\n- failed: TMS encountered an error while attempting to deliver the\n message to the recipeint.\n- inconclusive: TMS has attempted to deliver the message to the\n recipient, but has not received notification of a successful \n nor failed delivery.\n",
"type": "string",
"enum": [
"sending",
"sent",
"canceled",
"blacklisted",
"failed",
"inconclusive"
],
"example": "sent"
}
},
"required": [
"url",
"event_type"
]
}
Form Parameters
Name | Required | Type | Description |
---|---|---|---|
url | * | string |
The URL that the webhook will POST to when it executes. Example
|
event_type | * | string |
The type of message delivery event the webhook will execute on. Each event represents the state that a specific recipient has entered (e.g. the ‘failed’ event_type indicates that the recipient has entered the ‘failed’ state).
Valid Values:
Example
|
Description
The updated webhook object
Body
Example
{
"url": "http://youragencysite.com/api/message_events",
"event_type": "failed",
"created_at": "2015-04-10T19:12:31Z",
"_links": {
"self": "/webhooks/21768"
}
}
Schema
Name | Type | Description |
---|---|---|
url | string |
The URL that the webhook will POST to when it executes. Example
|
event_type | string |
The type of message delivery event the webhook will execute on. Each event represents the state that a specific recipient has entered (e.g. the ‘failed’ event_type indicates that the recipient has entered the ‘failed’ state).
Valid Values:
Example
|
created_at | string |
The date and time when the webhook was created. Example
|
_links | object |
An object that defines links to related objects. Properties
|
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Webhook",
"type": "object",
"properties": {
"url": {
"description": "The URL that the webhook will POST to when it executes.\n",
"type": "string",
"example": "http://youragencysite.com/api/message_events"
},
"event_type": {
"description": "The type of message delivery event the webhook will execute on.\nEach event represents the state that a specific recipient has \nentered (e.g. the 'failed' event_type indicates that the recipient\nhas entered the 'failed' state).\n\n- sending: TMS is attempting to send the message to the recipient.\n- sent: TMS has successfully delivered the message to the recipient.\n- blacklisted: The recipient is on the delivery blacklist, thus the \n message was not delivered to the recipient.\n- canceled: Delivery of this message was canceled, thus the message\n was not delivered to the recipient.\n- failed: TMS encountered an error while attempting to deliver the\n message to the recipeint.\n- inconclusive: TMS has attempted to deliver the message to the\n recipient, but has not received notification of a successful \n nor failed delivery.\n",
"type": "string",
"enum": [
"sending",
"sent",
"canceled",
"blacklisted",
"failed",
"inconclusive"
],
"example": "sent"
},
"created_at": {
"description": "The date and time when the webhook was created.",
"type": "string",
"example": "2015-04-10T19:12:31Z"
},
"_links": {
"title": "Relational Links",
"description": "An object that defines links to related objects.",
"type": "object",
"properties": {
"self": {
"description": "Relative URI of the object",
"type": "string",
"example": "/webhooks/10040"
}
}
}
}
}
Body
Example
{
"error": "Invalid authentication token"
}
Delete a webhook. Deleted webhooks will no longer be executed by TMS.
Headers
Name | Required | Type | Description |
---|---|---|---|
X-AUTH-TOKEN | * | string |
An authentication token provided to you by GovDelivery. |
Description
The webhook was successfully deleted.
Body
Example
{
"error": "Invalid authentication token"
}