Contents

Get all topic messages

Get all messages in a topic.

Method

GET

URL

https://typetalk.com/api/v1/topics/:topicId

Scope

topic.read

URL parameters

NameTypeDescription
topicIdNumberTopic ID

Query parameters

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

Response Example

{
    "bookmark": {
        "postId": 167964,
        "updatedAt": "2018-11-06T09:31:30Z"
    },
    "exceedsAttachmentLimit": false,
    "postContentsSettings": {
        "collapsedAccountIds": []
    },
    "myTopic": null,
    "topic": {
        "createdAt": "2017-11-13T22:27:21Z",
        "lastPostedAt": "2018-11-06T07:56:42Z",
        "isArchived": false,
        "suggestion": "Coffee shop",
        "name": "Coffee shop",
        "description": "A topic for getting off-topic",
        "isDirectMessage": false,
        "id": 4829,
        "updatedAt": "2017-12-21T02:41:00Z"
    },
    "onboarding": null,
    "hasNext": false,
    "team": null,
    "mySpace": {
        "space": {
            "key": "XXXXXX",
            "name": "Awesome Tech Inc.",
            "enabled": true,
            "imageUrl": "https://apps.nulab.com/spaces/XXXXXX/photo/large"
        },
        "myRole": "ADMIN",
        "isPaymentAdmin": true,
        "invitableRoles": [
            "ADMIN",
            "USER",
            "GUEST"
        ],
        "myPlan": {
            "plan": {
                "key": "typetalk.standard10",
                "name": "Standard 10 Users",
                "limitNumberOfUsers": 10,
                "limitNumberOfAllowedAddresses": 10,
                "limitTotalAttachmentSize": 107374182400
            },
            "enabled": true,
            "trial": null,
            "numberOfUsers": 4,
            "numberOfAllowedAddresses": 0,
            "totalAttachmentSize": 14356,
            "createdAt": "2016-01-27T09:37:27Z",
            "updatedAt": "2019-09-02T06:05:56Z"
        }
    },
    "favorite": true,
    "posts": [
        {
            "attachments": [],
            "quotedPosts": [],
            "message": "In case you hadn't realized https://media.giphy.com/media/3oEjHKjVoNVsCeMoDe/giphy.gif",
            "mention": null,
            "createdAt": "2017-11-13T22:29:03Z",
            "topicId": 4829,
            "contents": null,
            "mentions": [],
            "talks": [],
            "replyTo": null,
            "links": [
                {
                    "id": 3548,
                    "url": "https://media.giphy.com/media/3oEjHKjVoNVsCeMoDe/giphy.gif",
                    "contentType": "text/html",
                    "title": "Its Friday GIF by Justin - Find & Share on GIPHY",
                    "description": "Discover & share this Justin GIF with everyone you know. GIPHY is how you search, share, discover, and create GIFs.",
                    "imageUrl": "https://media.giphy.com/media/3oEjHKjVoNVsCeMoDe/giphy.gif",
                    "embed": {
                        "width": 480,
                        "author_url": "https://giphy.com/justin",
                        "title": "Its Friday GIF by Justin - Find & Share on GIPHY",
                        "url": "https://media.giphy.com/media/3oEjHKjVoNVsCeMoDe/giphy.gif",
                        "type": "photo",
                        "provider_name": "GIPHY",
                        "provider_url": "https://giphy.com/",
                        "author_name": "Justin",
                        "height": 371
                    },
                    "createdAt": "2017-11-13T22:24:01Z",
                    "updatedAt": "2018-08-18T02:32:28Z"
                }
            ],
            "id": 160928,
            "account": {
                "id": 2499,
                "name": "Moss",
                "fullName": "Moss",
                "suggestion": "Moss",
                "imageUrl": "https://typetalk.com/accounts/2499/profile_image.png?t=1453891379196",
                "isBot": false,
                "createdAt": "2016-01-27T09:55:23Z",
                "updatedAt": "2019-09-04T06:57:51Z"
            },
            "likes": [],
            "updatedAt": "2017-11-13T22:29:03Z"
        },
        {
            "attachments": [],
            "quotedPosts": [],
            "message": "https://media.giphy.com/media/111WSGoF53XKq4/giphy.gif",
            "mention": null,
            "createdAt": "2017-11-13T22:29:51Z",
            "topicId": 4829,
            "contents": null,
            "mentions": [],
            "talks": [],
            "replyTo": 160928,
            "links": [
                {
                    "id": 3549,
                    "url": "https://media.giphy.com/media/111WSGoF53XKq4/giphy.gif",
                    "contentType": "text/html",
                    "title": "Christina Aguilera Television GIF by The Voice - Find & Share on GIPHY",
                    "description": "The official GIPHY channel for #TheVoice, Mondays and Tuesdays at 8/7c on NBC!",
                    "imageUrl": "https://media.giphy.com/media/111WSGoF53XKq4/giphy.gif",
                    "embed": {
                        "width": 500,
                        "author_url": "https://giphy.com/thevoice",
                        "title": "Christina Aguilera Television GIF by The Voice - Find & Share on GIPHY",
                        "url": "https://media.giphy.com/media/111WSGoF53XKq4/giphy.gif",
                        "type": "photo",
                        "provider_name": "GIPHY",
                        "provider_url": "https://giphy.com/",
                        "author_name": "The Voice",
                        "height": 281
                    },
                    "createdAt": "2017-11-13T22:29:52Z",
                    "updatedAt": "2018-08-18T02:46:05Z"
                }
            ],
            "id": 160929,
            "account": {
                "id": 2500,
                "name": "Jessica",
                "fullName": "Jessica Lee",
                "suggestion": "Jessica Lee",
                "imageUrl": "https://typetalk.com/accounts/2500/profile_image.png?t=1454061730873",
                "isBot": false,
                "createdAt": "2016-01-27T09:55:35Z",
                "updatedAt": "2019-09-05T04:21:42Z"
            },
            "likes": [
                {
                    "id": 19747,
                    "postId": 160929,
                    "topicId": 4829,
                    "comment": "",
                    "account": {
                        "id": 2499,
                        "name": "Moss",
                        "fullName": "Moss",
                        "suggestion": "Moss",
                        "imageUrl": "https://typetalk.com/accounts/2499/profile_image.png?t=1453891379196",
                        "isBot": false,
                        "createdAt": "2016-01-27T09:55:23Z",
                        "updatedAt": "2019-09-04T06:57:51Z"
                    },
                    "createdAt": "2018-02-16T08:59:30Z"
                },
                {
                    "id": 21071,
                    "postId": 160929,
                    "topicId": 4829,
                    "comment": "",
                    "account": {
                        "id": 2500,
                        "name": "Jessica",
                        "fullName": "Jessica Lee",
                        "suggestion": "Jessica Lee",
                        "imageUrl": "https://typetalk.com/accounts/2500/profile_image.png?t=1454061730873",
                        "isBot": false,
                        "createdAt": "2016-01-27T09:55:35Z",
                        "updatedAt": "2019-09-05T04:21:42Z"
                    },
                    "createdAt": "2019-05-07T05:22:28Z"
                },
                {
                    "id": 21072,
                    "postId": 160929,
                    "topicId": 4829,
                    "comment": "",
                    "account": {
                        "id": 2498,
                        "name": "Stefanie",
                        "fullName": "Stefanie",
                        "suggestion": "Stefanie",
                        "imageUrl": "https://typetalk.com/accounts/2498/profile_image.png?t=1453891479138",
                        "isBot": false,
                        "createdAt": "2016-01-27T09:55:09Z",
                        "updatedAt": "2019-09-04T06:57:51Z"
                    },
                    "createdAt": "2019-05-07T05:24:03Z"
                }
            ],
            "updatedAt": "2017-11-13T22:29:51Z"
        }
  ]
}

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).