Attributes

code
Example: returned_mail

The type of event that triggered this webhook. This code is intended for use by your app and should generally not be displayed to users.

The following codes are currently in use:

  • unspecified: The address was updated without a reason being provided. The accompanying message will typically be blank, but may contain a message, and should be displayed to the end user if present.

  • api_client: The address was updated by an API client.

  • returned_mail: A letter was returned to us. It may include a forwarding address.

In order to allow the list of codes to expand over time, your application MUST treat any unrecognized code as unspecified.

contact_id
Example: c-###-####

The contact ID used by prayerletters.com

external_id

The contact ID supplied by your integration (or whichever integration created the contact).

message
Example: Letter Returned -- Undeliverable As Addressed

A single line of free-form text providing more detail about the event and new address. This is intended to be displayed to users to provide information about why the event was triggered. It is often a custom message typed by one of our employees and should not be parsed by your app.

name
Example: Joe and Mary Tischler

The contact's full name, as it should appear on the first line of an envelope.

new_address
city
Example: Lebanon
country
is_deliverable

Whether or not we consider the address to be valid for receiving mail.

postal_code
Example: 03766
state
Example: NH
street
Example: 123 Main St.

The updated address record.

Use the is_deliverable field to determine whether or not the new address is valid. For example, if we receive a move-update notice saying that a PO Box was closed and no new address was provided, is_deliverable will be false.

old_address
city
Example: Lebanon
country
is_deliverable

Whether or not we consider the address to be valid for receiving mail.

postal_code
Example: 03766
state
Example: NH
street
Example: 123 Main St.

The address record as it existed prior to the change.

Note that the is_deliverable field does not indicate whether the old address was deliverable, but rather whether it was considered to be deliverable before the event that triggered this webhook.

For example, if we receive a returned letter without a forwarding address, we will send an address update event with the same old and new address. In this case, is_deliverable will be true in old_address and false in new_address.

updated
Example: 2024-05-03T20:32:45-04:00

When the event was triggered. You should check to ensure that the user hasn't changed the address in your app between when the event was created and when the webhook arrived at your app, in case of delayed messages.

Example Object

{
   "code" : "returned_mail",
   "contact_id" : "c-###-####",
   "external_id" : "...",
   "message" : "Letter Returned -- Undeliverable As Addressed",
   "name" : "Joe and Mary Tischler",
   "new_address" : {
      "city" : "Lebanon",
      "country" : "",
      "is_deliverable" : false,
      "postal_code" : "03766",
      "state" : "NH",
      "street" : "123 Main St."
   },
   "old_address" : {
      "city" : "Lebanon",
      "country" : "",
      "is_deliverable" : true,
      "postal_code" : "03766",
      "state" : "NH",
      "street" : "123 Main St."
   },
   "updated" : "2024-05-03T20:32:45-04:00"
}