curl --location --request POST 'https://api.rapidagent.ai/api/v1/documents' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>' \
--data-raw '{
"name": "My document",
"type": "PDF",
"url": "https://digitalassets.tesla.com/tesla-contents/image/upload/IR/TSLA-Q1-2023-Update",
"authorization": null,
"splitter": null
}'
{
"success": true,
"data": {
"id": "clhnyae1t00016i2ixo0027c5",
"userId": "clhj28u1300006ig02ptpm1sh",
"user": {},
"type": "PDF",
"url": "https://digitalassets.tesla.com/tesla-contents/image/upload/IR/TSLA-Q1-2023-Update",
"createdAt": "2023-05-14T21:50:59.349000+00:00",
"updatedAt": "2023-05-14T21:50:59.349000+00:00",
"index": null,
"Agent": null
}
}
Documents
/documents
Create new document.
POST
/
api
/
v1
/
documents
curl --location --request POST 'https://api.rapidagent.ai/api/v1/documents' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>' \
--data-raw '{
"name": "My document",
"type": "PDF",
"url": "https://digitalassets.tesla.com/tesla-contents/image/upload/IR/TSLA-Q1-2023-Update",
"authorization": null,
"splitter": null
}'
{
"success": true,
"data": {
"id": "clhnyae1t00016i2ixo0027c5",
"userId": "clhj28u1300006ig02ptpm1sh",
"user": {},
"type": "PDF",
"url": "https://digitalassets.tesla.com/tesla-contents/image/upload/IR/TSLA-Q1-2023-Update",
"createdAt": "2023-05-14T21:50:59.349000+00:00",
"updatedAt": "2023-05-14T21:50:59.349000+00:00",
"index": null,
"Agent": null
}
}
Body
string
A name for the document.
string
The document type. Options:
TXT, PDF, YOUTUBE, CSV or URL.string
A publicly available
URL for the document.number
The first page to ingest.
string
The last page to ingest.
object
object
object
Any key values necessary to ingest the document.
Response
boolean
Indicates whether the call was successful.
object
A
document object.curl --location --request POST 'https://api.rapidagent.ai/api/v1/documents' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>' \
--data-raw '{
"name": "My document",
"type": "PDF",
"url": "https://digitalassets.tesla.com/tesla-contents/image/upload/IR/TSLA-Q1-2023-Update",
"authorization": null,
"splitter": null
}'
{
"success": true,
"data": {
"id": "clhnyae1t00016i2ixo0027c5",
"userId": "clhj28u1300006ig02ptpm1sh",
"user": {},
"type": "PDF",
"url": "https://digitalassets.tesla.com/tesla-contents/image/upload/IR/TSLA-Q1-2023-Update",
"createdAt": "2023-05-14T21:50:59.349000+00:00",
"updatedAt": "2023-05-14T21:50:59.349000+00:00",
"index": null,
"Agent": null
}
}