Parse HTML and Text Documents Using API

In this article we'll see how to parse HTML and TXT documents using Parsio API.

Related articles:


To access the API, you will need the API key that you will find in your account:

This API key should be included in the X-API-Key HTTP header.

Unauthenticated responses will return in a HTTP 401 Unauthorized code.

Here's a request example using cURL:

curl -X GET -H "X-API-Key: <YOUR_API_KEY>"

How to parse HTML and text documents using Parsio API

API Endpont: POST<mailbox_id>/doc

JSON parameters:

  • name (string): Document's name (or Subject for emails)
  • html (string): HTML content
  • text (string): Text content
  • from (string): 'From' email address (optional)
  • to (string): 'To' email address (optional)

If both provided, the HTML content has priority over TEXT content. At least one must be provided.

Request example

curl \
-d '{
"name": "New order",
"from": "",
"to": "",
"html": "<p>HTML content goes here</p>"
}' \
-H "Content-Type: application/json" \
Was this article helpful? Happy face Sad face