Post message

Post a message to a topic.

Method

POST

URL

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

Scope

topic.post

URL parameters

Name Type Description
topicId Number Topic ID

Form parameters

Name Type Description
message String your message, (max 4000 characters)
replyTo (Optional) Number references Post ID
showLinkMeta (Optional) Boolean show OGP data of URL included in message. default value: true
ignoreHashtag (Optional) Boolean A value indicating whether hashtags in the message should be tags. default value: false
fileKeys[0] … fileKeys[4] (Optional) String attachment file key (refer to Upload attachment file), maximum count: 5
talkIds[0] … talkIds[4] (Optional) Number Tag IDs that you want to put the message in, maximum count: 5
attachments[0].fileUrl … attachments[4].fileUrl (Optional) String Each message can have max. 5 file URLs (max. 10MB per file).
attachments[0].fileName … attachments[4].fileName (Optional) String Unless the parameter specifies otherwise, filenames are automatically generated from the file URL. (maximum count: 5)

Response Example

{
    "space": {
        "key": "xxxxx",
        "name": "Awesome Tech Inc.",
        "enabled": true,
        "imageUrl": "https://apps.nulab.com/spaces/xxxxx/photo/large"
    },
    "topic": {
        "id": 4829,
        "name": "Coffee shop",
        "suggestion": "Coffee shop",
        "isDirectMessage": false,
        "lastPostedAt": "2018-11-06T07:56:42Z",
        "createdAt": "2017-11-13T22:27:21Z",
        "updatedAt": "2017-12-21T02:41:00Z",
        "description": "A topic for getting off-topic"
    },
    "post": {
        "id": 167964,
        "topicId": 4829,
        "replyTo": null,
        "message": "Hi",
        "account": {
            "id": 2500,
            "name": "Jessica",
            "fullName": "Jessica",
            "suggestion": "Jessica",
            "imageUrl": "https://typetalk.com/accounts/2500/profile_image.png?t=1454061730873",
            "isBot": false,
            "createdAt": "2016-01-27T09:55:35Z",
            "updatedAt": "2018-11-06T07:54:44Z"
        },
        "mention": null,
        "attachments": [],
        "likes": [],
        "talks": [],
        "links": [],
        "createdAt": "2018-11-06T07:56:42Z",
        "updatedAt": "2018-11-06T07:56:42Z"
    },
    "mentions": [],
    "exceedsAttachmentLimit": false,
    "directMessage": null
}

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