email history

List email histories

Changed on

Get a list of email histories

get/email_history

Request

  • Base URL
    https://api.twinehealth.com/pub
  • Auth
    none declared

Query parameters

filter[receiver]string

Fitbit Plus user id of email recipient. Required if filter[sender] is not defined.

filter[sender]string

Fitbit Plus user id of email sender. Required if filter[receiver] is not defined.

filter[emailType]string

Type of email

sort'send_time' | '-send_time'

valid sorts:

  • send_time - ascending by send_time
  • -send_time - descending by send_time

Response

OK

Example response

{
  "data": [
    {
      "type": "email_history",
      "id": "595fddec28c5041b84467592",
      "attributes": {
        "created_at": "2017-07-07T19:15:56.229Z",
        "created_by": "595fd88ef4be5b1a797ff19b",
        "email_address": "tony@example.com",
        "email_type": "invite",
        "send_time": "2017-02-25T13:35:01.000Z",
        "status_times": {
          "delivered": "2017-02-25T13:35:03.000Z",
          "open": "2017-02-25T14:20:00.000Z",
          "processed": "2017-02-25T13:35:02.000Z"
        },
        "twine_email_id": "576226e5-7e25-4469-b10d-2bc6a725bfbc",
        "updated_at": "2017-07-07T19:15:56.229Z",
        "updated_by": "595fd88ef4be5b1a797ff19b"
      },
      "relationships": {
        "receiver": {
          "data": {
            "id": "595fddea28c5041b84466bbe",
            "type": "patient"
          },
          "links": {
            "related": "/pub/email_history/595fddec28c5041b84467592/receiver"
          }
        },
        "sender": {
          "links": {
            "related": "/pub/email_history/595fddec28c5041b84467592/sender"
          }
        }
      },
      "links": {
        "self": "/pub/email_history/595fddec28c5041b84467592"
      }
    }
  ]
}

Changes