Get my direct message topics

Get direct message topics from users you have already sent direct messages to. Response JSON includes the partner account and online status data in “directMessage” property.

If you only want online status from direct message topics, see Get online status.

Method

GET

URL

https://typetalk.com/api/v1/messages

Scope

my

Response Example

{
  "topics": [
    {
      "topic": {
        "id": 214,
        "name": "jessica,stefhull",
        "description": "",
        "suggestion": "jessica,stefhull",
        "isDirectMessage": true,
        "lastPostedAt": "2014-06-12T04:32:29Z",
        "createdAt": "2014-06-12T03:32:29Z",
        "updatedAt": "2014-06-12T03:32:29Z"
      },
      "unread": {
        "topicId": 214,
        "postId": 0,
        "count": 0
      },
      "directMessage": {
        "account": {
          "id": 103,
          "name": "stefhull",
          "fullName": "StefHull",
          "suggestion": "StefHull",
          "imageUrl": "https://typetalk.com/accounts/103/profile_image.png?t=1403836349000",
          "isBot": false,
          "createdAt": "2014-06-27T02:32:29Z",
          "updatedAt": "2014-06-27T02:32:29Z"
        },
        "status": {
          "presence": "away",
          "web": null,
          "mobile": null
        }
      }
    },
    {
      "topic": {
        "id": 215,
        "name": "jessica,cooper",
        "description": "",
        "suggestion": "jessica,cooper",
        "isDirectMessage": true,
        "lastPostedAt": "2014-06-12T04:32:29Z",
        "createdAt": "2014-06-12T03:32:29Z",
        "updatedAt": "2014-06-12T03:32:29Z"
      },
      "unread": {
        "topicId": 215,
        "postId": 0,
        "count": 0
      },
      "directMessage": {
        "account": {
          "id": 104,
          "name": "cooper",
          "fullName": "CooperDaChopper",
          "suggestion": "CooperDaChopper",
          "imageUrl": "https://typetalk.com/accounts/104/profile_image.png?t=1403922749000",
          "isBot": false,
          "createdAt": "2014-06-28T02:32:29Z",
          "updatedAt": "2014-06-28T02:32:29Z"
        },
        "status": {
          "presence": "away",
          "web": null,
          "mobile": null
        }
      }
    },
    {
      "topic": {
        "id": 213,
        "name": "jessica,moss",
        "description": "",
        "suggestion": "jessica,moss",
        "isDirectMessage": true,
        "lastPostedAt": "2014-06-12T04:32:29Z",
        "createdAt": "2014-06-12T03:32:29Z",
        "updatedAt": "2014-06-12T03:32:29Z"
      },
      "unread": {
        "topicId": 213,
        "postId": 0,
        "count": 0
      },
      "directMessage": {
        "account": {
          "id": 102,
          "name": "moss",
          "fullName": "Moss",
          "suggestion": "Moss",
          "imageUrl": "https://typetalk.com/accounts/102/profile_image.png?t=1403749949000",
          "isBot": false,
          "createdAt": "2014-06-26T02:32:29Z",
          "updatedAt": "2014-06-26T02:32:29Z"
        },
        "status": {
          "presence": "away",
          "web": null,
          "mobile": null
        }
      }
    },
    {
      "topic": {
        "id": 216,
        "name": "jessica,brad",
        "description": "",
        "suggestion": "jessica,brad",
        "isDirectMessage": true,
        "lastPostedAt": "2014-06-12T04:32:29Z",
        "createdAt": "2014-06-12T03:32:29Z",
        "updatedAt": "2014-06-12T03:32:29Z"
      },
      "unread": {
        "topicId": 216,
        "postId": 0,
        "count": 0
      },
      "directMessage": {
        "account": {
          "id": 105,
          "name": "brad",
          "fullName": "BradMarshalls",
          "suggestion": "BradMarshalls",
          "imageUrl": "https://typetalk.com/accounts/105/profile_image.png?t=1404009149000",
          "isBot": false,
          "createdAt": "2014-06-29T02:32:29Z",
          "updatedAt": "2014-06-29T02:32:29Z"
        },
        "status": {
          "presence": "away",
          "web": null,
          "mobile": null
        }
      }
    },
    {
      "topic": {
        "id": 217,
        "name": "jessica,chelseab",
        "description": "",
        "suggestion": "jessica,chelseab",
        "isDirectMessage": true,
        "lastPostedAt": "2014-06-12T04:32:29Z",
        "createdAt": "2014-06-12T03:32:29Z",
        "updatedAt": "2014-06-12T03:32:29Z"
      },
      "unread": {
        "topicId": 217,
        "postId": 0,
        "count": 0
      },
      "directMessage": {
        "account": {
          "id": 106,
          "name": "chelseab",
          "fullName": "ChelseaB",
          "suggestion": "ChelseaB",
          "imageUrl": "https://typetalk.com/accounts/106/profile_image.png?t=1404095549000",
          "isBot": false,
          "createdAt": "2014-06-30T02:32:29Z",
          "updatedAt": "2014-06-30T02:32:29Z"
        },
        "status": {
          "presence": "away",
          "web": null,
          "mobile": null
        }
      }
    }
  ]
}

All responses are text formatted as JSON, and include ETag. If you call an API with If-None-Match header, the server returns a 304 status code when the data is not changed. The date and time format is ISO 8601 and timezone is UTC (eg. 2014-01-09T06:20:08Z).