/webhooks/{id}

Use this resource to get defails, update, or delete a webhook.

Secured By: Authentication Token
Description:

Get webhook details.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Body

Format: application/json

Example
{
  "url": "http://youragencysite.com/api/message_events",
  "event_type": "failed",
  "created_at": "2015-04-10T19:12:31Z",
  "_links": {
    "self": "/webhooks/21768"
  }
}
Schema
Object that may include:
Name Type Description
url string

The URL that the webhook will POST to when it executes.

Example

http://youragencysite.com/api/message_events
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).

  • sending: TMS is attempting to send the message to the recipient.
  • sent: TMS has successfully delivered the message to the recipient.
  • blacklisted: The recipient is on the delivery blacklist, thus the message was not delivered to the recipient.
  • canceled: Delivery of this message was canceled, thus the message was not delivered to the recipient.
  • failed: TMS encountered an error while attempting to deliver the message to the recipeint.
  • inconclusive: TMS has attempted to deliver the message to the recipient, but has not received notification of a successful nor failed delivery.

Valid Values:

  • sending
  • sent
  • canceled
  • blacklisted
  • failed
  • inconclusive

Example

sent
created_at string

The date and time when the webhook was created.

Example

2015-04-10T19:12:31Z
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/webhooks/10040"
  }
}
{
  "$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

Format: application/json

Example
{
  "error": "Invalid authentication token"
}
Secured By: Authentication Token
Description:

Update/modify a webhook.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Body

Format: application/json

Example
{
  "url": "http://youragencysite.com/api/message_events",
  "event_type": "failed"
}
Schema
Object that may include:
Name Required Type Description
url * string

The URL that the webhook will POST to when it executes.

Example

http://youragencysite.com/api/message_events
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).

  • sending: TMS is attempting to send the message to the recipient.
  • sent: TMS has successfully delivered the message to the recipient.
  • blacklisted: The recipient is on the delivery blacklist, thus the message was not delivered to the recipient.
  • canceled: Delivery of this message was canceled, thus the message was not delivered to the recipient.
  • failed: TMS encountered an error while attempting to deliver the message to the recipeint.
  • inconclusive: TMS has attempted to deliver the message to the recipient, but has not received notification of a successful nor failed delivery.

Valid Values:

  • sending
  • sent
  • canceled
  • blacklisted
  • failed
  • inconclusive

Example

sent
{
  "$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

http://youragencysite.com/api/message_events
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).

  • sending: TMS is attempting to send the message to the recipient.
  • sent: TMS has successfully delivered the message to the recipient.
  • blacklisted: The recipient is on the delivery blacklist, thus the message was not delivered to the recipient.
  • canceled: Delivery of this message was canceled, thus the message was not delivered to the recipient.
  • failed: TMS encountered an error while attempting to deliver the message to the recipeint.
  • inconclusive: TMS has attempted to deliver the message to the recipient, but has not received notification of a successful nor failed delivery.

Valid Values:

  • sending
  • sent
  • canceled
  • blacklisted
  • failed
  • inconclusive

Example

sent

Status

Description

The updated webhook object

Body

Format: application/json

Example
{
  "url": "http://youragencysite.com/api/message_events",
  "event_type": "failed",
  "created_at": "2015-04-10T19:12:31Z",
  "_links": {
    "self": "/webhooks/21768"
  }
}
Schema
Object that may include:
Name Type Description
url string

The URL that the webhook will POST to when it executes.

Example

http://youragencysite.com/api/message_events
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).

  • sending: TMS is attempting to send the message to the recipient.
  • sent: TMS has successfully delivered the message to the recipient.
  • blacklisted: The recipient is on the delivery blacklist, thus the message was not delivered to the recipient.
  • canceled: Delivery of this message was canceled, thus the message was not delivered to the recipient.
  • failed: TMS encountered an error while attempting to deliver the message to the recipeint.
  • inconclusive: TMS has attempted to deliver the message to the recipient, but has not received notification of a successful nor failed delivery.

Valid Values:

  • sending
  • sent
  • canceled
  • blacklisted
  • failed
  • inconclusive

Example

sent
created_at string

The date and time when the webhook was created.

Example

2015-04-10T19:12:31Z
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/webhooks/10040"
  }
}
{
  "$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

Format: application/json

Example
{
  "error": "Invalid authentication token"
}
Secured By: Authentication Token
Description:

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.

Status

Description

The webhook was successfully deleted.

Body

Format: application/json

Example
{
  "error": "Invalid authentication token"
}