Contents
Upload file
Upload a file to get the file key. Use “multipart/form-data” as the content type.
Method
POST
URL
https://typetalk.com/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 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).