/messages/sms/{sms_id}

Secured By: Authentication Token
Description:

Get SMS message by ID

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Body

Format: application/json

Example
{
  "body": "Today is Sunny and 70F",
  "created_at": "2014-10-07T17:27:12Z",
  "completed_at": "2014-10-07T17:27:15Z",
  "status": "completed",
  "_links": {
    "self": "/messages/sms/165532",
    "recipients": "/messages/sms/165532/recipients",
    "failed": "/messages/sms/165532/recipients/failed",
    "sent": "/messages/sms/165532/recipients/sent"
  },
  "recipient_counts": {
    "total": 2,
    "new": 0,
    "sending": 0,
    "inconclusive": 0,
    "blacklisted": 0,
    "canceled": 0,
    "sent": 2,
    "failed": 0
  }
}
Schema
Object that may include:
Name Type Description
body string

The message body

Example

Today is Sunny and 70F.
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/sms/10040"
  },
  "recipients": {
    "description": "Relative URI to the list of recipients of the message",
    "type": "string",
    "example": "/messages/sms/10040/recipients"
  },
  "failed": {
    "description": "Relative URI to the list of recipients that have failed to receive the message",
    "type": "string",
    "example": "/messages/sms/10040/recipients/failed"
  },
  "sent": {
    "description": "Relative URI to the list of recipients that have been successfully received the message",
    "type": "string",
    "example": "/messages/sms/10040/recipients/sent"
  }
}
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
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "SMS Message",
  "type": "object",
  "properties": {
    "body": {
      "description": "The message body",
      "type": "string",
      "example": "Today is Sunny and 70F."
    },
    "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/sms/10040"
        },
        "recipients": {
          "description": "Relative URI to the list of recipients of the message",
          "type": "string",
          "example": "/messages/sms/10040/recipients"
        },
        "failed": {
          "description": "Relative URI to the list of recipients that have failed to receive the message",
          "type": "string",
          "example": "/messages/sms/10040/recipients/failed"
        },
        "sent": {
          "description": "Relative URI to the list of recipients that have been successfully received the message",
          "type": "string",
          "example": "/messages/sms/10040/recipients/sent"
        }
      }
    },
    "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"
    }
  }
}

Body

Format: application/json

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