Feature Endpoint
Upload File
This endpoint allows you to upload your file as a knowledge source for generating customized content.
POST
/custom/api/upload/file/factgpt
Headers
Authorizationrequired
string
Input the Authorization Bearer Token to authorize your API request.
Content-Typerequired
string
Input "multipart/form-data" as the Content-Type header to send a form data request.
Body
filerequired
file
This is the file you want to upload.
Response
status
string
Indicates whether the call was successful. It prompts success if working, otherwise not.
message
string
This information is attached to the call and offers meaningful details when errors occur.
file_id
string
This string is file id of the uploaded file.
curl --location --request POST 'https://api-az.longshot.ai/custom/api/upload/file/factgpt'
--header 'accept: application/json'
--header 'Authorization: Bearer <token>'
--header 'Content-Type: multipart/form-data'
-F 'file=@<file_name>;type=<file_type>
{
"status": "success",
"message": "Uploaded <file_name> successfully",
"file_id": "<uploaded_file_id>"
}