MIME Types

❗️

API Warning:

  • We tested the API requests covered in this guide in AnswerHub version 1.6.5. If you are using an earlier version, some requests may not function as described in this guide.
  • When using the AnswerHub REST API, please keep in mind that it is under active development, and is likely to change as development occurs. You can modify or remove requests. If you ever notice that this REST API guide is out of date, please contact our [Tech Docs](mailto:[email protected]?subject=API update needed) team to make updates (In your email, please include specifics about what needs updating).
  • Not all our partners have access to the REST API by default. If you are unsure of your access, or if you need help taking advantage of this functionality, please reach out to your dedicated Customer Success Manager or visit the Success site.

🚧

Note on MIME Types:

All the examples in this guide use the JSON MIME type and we write them as cURL commands.

Following the standard approach to designing REST web-services, the HTTP accept header specifies an ordered list of MIME types that are acceptable by the client. The implementation of the server supports the following MIME types:

  • application/json for JSON content
  • application/xml for XML content

Optionally, the following MIME types we may also support:

  • (X)HTML text/html
  • application/xhtml+xml

We specify the actual MIME type sent by the server in response to an API request within the HTTP response content-type header.

In addition to the headers, you can also use resource and file extensions to specify MIME types (.json for JSON content, or .xml for XML content).

Authorized Types of Extensions for Comment Attachments

For any comment you want to post, you can also add a MIME type to include different types of attachments. The following is a list of the authorized extensions and MIME Types for comment attachments.

ExtensionType of DocumentMIME Type
.jsonJSON Formatapplication/json
.xmlXMLapplication/xml
.gifGraphics Interchange Format (GIF)image/gif
.pngPortable Network Graphicsimage/png
.jpg, .jpegJPEG imagesimage/jpeg
.zipZIP archiveapplication/zip
.tarTape Archive (TAR)application/x-tar
.tar.gz, .tgzGZipapplication/gzip
.pdfAdobe Portable Document Formatapplication/pdf
.txtTexttext/plain, text/css, text/html, text/javascript

Authorized Types of Extensions for Answer Attachments

For any answer you want to post, you can also add a MIME type to include different types of attachments. The following is a list of the authorized extensions and MIME Types for answer attachments.

ExtensionType of DocumentMIME Type
.jsonJSON Formatapplication/json
.xmlXMLapplication/xml
.gifGraphics Interchange Format (GIF)image/gif
.pngPortable Network Graphicsimage/png
.jpg, .jpegJPEG imagesimage/jpeg