Add a source of the type URL

Request parameters

The code field defines what a source can be used for in the AI agent.
The field helps the system understand how to use the data. For example, if a source contains a return policy, it should only be used in responses related to product returns.

  • If a source has a specific code, the AI ​​agent will not be able to use it in other contexts. For example, a document with code: privacy_policy will not be used to answer questions about shipping.
  • However, the suggested_reply feature does not take code into account, so all sources can be used to generate answers in the chat.

AI agent example

{
  "url": "https://kommo.com/blog",
  "with_nested": true,
  "available_functions": ["agent"],
  "code": "privacy_policy"
}

You added a source with available_functions: ["agent"] and code: "shipping_policy". This means that the AI ​​agent will only use it for responses about shipping conditions and won't use it in other topics. The suggested_reply functionality won't index this source when searching for an answer.

AI Suggested Reply example

{
  "url": "https://kommo.com/blog",
  "with_nested": true,
  "available_functions": ["suggested_reply"],
  "code": "shipping_policy"
}

You have added a source with available_functions: ["suggested_reply"]. When generating responses, this functionality doesn't check the value of the code field at all, but simply uses any sources available to it with the available functions field.
There are 5 unique policies in total:

  • contact information (contact_information)
  • personal data processing (privacy_policy)
  • return policy (return_and_refund_policy)
  • delivery policy (shipping_policy)
  • terms of service (terms_of_service)
_Displaying policies for AI Agent functionality in the interface_

Displaying policies for AI agent functionality in the interface

Response parameters

ParameterData typeDescription
idintID of the added source
namestringThe name of the added source.
For a URL source, it is always equal to the link passed to create the source.
updated_atintTime of the last source update. Time format is Unix Timestmp.
updated_byintID of the last user to perform an update on the source.
codestringAvailable values:

1. contact_information
2. privacy_policy
3. return_and_refund_policy
4. shipping_policy
5. terms_of_service
If the source doesn't have the code, this field doesn't come in the response.
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!