/message_types/{id}

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

Secured By: Authentication Token
Description:

Get message_type details.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Body

Format: application/json

Example
{
  "code": "salutations",
  "label": "Greetings and Salutations",
  "_links": {
    "self": "/message_type/21768"
  }
}
Schema
Object that may include:
Name Type Description
code string

The unique identifier

Example

salutations
label string

Human readable description.

Example

Greetings and Salutations
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/message_types/10040"
  }
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Message_Type",
  "type": "object",
  "properties": {
    "code": {
      "description": "The unique identifier",
      "type": "string",
      "example": "salutations"
    },
    "label": {
      "description": "Human readable description.",
      "type": "string",
      "example": "Greetings and Salutations"
    },
    "_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": "/message_types/10040"
        }
      }
    }
  }
}

Body

Format: application/json

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

Update/modify a label for a Message Type. The code can not be changed.

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Body

Format: application/json

Example
{
  "code": "salutations",
  "label": "Greetings and Salutations"
}
Schema
Object that may include:
Name Required Type Description
code * string

The unique identifier

Example

salutations
label * string

Human readable description

Example

Greetings and Salutations
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "/message_types/{id}",
  "description": "Update/modify a label for a Message Type. The code can not be changed.",
  "type": "object",
  "properties": {
    "code": {
      "description": "The unique identifier\n",
      "type": "string",
      "example": "salutations"
    },
    "label": {
      "description": "Human readable description\n",
      "type": "string",
      "example": "Greetings and Salutations"
    }
  },
  "required": [
    "code",
    "label"
  ]
}
Form Parameters
Name Required Type Description
code * string

The unique identifier

Example

salutations
label * string

Human readable description

Example

Greetings and Salutations

Status

Description

The updated Message Type object

Body

Format: application/json

Example
{
  "code": "salutations",
  "label": "Greetings and Salutations",
  "_links": {
    "self": "/message_type/21768"
  }
}
Schema
Object that may include:
Name Type Description
code string

The unique identifier

Example

salutations
label string

Human readable description.

Example

Greetings and Salutations
_links object

An object that defines links to related objects.

Properties

{
  "self": {
    "description": "Relative URI of the object",
    "type": "string",
    "example": "/message_types/10040"
  }
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Message_Type",
  "type": "object",
  "properties": {
    "code": {
      "description": "The unique identifier",
      "type": "string",
      "example": "salutations"
    },
    "label": {
      "description": "Human readable description.",
      "type": "string",
      "example": "Greetings and Salutations"
    },
    "_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": "/message_types/10040"
        }
      }
    }
  }
}

Body

Format: application/json

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

Delete a message_type. Message Types can only be deleted if they are not yet associated with any sent messages

Headers

Name Required Type Description
X-AUTH-TOKEN * string

An authentication token provided to you by GovDelivery.

Status

Description

The Message Type was successfully deleted.

Description

An Email Message was created with this Message Type so it can not be deleted.

Body

Format: application/json

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