Thanks for your post! TestRail’s API methods would require a specific syntax for requests (in JSON format), and this wouldn’t support importing directly in HTML format. You would need to parse/convert this to the proper format prior to add this via the API. It’s also not possible to upload attachments via the API yet, however we do have plans to look into supporting this for a future update. You can learn more about the expected API request format/syntax on our website here (just click to expand the example requests/responses):
Hope this helps!