Add a source.
Changed onConnects a new data source to an agent's knowledge base. You can add content via sitemap URL, file upload, or integration connection (Google Drive, SharePoint, etc.). The system will begin indexing the content immediately.
Notes: For large sources, indexing may take several minutes. Check the source status to monitor progress.
Request
- Base URLhttps://app.customgpt.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The unique identifier of the agent (formerly known as project).
Request body multipart/form-data
Example request
{
"sitemap_path": "https://example.com/sitemap.xml",
"type": "sitemap",
"file_data_retension": true,
"file": "file.pdf",
"is_vision_enabled": true,
"is_vision_compress_image": true,
"image_extraction_type": "sync_from_sitemap"
}Response
Successfully created a new agent source.
Example response
{
"status": "success",
"data": {
"id": 1,
"created_at": "2021-01-01 00:00:00",
"updated_at": "2021-01-01 00:00:00",
"type": "sitemap",
"sub_type": "images-opengraph",
"settings": {
"executive_js": true,
"data_refresh_frequency": "never",
"create_new_pages": true,
"refresh_existing_pages": "never",
"sitemap_path": "https://example.com/sitemap.xml",
"image_extraction_type": "sync_from_sitemap"
},
"pages": [
{
"id": 1,
"page_url": "https://example.com",
"page_url_hash": "d41d8cd98f00b204e9800998ecf8427e",
"project_id": 1,
"s3_path": "project-1/page-1/file.pdf",
"crawl_status": "queued",
"index_status": "queued",
"is_file": true,
"is_refreshable": true,
"is_file_kept": true,
"filename": "file.pdf",
"filesize": 100,
"created_at": "2021-01-01 00:00:00",
"updated_at": "2021-01-01 00:00:00",
"deleted_at": "2021-01-01 00:00:00"
}
]
}
}Changes
- breaking
request property
was restricted to a list of enum values - breaking
the
request property type changed frombooleantointeger - warning
added the new
422.00enum value to the/response property for the response status - warning
added the new
422.00enum value to the/response property for the response status - warning
added the new
422.00enum value to the/response property for the response status - warning
added the new
422.00enum value to the/response property for the response status - warning
added the new
advancedenum value to the//response property for the response status - warning
added the new
alwaysenum value to the//response property for the response status - warning
added the new
dailyenum value to the//response property for the response status - warning
added the new
if_updatedenum value to the//response property for the response status - warning
added the new
monthlyenum value to the//response property for the response status - warning
added the new
neverenum value to the//response property for the response status - warning
added the new
neverenum value to the//response property for the response status - warning
added the new
web-imagesenum value to the/response property for the response status - warning
added the new
weeklyenum value to the//response property for the response status - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new
0.00enum value to the request property - info
added the new
1.00enum value to the request property - info
added the new
2.00enum value to the request property - info
added the non-success response with the status
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
/to the response with the status - info
removed the
neveralwaysif_updatedenum value from the//response property for the response status - info
removed the
neverdailyweeklymonthlyadvancedenum value from the//response property for the response status
- breaking
- breaking
the
///response's property format changed frombinaryto no format for status - warning
removed the optional property
//from the response with the status - warning
added the new
Agent id is requiredenum value to the/response property for the response status - warning
added the new
Agent with id {projectId} not foundenum value to the/response property for the response status - warning
added the new
neverdailyweeklymonthlyadvancedenum value to the//response property for the response status - info
added the new optional request property
- info
added the new optional request property
- info
added the optional property
///to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
removed the
Our system could not detect any pages in your sitemapenum value from the/response property for the response status - info
removed the
Our system could not validate your sitemapenum value from the/response property for the response status - info
removed the
Project id is requiredenum value from the/response property for the response status - info
removed the
Project with id {projectId} not foundenum value from the/response property for the response status - info
removed the
Sitemap URL is emptyenum value from the/response property for the response status
- breaking