Upload attachment file

Specify “multipart/form-data” as content type. You can get fileKey from the response of this.

Method

POST

URL

https://typetalk.in/api/v1/topics/:topicId/attachments

Scope

topic.post

URL parameters

Name Type Description
topicId Number Topic ID

Form parameters

Name Type Description
file Binary max file size: 100 MB

Response Example

{
  "contentType": "image/jpeg",
  "fileKey": "035c2446499f888be1f32953a5d3c8d9d8b4c2e8",
  "fileName": "sample.jpg",
  "fileSize": 472263
}

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