The public API is exposed as part of the Pragatix Firewall.
How to get your API KEY
The API allows sending requests to AI service through HTTP requests.
Each user has a unique API key to authenticate the API. The API key is viewed on the User Settings page in the Pragatix Admin Center here:
You can select the value, copy it, and use it in your API calls.
How to find CollectionID or ContentId?
Several API require PrvaiteDataID . To find the ID select the collection or document line and click on collection info
For a document:
For a SharePoint folder:
1. Chat Service
URL: https://[firewall API address]/coreApi/v1/chat
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/chat
Method: POST
Description: Allows to send a prompt to the AI and receive a response based on some particular content or all company data
Request Body:
{ "APIKey": "{your apikey}", "Prompt": "{your question}", "DataSource": "PrivateAndPublic" / "Public" / "Private", // OPTIONAL FIELDS: "PrivateDataSource": "Content" / "Collection" / "All", "PrivateDataID": "{ID of the content or the collection}", "AIModel": "", "AIServerType": "", "ChatId": "", "MaxWordsInAnswer": "", "User": "", "ChatAIService": "", "Context": "", "PromptMode": "", "AssistantId": }
All input parameters should be sent to the body in JSON format.
The URL is not the same as the Admin Center. Please get in touch with support to get the URL of your environment.
Use the supported_models endpoint to retrieve a list of all available models
Parameters notes
APIKey- see here
DataSource - When the DataSource is set to public, the chat will use the pre-trained LLM knowledge, while the private value will use the uploaded company data. For askng a general question not related to a file or content you upload- use Public. When you want to get answers from company knowledge or files you upload- set to Private.
PrivateDataSource- The PrivateDataSource values are not needed for public-only data. It is needed to scope the question on a specific file or collection
PrivateDataID is not needed when PrivateDataSource=All and for public-only data
AIModel (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: gpt-4o-mini, o3-mini, ai21.jamba-1-5-large-v1:0, gpt-3.5-turbo-16k etc.)AIServerType (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: openai, local, awsbedrock, fireworks etc. The server type must be compatible with the selected model.)ChatId (optional)- If provided, the question will be added to the existing chat with an external chat ID that equals the provided value. If no chat exists, a new one will be created.
MaxWordsInAnswer (optional)- If provided it should limit the number of words in the answer. The min word limit is 5.
User (optional)- The user that has asked the question
ChatAIService (optional. Default will be PragatixAdmin Center . Available values: ChatGPT, Gemini, PragatixAdmin Center , MicrosoftCopilot , Cohere, Claude, SlackBot)
Context (Optional)- The context of the chat. For example, the name of the Slack channel or Word document that the prompt was used from.
ChatName (optional)- The name of the chat in the auditing
PromptMode (optional) - The system prompts settings. Available values: Native, Minimal and Normal. See here.
AssistantId (optional, rom FirewallAPI 1.5.11 )- An option to load the corresponding Knowledge Assistant Workspace Template, and automatically apply its predefined settings to the chat request.
If found, assistant settings are applied only where the request does not already define a value.
If not found or invalid, the request proceeds without assistant settings.
Settings Applied from Assistant (if request value is empty): CustomInstructions, MaxWordsInAnswer, Temperature, PromptMode, VerifySources, CompanyKnowledgeInfo, Context , ChatName, AIModel ,AIServerType, DataSource, PrivateDataSource, and PrivateDataID.
Response:
Status Code: 200 OK
Response
PromptId
SuggestedQuestions
DataSources
Use collection in the source and the collection ID in the PrivateDataID to get answers from the content of a SharePoint folder, Site root, or Google Folder.
In case of an error, it will return an error message.
2. Create Collection
URL: https://[firewall API address]/coreApi/v1/createcollection
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/createcollection
Method: POST
Description: Creates a collection
Request Body:
{ "APIKey": "{your apikey}", "CollectionName": "", // OPTIONAL FIELDS: "CollectionId": "", "AllowedGroups ": "{}" "AllowedEmails ": "" "Action": "" }
All input parameters should be sent to the body in JSON format.
The URL is not the same as the Admin Center. Please get in touch with support to get the URL of your environment.
Parameters notes
APIKey- see here
Action (string, optional, default: "Add")
The action to be performed on the collection. Possible values include:Add: Upload a new file (default action).
UpdatePermissions: Modify permissions for an existing file.
Rename: Change the name of an existing file.
Delete: Remove an existing file.
Response:
Status Code: 200 OK
CollectionID
3. Upload File
URL: https://[firewall API address]/coreApi/v1/upload
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/upload
Method: Post
Description: Allows to send file to the AI to be saved in Pragatix and receive its ID.
Request Body:
{ "APIKey": "{your apikey}", "FileName": "", "FileContent:": "in binary!", // OPTIONAL FIELDS: "ContentSourceName":"", "ContentSourceIP": "", "CollectionId": "", "ContentId": "string", "AllowedGroups ": "" "AllowedEmails ": "" "FilePath": "" "Action": "" }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
FileName - with the extension as will be displayed in the UI for the user.
ContentSourceName (optional)- The name of the client using the API (for example, File loader)
ContentSourceIP (optional)- The IP of the client using the API (for example the host of the File loader)
Action (string, optional, default: "Add")
The action to be performed on the file. Possible values include:Add: Upload a new file (default action).
UpdatePermissions: Modify permissions for an existing file.
Rename: Change the name of an existing file.
Delete: Remove an existing file.
ContentId (string, required for UpdatePermissions, Rename, or Delete)
CollectionID (Optional)
Response:
Status Code: 200 OK
ContentId
In case of an error, it will return an error message.
4. Get classifications
URL: https://[firewall API address]/coreApi/v1/getClassifications
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/getClassifications
Method: Get
Description: Allows user to get status and classifications of content
Request Body:
{ "APIKey": "{your apikey}", "ContentId": "{Your ContentID}" }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
Response:
Status Code: 200 OK
EmbeddingStatus- of the content (document) - New/SentToQueue/Processing/Done/Failed
Classifications(only if embedding status is Done) - list of classifications found for the content, by rule type (AI/Regular). Each classification contains the following fields:
RuleType - AI/Regular
Status - New/Processing/Done/Error/Skip
ClassificationRules (only if status is Done) - list of rules of the specified type that were matched for the content. Each rule contains the following fields:
RuleName
RuleDescription
RulePurpose
RuleType
SensitivityLevel
RuleValue
In case of an error, it will return an error message.
5. Get Content Status
URL: https://[firewall API address]/coreApi/v1/content_status
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/content_status
Method: Get
Description: Allow user to get the current status of the content
Request Body:
{ "APIKey": "{your apikey}", "ContentId": "" }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
Action (string, optional, default: "Add")
The action to be performed on the collection. Possible values include:Add: Upload a new file (default action).
UpdatePermissions: Modify permissions for an existing file.
Rename: Change the name of an existing file.
Delete: Remove an existing file.
Response:
Status Code: 200 OK
Status
6. Alive request
URL: https://[firewall API address]/coreApi/v1/alive
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/alive
Method: Get
Description: Allows user to get the status of the Firewall
Request Body: This request does not have a body
7. Search files in knowledgebase
URL: https://[firewall API address]/coreApi/v1/search_knowledge_base_for_files
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/search_knowledge_base_for_files
Method: Post
Description: Allow the user to get a list of relevant files from the database saved in Pragatix
Request Body:
{ "APIKey": "{your apikey}", "Query": "{<}Search term}", "SimilaritySearchProvider": "for example- Pragatix", // OPTIONAL FIELDS: "UserProfile": "", "MaxResults": "", "KRequested": "" }
All input parameters should be sent to the body in JSON format.
APIKey- see here
"SimilaritySearchProvider": "for exmple- Pragatix"
"UserProfile" - (dictionary with 2 string fields: DisplayName and Email) - represent user information
"MaxResults": (int) - amount of maximum results for the request
"KRequested": (int)
Response:
Status Code: 200 OK
Response Content: JSON object with file_name link to S3, search score and relevant text chunk.
Response example:
{ "files_and_scores": [ { "file_name": "s3://bgpt-base-testing-files/FILES for BGPT testing/VC investor reach out scripts.pdf", "score": "", "text": "I really relate – I had a similar story that happened just before Yom Kippur! Or 190 chars Linkedin invite AGAT is a bootstrapped company offering ChatGPT-Like capabilities across all company data with an on-prem option to address business needs. Are you open to discussing possible investment? 291 chars Linkedin invite Based on your evident enthusiasm in the AI field, I believe you will be interested in learning about AGAT. AGAT is a bootstrapped company offering ChatGPT-Like capabilities across all company data with an on-prem option to address business needs. Are you open to discussing possible investment?" }, { "file_name": "s3://bgpt-base-testing-files/FILES for BGPT testing/AGAT Software Security and Privacy statement 8329.pdf", "score": "", "text": "This document and the information contained therein is proprietary and confidential. No part of this document may be disclosed in any manner to a third party without the prior written consent of AGAT Software Development LTD CONFIDENTIAL Privacy Policy and Data processing notice Agat Software (“We”) are committed to protecting and respecting your privacy. This privacy and security statement explains what measures we take to secure your data, the personal data we collect from you through our product, and how we use that data. This notice sets out the basis on which personal data we collect from you, or that you provide to us, will be processed by us. Please read the following document carefully to understand our views and practices regarding your personal data protection. Who are we and what do we do AGAT Software Development LTD is an innovative security provider specializing in security, compliance, governance, management, and productivity solutions for Unified Communication and Collaboration (UCC) services. SphereShield, AGAT`s flagship product, handles security threats related to authentication and identity as well as communication control, data protection, and content inspection. Securing your data All data is encrypted in transit to and from the internet, mitigating the risk of third parties accessing your data. Data can also be encrypted at rest if requested. We store data in data centers around the globe in accordance with the need of our customers." } ]
8. Get Topics
URL: https://[firewall API address]/coreApi/v1/topics
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/topics
Method: Post
Description: Allows user to get the 5-top topics of a document or a conversation
Request Body:
{ "APIKey": "{your apikey}", "InputType": "qa", "InputData": [{"question": "___", "answer": "___"}], }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
InputType - the only possible value is ‘qa’
InputData - the data for the topic request in a structure of questions and answers.
Response:
Status Code: 200 OK
Topcis
Usage
In case of an error, it will return an error message.
9. Similar Words
URL: https://[firewall API address]/coreApi/v1/similar_words
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/similar_words
Method: Post
Description: Allows user to get the the similar words to the query in the provided terms
Request Body:
{ "APIKey": "{your apikey}", "Terms": "{terms}", "Texts": [<optional - only if chunk_ids not provided>] // OPTIONAL FIELDS: "ChunkIds": [{list of the chunk ids}] "Temperature": "" }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
Terms - (string), The model will provide similar words for this given terms.
Texts - (list of strings) the text that the model will provide the similar words from
Chunk_ids and texts can’t be provided together but one of them must be in the request
Response:
Status Code: 200 OK
Response Content:
Words array
Usage
In case of an error, it will return an error message.
10. Get Structured Data
URL: https://[firewall API address]/coreApi/v1/structured_data
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/structured_data
Method: Post
Description: Allows user to parse documents based on a specific structure.
Request Body:
option 1:
{ "APIKey": "{your apikey}", "AccountId": "{unique identifier of the company}", "UserId": "{unique identifier of the costumer}", "ContentId": "{unique identifier of the document}", "Structure": [a structure of the desierd table] // OPTIONAL FIELDS: "AIModel": "", "AIServerType": "" }
option 2:
{ "APIKey": "{your apikey}", "ContentText": "{the content of the ducument to parse}", "Structure": [a structure of the desierd table] // OPTIONAL FIELDS: "AIModel": "", "AIServerType": "" }
All input parameters should be sent to the body in JSON format.
Use the supported_models endpoint to retrieve a list of all available models
Parameters notes
APIKey- see here
AIModel (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: gpt-4o-mini, o3-mini, ai21.jamba-1-5-large-v1:0, gpt-3.5-turbo-16k etc.)AIServerType (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: openai, local, awsbedrock, fireworks etc. The server type must be compatible with the selected model.)ContentText - you can use the Extract Text Endpoint to get the text of the document.
Response:
Status Code: 200 OK
Response Content:
Structure -the parsed data according to the given structure
Usage
In case of an error, it will return an error message.
11. Extract Text
URL: https://[firewall API address]/coreApi/v1/extract_text
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/extract_text
Method: Post
Description: Allows user to extract text from base-64 file content
Request Body:
{ "APIKey": "{your apikey}", "FileContent": """, "FileName": "" }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
FileContent- (string)
Response:
Status Code: 200 OK
Response Content:
ExtractText -the readable file text
In case of an error, it will return an error message.
12. Get supported models
URL: https://[firewall API address]/coreApi/v1/supported_models
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/supported_models
Method: Get
Description: Allows user to receive a list of all available models
Request Body:
{ "APIKey": "{your apikey}", }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
Response:
Status Code: 200 OK
Response Content:
models - The model’s list
In case of an error, it will return an error message.
13. Chat To Speech
URL: https://[firewall API address]/coreApi/v1/tts
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/tts
Method: Post
Description: Allows to send a prompt to the AI and receive an audio response based on some particular content or all company data.
Request Body:
{ "APIKey": "{your apikey}", "Prompt": "{the question}", "DataSource": "PrivateAndPublic" / "Public" / "Private", // OPTIONAL FIELDS: "PrivateDataSource": "Content" / "Collection" / "All", "PrivateDataID": "{ID of the content or the collection}", "AIModel": "", "AIServerType": "", "ChatId": "", "MaxWordsInAnswer": "", "User": "", "ChatAIService": "", "Context": "", "PromptMode": "", }
All input parameters should be sent to the body in JSON format.
The URL is not the same as the Admin Center. Please get in touch with support to get the URL of your environment.
Use the supported_models endpoint to retrieve a list of all available models
Parameters notes
APIKey- see here
DataSource - When the DataSource is set to public, the chat will use the pre-trained LLM knowledge, while the private value will use the uploaded company data. For askng a general question not related to a file or content you upload- use Public. When you want to get answers from company knowledge or files you upload- set to Private.
PrivateDataSource- The PrivateDataSource values are not needed for public-only data. It is needed to scope the question on a specific file or collection
PrivateDataID is not needed when PrivateDataSource=All and for public-only data
AIModel (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: gpt-4o-mini, o3-mini, ai21.jamba-1-5-large-v1:0, gpt-3.5-turbo-16k etc.)AIServerType (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: openai, local, awsbedrock, fireworks etc. The server type must be compatible with the selected model.)ChatId (optional)- If provided, the question will be added to the existing chat with an external chat ID that equals the provided value. If no chat exists, a new one will be created.
MaxWordsInAnswer (optional)- If provided it should limit the number of words in the answer. The min word limit is 5.
User (optional)- The user that has asked the question
Context (Optional)- The context of the chat. For example, the name of the Slack channel or Word document that the prompt was used from.
ChatName (optional)- The name of the chat in the auditing
PromptMode (optional) - The system prompts settings. Available values: Native, Minimal and Normal. See here.
Response:
Status Code: 200 OK
Response Content:
AnswerText
AudioFile - With Name, Content etc.
ChatResponseDuration - Gateway answer time in ms
AudioConversionDuration - TTS convert time in ms
TotalAudioQueryDuration - Total time in ms
In case of an error, it will return an error message.
14. Agent Tools
URL: https://[firewall API address]/coreApi/v1/agentTools
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/agentTools
Method: Post
Description: Enables users to perform various tasks like translation, email sending, and document analysis by interacting with AI tools, with support for custom configurations and file attachments.
Request Body:
{ "APIKey": "{your apikey}", "Prompt": "{your question}", "ToolToUse":"<Tool_name>", "ToolConfig": { "<Tool_config_name>": "<Tool_config_value>" }, "Files": [ { "file_name": "<file_name.txt>", "file_content": "<Base_64_file_content>" } ] }
APIKey- see here
ChatId (optional)- If provided, the question will be added to the existing chat with an external chat ID that equals the provided value. If no chat exists, a new one will be created.
ToolConfig: Contains tool-specific settings.
For translate_file, the key TargetLanguage must be included with the target language name. Example values: English Hebrew SpanishToolToUse (optional) Specifies which agent tool should be executed.
Possible values:translate_file , send_email, text_to_speech, deep_research, analyze_image, speech_to_text, create_document, convert_document, perform_calculation, analyze_excel, visualize_data, send_email, create_image, web_search, analyze_documentFiles (optional) List of files attached to the request. Each file object contains:
file_name (required) - Original file name, including extension.
file_content: (required) -Base64-encoded file content
AIModel (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: gpt-4o-mini, o3-mini, ai21.jamba-1-5-large-v1:0, gpt-3.5-turbo-16k etc.)AIServerType (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: openai, local, awsbedrock, fireworks etc. The server type must be compatible with the selected model.)
Agent Tools Response:
On success: Server-Sent Events (SSE)
Status Code: 200 OK
Response Content:
IsFinalAnswer - Indicates whether the response represents the final result of the operation.
If false, the response contains intermediate progress updates.AnswerText - contains the response message generated by the system, formatted as HTML for direct rendering in the client UI.
ChatId - Chat identifier
IsError - Error flag
AnswerFiles - Returned only when IsFinalAnswer = true
FileName - The base name of the file (example: "translated_example")
FileFormat - The extension (example: ".docx")
FileContent - Base64-encoded content
In case of an error, it will return an error message.
Example – Firewall Blocked Response:
14.1 Translation Tool
Description: The Translation Tool enables users to translate documents into any supported language while preserving the original formatting and structural layout.
Supported input formats: DOCX, PDF, TXT
Output format: DOCX
Translation Process:
File Processing
Convert PDF files to DOCX if needed.
Extract all text runs (word-level or formatting-based units).
Consolidate text runs with their formatting into translation units.
Batching - Group translation units into batches to optimize model performance.
Translation - Send batches to the LLM for translation while preserving run alignment.
Reconstruction -Insert translated text back into the original document structure, preserving formatting.
RTL Support - Apply right-to-left layout adjustments when required.
Output - Generate and return the translated document in DOCX format.
Request Body:
{ "APIKey": "{your apikey}", "Prompt": "{your question}", "ToolToUse":"translate_file", "ToolConfig": { "TargetLanguage": "Hebrew" }, "Files": [ { "file_name": "example.txt", "file_content": "VGhpcyBpcyBhIHNhbXBsZSB0ZXh0IHRvIHRyYW5zbGF0ZS4=" } ] }
APIKey- see here
ChatId (optional)- If provided, the question will be added to the existing chat with an external chat ID that equals the provided value. If no chat exists, a new one will be created.
ToolConfig: Contains tool-specific settings.
For translate_file, the key TargetLanguage must be included with the target language name. Example values: English Hebrew SpanishFiles: The file for the Translation. Each file object contains:
file_name (required) - Original file name, including extension.
file_content: (required) - Base64-encoded file content
AIModel, AIServerTyp, ChatId : explained here - https://agatsoftware.atlassian.net/wiki/spaces/VA/pages/3284697089/Public+Core+API+Firewall+API+for+integration#14.-Agent-Tools
Translate Tools Response:
On success: Server-Sent Events (SSE)
Status Code: 200 OK
Response Content:
IsFinalAnswer - Indicates whether the response represents the final result of the operation.
If false, the response contains intermediate progress updates.AnswerText - contains the Translation tool steps message formatted as HTML:
Initiating translation request to: <TargetLanguage>
Processing file: <FileName>
Beginning translation task
Sending batch i of X for translation (if the documents has only 1 batch it will be skipped)
Got translated file
The translated filename
ChatId - Chat identifier
IsError - Error flag
AnswerFiles - Returned only when IsFinalAnswer = true
FileName - The base name of the file (example: "translated_example")
FileFormat - The extension (example: ".docx")
FileContent - Base64-encoded content
Response Example:
{ "IsFinalAnswer":false, "AnswerText":"<div class='step'><span class='message-info'> 0. Starting translation to Hebrew.</span> </div>", "ChatId":11069, "IsError":false, "AnswerFiles":null }
{ "IsFinalAnswer":false, "AnswerText":"<div class='step'><span class='message-info'> 1. Processing file: example.txt</span> </div>", "ChatId":11069, "IsError":false, "AnswerFiles":null }
{ "IsFinalAnswer":false, "AnswerText":"<div class='step'><span class='message-info'> 2. Sending batch i of X for translation</span> </div>", "ChatId":11069, "IsError":false, "AnswerFiles":null }
{ "IsFinalAnswer":false, "AnswerText":"<div class='step'><span class='message-info'> 9. Got translated file from 'translate'</span> <a target='_blank' class='btn-link' href='https://app.pragatix.ai/Documents/Azure/api/businessgpt/downloadRepositoryFile/e534566e-6af9-498c-b3af-f471ce5b6e23' >Download translated_example.docx</a> </div>" "ChatId":11069, "IsError":false, "AnswerFiles":null }
{ "IsFinalAnswer":true, "AnswerText":"<p>translated_example.docx</p> </div>", "ChatId":11069, "IsError":false, "AnswerFiles": ["FileName":"example.docx", "FIleContent": "<Base64_file_content>" ] }
15. Audit
URL: https://[firewall API address]/coreApi/v1/Audit
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/Audit
Method: Post
Description: Allows user to insert prompt and answer into auditing
Request Body:
{ "APIKey": "{your apikey}", "UserName": "", "UserEmail": "", "QuestionText": "{the question}", "AnswerText": "{the answer}", "ChatId": "", "ChatTitle": "", "CreatedTime": "", "Files": "", "FWType": "", "ChatAIService": "" }
All input parameters should be sent to the body in JSON format.
Parameters notes
APIKey- see here
UserName - string
UserEmail - string
QuestionText - The prompt we are auditing.
AnswerText (Optional unless ChatAIService = MicrosoftCopilot) - the response
ChatId (optional)- If provided, the question will be added to the existing chat with an external chat ID that equals the provided value. If no chat exists, a new one will be created.
ChatTitle (optional) - string
CreatedTime - datetime
Files - List of FileRequest attached to the request. If no files send empty list.
FWType - Firewall chat type (BGFirewaChatType). Possible values: ChromeExtention, Proxy, BusinessGPTApi, FileLoader, CopilotManualUpload, FCopilotAPI.
ChatAIService (optional) - Default will be BusinessGPTDashboard . Available values: ChatGPT, Gemini, BusinessGPTDashboard , MicrosoftCopilot , Cohere, Claude, SlackBot etc)
Response:
Status Code: 200 OK
If an error occurs, it returns an error message; otherwise, it returns a success message
16. Get Agent Policy
URL: https://[firewall API address]/coreApi/v1/get_agent_policy
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/get_agent_policy
Method: Post
Description: Evaluates prompt/agent/app/tools against firewall policy and returns policy decision (Allowed/Monitored/Blocked).
Request Body:
{ "ExternalPromptId": "{external question id}", "UserEmail": "{user email "AgentEvent": "{BGAgentEvent enum value}", "AgentName": "{agent name}", "MonitoringSource": "{ChromeExtention | Proxy | McpGateway}", // OPTIONAL FIELDS: "APIKey": "{your apikey}", "Prompt": "{optional prompt text}", "ExternalChatId": "{optional external chat id}", "UserName": "{optional}", "UserAgent": "{optional}", "ClientIp": "{optional}", "AppName": "{optional}", "AppInstanceName": "{optional}", "AppTools": ["{optional_tool_1}", "{optional_tool_2}"], "Arguments": "{optional}", "SaveToAuditing": false }
All input parameters should be sent to the body in JSON format.
If APIKey is provided, request is authenticated by API key, Else request falls back to web-service auth flow (using AccountIP and related app auth logic).
Parameters notes
APIKey- see here
Response:
Status Code: 200 OK
{ "Action": "Blocked", "Flagged": false, "MatchedScope": "ActionIntent", "MatchedEntity": "export_mass_data", "Details": "Marketing users are not allowed to export mass data from Salesforce", "SavedToAuditing": true }
17. AI Service Hub
URL: https://[firewall API address]/coreApi/v1/qa
Sample URL for BGD10 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/qa
Method: Post
Description: Allows user to chat with the supported LLM models, including Pragatix Firewall and auditing.
Request Body:
{ "APIKey": "{your apikey}", "Query": "" //Optioanl fields: //"AIModel": "", //"AIServerType": "", //"Files": [{"FileName": "<file_name_1>", "FileContent": "<file_name_2>}"], //"ProjectName": "<Optional_Project_Name>" }
All input parameters should be sent to the body in JSON format.
Use the supported_models endpoint to retrieve a list of all available models.
Parameters notes
APIKey- see here
ProjectName (optional) - Useful to define all costs under the same Project Name.
FileContent (optional): -Base64-encoded file content
AIModel (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: gpt-4o-mini, gpt-5-mini, global.anthropic.claude-sonnet-4-6 etc.AIServerType (optional)- Defaults to the model specified in the Admin Center configuration.
Possible values: openai, local, awsbedrock, fireworks etc
The server type must be compatible with the selected model.
Response:
Status Code: 200 OK
Response Content:
Response
PromptId
Usage
In case of an error, it will return an error message.
Postman Samples for all APIs
Attached is the Postman collection with example requests.