/messages/voice/{voice_id}

Secured By: Authentication Token
Description:

Get Voice 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
{
  "play_url": "http://www.example.com/media/hello.wav",
  "recipient_detail_counts": {
    "busy": 0,
    "no_answer": 0,
    "human": 0,
    "machine": 1
  },
  "from_number": "+15551234567",
  "created_at": "2014-10-07T17:27:12Z",
  "completed_at": "2014-10-07T17:32:51Z",
  "status": "completed",
  "_links": {
    "self": "/messages/voice/153",
    "recipients": "/messages/voice/153/recipients",
    "failed": "/messages/voice/153/recipients/failed",
    "sent": "/messages/voice/153/recipients/sent",
    "human": "/messages/voice/15282/recipients/human",
    "machine": "/messages/voice/15282/recipients/machine",
    "busy": "/messages/voice/15282/recipients/busy",
    "no_answer": "/messages/voice/15282/recipients/no_answer",
    "could_not_connect": "/messages/voice/15282/recipients/could_not_connect"
  },
  "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
play_url string

Audio file to play when the recipient receives the voice message. Must be present if say_text is not present.

Example

https://ia902508.us.archive.org/5/items/testmp3testfile/mpthreetest.mp3
say_text string

Text to synthesize and speak when the recipient receives the voice message. Must be present if play_url is not present.

Example

Hello, this is a test of sending a voice message. Good bye.
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/voice/10040"
  },
  "recipients": {
    "description": "Relative URI to the list of recipients of the message",
    "type": "string",
    "example": "/messages/voice/10040/recipients"
  },
  "failed": {
    "description": "Relative URI to the list of recipients that have failed to receive the message",
    "type": "string",
    "example": "/messages/voice/10040/recipients/failed"
  },
  "sent": {
    "description": "Relative URI to the list of recipients that have been successfully received the message",
    "type": "string",
    "example": "/messages/voice/10040/recipients/sent"
  },
  "human": {
    "type": "string",
    "example": "/messages/voice/10040/recipients/human"
  },
  "machine": {
    "type": "string",
    "example": "/messages/voice/10040/recipients/machine"
  },
  "busy": {
    "type": "string",
    "example": "/messages/voice/10040/recipients/busy"
  },
  "no_answer": {
    "type": "string",
    "example": "/messages/voice/10040/recipients/no_answer"
  },
  "could_not_connect": {
    "type": "string",
    "example": "/messages/voice/10040/recipients/could_not_connect"
  }
}
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_detail_counts object

Example

{
  "busy": 0,
  "no_answer": 0,
  "human": 0,
  "machine": 1
}
from_number string

Example

+15551234567
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Voice Message",
  "type": "object",
  "properties": {
    "play_url": {
      "description": "Audio file to play when the recipient receives the voice message. Must be present if say_text is not present.",
      "type": "string",
      "example": "https://ia902508.us.archive.org/5/items/testmp3testfile/mpthreetest.mp3"
    },
    "say_text": {
      "description": "Text to synthesize and speak when the recipient receives the voice message. Must be present if play_url is not present.",
      "type": "string",
      "example": "Hello, this is a test of sending a voice message. Good bye."
    },
    "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/voice/10040"
        },
        "recipients": {
          "description": "Relative URI to the list of recipients of the message",
          "type": "string",
          "example": "/messages/voice/10040/recipients"
        },
        "failed": {
          "description": "Relative URI to the list of recipients that have failed to receive the message",
          "type": "string",
          "example": "/messages/voice/10040/recipients/failed"
        },
        "sent": {
          "description": "Relative URI to the list of recipients that have been successfully received the message",
          "type": "string",
          "example": "/messages/voice/10040/recipients/sent"
        },
        "human": {
          "type": "string",
          "example": "/messages/voice/10040/recipients/human"
        },
        "machine": {
          "type": "string",
          "example": "/messages/voice/10040/recipients/machine"
        },
        "busy": {
          "type": "string",
          "example": "/messages/voice/10040/recipients/busy"
        },
        "no_answer": {
          "type": "string",
          "example": "/messages/voice/10040/recipients/no_answer"
        },
        "could_not_connect": {
          "type": "string",
          "example": "/messages/voice/10040/recipients/could_not_connect"
        }
      }
    },
    "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_detail_counts": {
      "type": "object",
      "example": "{\n\"busy\": 0,\n\"no_answer\": 0,\n\"human\": 0,\n\"machine\":1}"
    },
    "from_number": {
      "type": "string",
      "example": "+15551234567"
    }
  }
}

Body

Format: application/json

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