POST
/
insert
curl --location 'https://document-query.pyqai.com/insert' \
--header 'Authorization: ExampleToken' \
--form 'account_id="ExampleAccountId"' \
--form 'index_name="ExampleNewIndexName"' \
--form 'document_source="Example1"' \
--form 'input_sequence=@"example_file_path.txt"'
{
    "response": "Successfully inserted new document to index"
}

Form Data

input_sequence
file
required

This is the document you want to insert into your index. Currently supported file types are md, pdf, and txt.

document_source
string
required

This is the name of the document you wish to insert.

account_id
int
required

This is your account ID.

index_name
string

This is the name of the index you wish to insert the document into. This parameter is optional - if left blank will use auto indexing.

Headers

Authorization
string
required

This is your API token associated with your account.

Response

response
string

Indicates whether the insert document call was successful.

curl --location 'https://document-query.pyqai.com/insert' \
--header 'Authorization: ExampleToken' \
--form 'account_id="ExampleAccountId"' \
--form 'index_name="ExampleNewIndexName"' \
--form 'document_source="Example1"' \
--form 'input_sequence=@"example_file_path.txt"'
{
    "response": "Successfully inserted new document to index"
}