/messages/email/{email_id}

Secured By: Authentication Token
Description:

Use this resource to view details on a message. You can see a rollup of information on recipients at this level, showing you how many recipients are in each state (sent, failed, new, etc.).

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Body

Format: application/json

Example
{
  "from_name": "Weather Bot",
  "subject": "Today's Weather",
  "macros": {
    "city": "DEFAULT Saint Paul",
    "address": "DEFAULT 408 Saint Peter Street",
    "company": "DEFAULT GovDelivery",
    "url": "DEFAULT www.govdelivery.com"
  },
  "body": "Today it is Sunny and 70F at [[address]] [[city]]. Weather brought to you by [[company]] - [[url]]",
  "from_email": "weather@example.com",
  "reply_to": "weather@example.com",
  "errors_to": "weather@example.com",
  "open_tracking_enabled": true,
  "click_tracking_enabled": true,
  "created_at": "2014-05-30T12:54:46Z",
  "message_type_code": "salutations",
  "completed_at": "2014-05-30T12:54:51Z",
  "status": "completed",
  "_links": {
    "self": "/messages/email/10040",
    "email_template": "27",
    "recipients": "/messages/email/10040/recipients",
    "clicked": "/messages/email/10040/recipients/clicked",
    "opened": "/messages/email/10040/recipients/opened"
  },
  "recipient_counts": {
    "total": 2,
    "new": 0,
    "sending": 0,
    "sent": 2,
    "failed": 0,
    "blacklisted": 0,
    "canceled": 0
  }
}
Schema
Object that may include:
Name Type Description
from_name string

Display name of the sender

Example

Weather Bot
from_email string

Email address of the sender. Must be an email address authorized to send from your account.

Example

weather@example.com
reply_to string

Address to set reply-to email header to

Example

replies@example.com
errors_to string

Address to set the errors-to email header to

Example

errors@example.com
subject string

Subject line of the email

Example

Today's Weather
macros object

List of valid for the message, including their default values that will be used if the macros are missing for any recipients

Example

{
  "city": "DEFAULT Saint Paul",
  "address": "DEFAULT 408 Saint Peter Street",
  "company": "DEFAULT GovDelivery",
  "url": "DEFAULT www.govdelivery.com"
}
body string

Body of the email

Example

Today is Sunny and 70F.
click_tracking_enabled boolean

Enable or disable click tracking for an email message, defaults to true

Default Value: true

open_tracking_enabled boolean

Enable or disable open tracking for an email message, defaults to true

Default Value: true

message_type_code string

The code of the message_type

Example

salutations
created_at string

The date and time when the message was created.

Example

2013-01-30T17:45:27Z
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/messages/email/10040"
  },
  "email_template": {
    "description": "UID of the email template used while sending the email",
    "type": "string",
    "example": "new_template-1"
  },
  "recipients": {
    "description": "Relative URI to the list of recipients of the message",
    "type": "string",
    "example": "/messages/email/10040/recipients"
  },
  "clicked": {
    "description": "Relative URI to the list of emails with a clicked link",
    "type": "string",
    "example": "/messages/email/10040/recipients/clicked"
  },
  "opened": {
    "description": "Relative URI to the list of emails that have been opened",
    "type": "string",
    "example": "/messages/email/10040/recipients/opened"
  }
}
status string

new - message has been created

queued - message has been queued for sending

sending - message has begun sending

completed - all recipients have positive confirmation or have expired

Valid Values:

  • new
  • queued
  • sending
  • completed

Example

completed
recipient_counts object

Rollup of the recipient states to give you at-a-glance metrics on the message.

Example

{
  "total": 2,
  "new": 0,
  "sending": 0,
  "sent": 2,
  "failed": 0,
  "blacklisted": 0,
  "canceled": 0
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Email Message",
  "description": "Details of a single email message.",
  "type": "object",
  "properties": {
    "from_name": {
      "description": "Display name of the sender",
      "type": "string",
      "example": "Weather Bot"
    },
    "from_email": {
      "description": "Email address of the sender. Must be an email address authorized\nto send from your account.\n",
      "type": "string",
      "example": "weather@example.com"
    },
    "reply_to": {
      "description": "Address to set reply-to email header to",
      "type": "string",
      "example": "replies@example.com"
    },
    "errors_to": {
      "description": "Address to set the errors-to email header to",
      "type": "string",
      "example": "errors@example.com"
    },
    "subject": {
      "description": "Subject line of the email",
      "type": "string",
      "example": "Today's Weather"
    },
    "macros": {
      "description": "List of  valid for the message, including their default values that will be used if the macros are missing for any recipients",
      "type": "object",
      "example": "{\n\"city\": \"DEFAULT Saint Paul\",\n\"address\": \"DEFAULT 408 Saint Peter Street\",\n\"company\": \"DEFAULT GovDelivery\",\n\"url\": \"DEFAULT www.govdelivery.com\"\n}"
    },
    "body": {
      "description": "Body of the email",
      "type": "string",
      "example": "Today is Sunny and 70F."
    },
    "click_tracking_enabled": {
      "description": "Enable or disable click tracking for an email message, defaults to true",
      "type": "boolean",
      "default": true
    },
    "open_tracking_enabled": {
      "description": "Enable or disable open tracking for an email message, defaults to true",
      "type": "boolean",
      "default": true
    },
    "message_type_code": {
      "description": "The code of the message_type",
      "type": "string",
      "example": "salutations"
    },
    "created_at": {
      "description": "The date and time when the message was created.",
      "type": "string",
      "example": "2013-01-30T17:45:27Z"
    },
    "_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": "/messages/email/10040"
        },
        "email_template": {
          "description": "UID of the email template used while sending the email",
          "type": "string",
          "example": "new_template-1"
        },
        "recipients": {
          "description": "Relative URI to the list of recipients of the message",
          "type": "string",
          "example": "/messages/email/10040/recipients"
        },
        "clicked": {
          "description": "Relative URI to the list of emails with a clicked link",
          "type": "string",
          "example": "/messages/email/10040/recipients/clicked"
        },
        "opened": {
          "description": "Relative URI to the list of emails that have been opened",
          "type": "string",
          "example": "/messages/email/10040/recipients/opened"
        }
      }
    },
    "status": {
      "description": "new - message has been created\n\nqueued - message has been queued for sending\n\nsending - message has begun sending\n\ncompleted - all recipients have positive confirmation or have expired",
      "type": "string",
      "enum": [
        "new",
        "queued",
        "sending",
        "completed"
      ],
      "example": "completed"
    },
    "recipient_counts": {
      "description": "Rollup of the recipient states to give you at-a-glance metrics on the message.",
      "type": "object",
      "example": "{\n\"total\": 2,\n\"new\": 0,\n\"sending\": 0,\n\"sent\": 2,\n\"failed\": 0,\n\"blacklisted\":0,\n\"canceled\":0\n}"
    }
  }
}

Body

Format: application/json

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