POST
/
api
/
v1
/
collection
/
insert-html
curl --request POST \
  --url https://app.twilix.io/api/v1/collection/insert-html \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "collection": "<string>",
  "metadata": {}
}'

Insert HTML contents into your collection.

This endpoint will automatically parse the html for relevant information and stores them in the vectorestore.

If you need to insert data via url directly, see our Insert URL endpoint.

collection
string

The collection to insert the data into.

html
The raw HTML string to insert.
metadata
object
default: "{}"

Optional metadata when inserting the HTML

Note that this requires an object. For example, an example metadata would be:

{
  "name": 'my_html.html',
  "url": 'https://www.example.com'
}
Content-Type
default: "application/json"required

Requires JSON Content Type