Delete an agent source.

Delete a source for a given agent.

OpenAPI.json
View
Download

Purpose

Delete a source for a given agent.

At a high level, this is the canonical way to work with sources resources via the CustomGPT API.

When to use

  • When you need to delete an agent source as part of your backend or automation workflows.

When a new connection is added (such as a sitemap, Google Drive, or SharePoint), each becomes its own source.

For example, if you add two sitemaps, two separate sitemap sources are created.

However, file uploads work a bit differently. All uploaded files are grouped under a single source, and an agent (or project) can only have one file upload source. Each source can contain multiple documents, referred to as "pages" in our system.

So if you're trying to delete a specific file, you need to target the page ID rather than the source ID. Attempting to delete a source would remove all associated files.

To delete an individual file (page), please use this API endpoint: Delete Page API. Once you confirm the correct project and page IDs, the API call should work as expected.

"Action is un-authorized"

Regarding the “action is un-authorized” message, this error maybe triggered when the wrong endpoint is used like attempting to delete a page using the source deletion API.

Language
Credentials
Bearer
JWT
Click Try It! to start a request and see the response here!