Contents

Get messages by tag

Get all messages attached to a particular tag.

Method

GET

URL

https://typetalk.com/api/v1/topics/:topicId/talks/:talkId/posts

Scope

topic.read

URL parameters

NameTypeDescription
topicIdNumberTopic ID
talkIdNumberTag ID

Query parameters

NameTypeDescription
count (Optional)Numberdefault value: 20, maximum: 200
from (Optional)Numberreferences Post ID
direction (Optional)String”backward” or “forward”

Response Example

{
  "mySpace": {
    "space": {
      "key": "abcdefghij",
      "name": "Joe Tech Inc.",
      "enabled": true,
      "imageUrl": "https://apps.nulab.com/spaces/abcdefghij/photo/large"
    },
    "myRole": "ADMIN",
    "isPaymentAdmin": true,
    "myPlan": {
      "plan": {
        "key": "typetalk.free",
        "name": "Free Plan",
        "limitNumberOfUsers": 10,
        "limitTotalAttachmentSize": 1073741824
      },
      "enabled": true,
      "trial": null,
      "numberOfUsers": 6,
      "totalAttachmentSize": 0,
      "createdAt": "2016-01-10T02:32:29Z",
      "updatedAt": "2016-12-21T10:12:18Z"
    }
  },
  "topic": {
    "id": 208,
    "name": "IT Peeps",
    "description": "",
    "suggestion": "IT Peeps",
    "isDirectMessage": false,
    "lastPostedAt": "2016-12-21T10:12:02Z",
    "createdAt": "2014-06-10T02:32:29Z",
    "updatedAt": "2014-06-10T02:32:29Z"
  },
  "directMessage": null,
  "talk": {
    "id": 900,
    "topicId": 208,
    "name": "About us",
    "suggestion": "About us",
    "createdAt": "2014-07-02T03:42:29Z",
    "updatedAt": "2014-07-02T03:52:29Z",
    "backlog": null
  },
  "posts": [
    {
      "id": 305,
      "topicId": 208,
      "replyTo": null,
      "message": "And I'm a 32 year old IT-man who works in a basement. Word.",
      "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"
      },
      "mention": null,
      "attachments": [],
      "likes": [],
      "talks": [
        {
          "id": 901,
          "topicId": 208,
          "name": "2nd talk",
          "suggestion": "2nd talk",
          "createdAt": "2014-07-02T03:52:29Z",
          "updatedAt": "2014-07-02T03:55:29Z",
          "backlog": null
        },
        {
          "id": 900,
          "topicId": 208,
          "name": "About us",
          "suggestion": "About us",
          "createdAt": "2014-07-02T03:42:29Z",
          "updatedAt": "2014-07-02T03:52:29Z",
          "backlog": null
        }
      ],
      "links": [],
      "createdAt": "2014-06-30T14:32:29Z",
      "updatedAt": "2014-06-30T14:32:29Z"
    },
    {
      "id": 306,
      "topicId": 208,
      "replyTo": 305,
      "message": "Oh. What time of the month? The weekend?",
      "account": {
        "id": 100,
        "name": "jessica",
        "fullName": "Jessica Fitzherbert",
        "suggestion": "Jessica Fitzherbert",
        "imageUrl": "https://typetalk.com/accounts/100/profile_image.png?t=1403577149000",
        "isBot": false,
        "createdAt": "2014-06-24T02:32:29Z",
        "updatedAt": "2014-06-24T02:32:29Z"
      },
      "mention": null,
      "attachments": [],
      "likes": [
        {
          "id": 403,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "account": {
            "id": 101,
            "name": "ahorowitz",
            "fullName": "AHorowitz",
            "suggestion": "AHorowitz",
            "imageUrl": "https://typetalk.com/accounts/101/profile_image.png?t=1403663549000",
            "isBot": false,
            "createdAt": "2014-06-25T02:32:29Z",
            "updatedAt": "2014-06-25T02:32:29Z"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 404,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "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"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 405,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "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"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 406,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "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"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        },
        {
          "id": 407,
          "postId": 306,
          "topicId": 208,
          "comment": null,
          "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"
          },
          "createdAt": "2016-12-21T01:11:42Z"
        }
      ],
      "talks": [
        {
          "id": 900,
          "topicId": 208,
          "name": "About us",
          "suggestion": "About us",
          "createdAt": "2014-07-02T03:42:29Z",
          "updatedAt": "2014-07-02T03:52:29Z",
          "backlog": null
        }
      ],
      "links": [],
      "createdAt": "2014-07-01T01:32:29Z",
      "updatedAt": "2014-07-01T01:32:29Z"
    }
  ],
  "hasNext": false
}

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