Post message

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
fileKeys[0] … fileKeys[4] (Optional) String attachment file key (refer to Upload attachment file), maximum count: 5
talkIds[0] … talkIds[4] (Optional) Number Talk 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

{
  "topic": {
    "id": 208,
    "name": "IT Peeps",
    "description": "",
    "suggestion": "IT Peeps",
    "isDirectMessage": false,
    "lastPostedAt": "2016-12-21T10:11:57Z",
    "createdAt": "2014-06-10T02:32:29Z",
    "updatedAt": "2014-06-10T02:32:29Z"
  },
  "post": {
    "id": 333,
    "topicId": 208,
    "replyTo": null,
    "message": "Let's party like it's 1999!",
    "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": [],
    "talks": [],
    "links": [],
    "createdAt": "2016-12-21T10:11:57Z",
    "updatedAt": "2016-12-21T10:11:57Z"
  },
  "mentions": [],
  "exceedsAttachmentLimit": false,
  "directMessage": 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).