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 PrivateDataID . 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://[CoreAPI 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": // Int "ApplicationName": "{Optional_ApplicationName}" }
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 CoreAPI1.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.
ApplicationName (optional, from CoreAPI 1.7.2) - Allows specifying a custom name for the request application instead of the default CoreAPI.
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. Collection
URL: https://[CoreAPI address]/coreApi/v1/collection
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/collection
Method: POST
Description: Creates, renames, or updates permissions for 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: create a new collection (default action).
UpdatePermissions: replace permissions for an existing collection, requires CollectionId,(reset and add new permissions).
Rename: rename an existing collection, requires CollectionId.
Response:
Status Code: 200 OK
CollectionID
3. Content
URL: https://[CoreAPI address]/coreApi/v1/Content
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/Content
Method: Post
Description: Allows to send file to the AI to be saved in Pragatix and receive its ID.
Request Body: multipart/form-data.
Request parameters:
{ "APIKey": "{your apikey}", "FileName": "", "FileContent:": "in binary!", // OPTIONAL FIELDS: "ContentSourceName":"", "ContentSourceIP": "", "CollectionId": "", "ContentId": "string", "AllowedGroups ": "" "AllowedEmails ": "" "FilePath": "" "Action": "", "ExternalContentId": "{Optional_ExternalContentId}" }
All input parameters should be sent to the body in JSON format.
You cannot upload a new file with your own preferred ContentId.
Use ExternalContentId for your preferred/client-side ID.
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 (reset and add new permissions).
Rename: Change the name of an existing file.
Delete: Remove an existing file.
UpdateContent: Replace the actual binary content of an existing file while preserving collection membership and permissions,
ContentId (string, required for UpdatePermissions, Rename, or Delete)
CollectionID (Optional)
ExternalContentId (Optional l when Action=Add) - Used later to identify the content without knowing the generated ContentId.
Response:
Status Code: 200 OK
ContentId
In case of an error, it will return an error message.
Request Samples
Upload new file with external ID:
curl -X POST "https://[CoreAPI address]/coreApi/v1/content" \ -F "APIKey={your apikey}" \ -F "Action=Add" \ -F "ExternalContentId=external-123" \ -F "FileName=base_text.txt" \ -F "CollectionId=123" \ -F "AllowedEmails=user@example.com" \ -F "AllowedGroups=" \ -F "file=@base_text.txt"Replace existing file content by external ID:
curl -X POST "https://[CoreAPI address]/coreApi/v1/content" \ -F "APIKey={your apikey}" \ -F "Action=UpdateContent" \ -F "ExternalContentId=external-123" \ -F "FileName=updated_text.txt" \ -F "file=@updated_text.txt"
4. Get classifications
URL: https://[CoreAPI 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://[CoreAPI 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
Response:
Status Code: 200 OK
Status
6. Alive request
URL: https://[CoreAPI 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 CoreAPI
Request Body: This request does not have a body
7. Search files in knowledgebase
URL: https://[CoreAPI 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": "", "ApplicationName": "{Optional_ApplicationName}" }
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)
ApplicationName (optional, from CoreAPI 1.7.2) - Allows specifying a custom name for the request application instead of the default CoreAPI.
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://[CoreAPI 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": "___"}], // OPTIONAL FIELDS: "ApplicationName": "{Optional_ApplicationName}" }
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.
ApplicationName (optional, from CoreAPI 1.7.2) - Allows specifying a custom name for the request application instead of the default CoreAPI.
Response:
Status Code: 200 OK
Topcis
Usage
In case of an error, it will return an error message.
9. Similar Words
URL: https://[CoreAPI 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": "", "ApplicationName": "{Optional_ApplicationName}" }
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
ApplicationName (optional, from CoreAPI 1.7.2) - Allows specifying a custom name for the request application instead of the default CoreAPI.
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://[CoreAPI 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": "", "ApplicationName": "{Optional_ApplicationName}" }
option 2:
{ "APIKey": "{your apikey}", "ContentText": "{the content of the ducument to parse}", "Structure": [a structure of the desierd table] // OPTIONAL FIELDS: "AIModel": "", "AIServerType": "", "ApplicationName": "{Optional_ApplicationName}" }
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.
ApplicationName (optional, from CoreAPI 1.7.2) - Allows specifying a custom name for the request application instead of the default CoreAPI.
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://[CoreAPI 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://[CoreAPI 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://[CoreAPI 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://[CoreAPI 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>" } ] // OPTIONAL FIELDS: "ApplicationName": "{Optional_ApplicationName}" }
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.)ApplicationName (optional, from CoreAPI 1.7.2) - Allows specifying a custom name for the request application instead of the default CoreAPI.
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
ApplicationName (optional, from CoreAPI 1.7.2) - Allows specifying a custom name for the request application instead of the default CoreAPI.
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://[CoreAPI 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://[CoreAPI 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. Get Models
URL: <https://[CoreAPI> address]/coreApi/v1/models
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/models
Aliases:
<https://[CoreAPI> address]/v1/models
Method: GET
Description:
Returns the AI Gateway / Service Hub models available for the authenticated user/account in an OpenAI-compatible models-list response.
Authentication:
Send the user API key in one of these ways:
-H "Authorization: Bearer {your apikey}"
or:
-H "api-key: {your apikey}"
or:
-H "x-api-key: {your apikey}"
Example API call:
curl -X GET "https://[CoreAPI address]/coreApi/v1/models" \ -H "Authorization: Bearer {your apikey}"
Response:
{ "object": "list", "data": [ { "id": "gpt-4o-mini (Production OpenAI)", "object": "model", "created": 1730000000, "owned_by": "Production OpenAI" } ] }
18. Shadow AI Classified Domains
URL: https://[CoreAPI address]/coreApi/v1/shadow_ai/classified_domains
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/shadow_ai/classified_domains?APIKey={your apikey}
Method: GET
Description: Returns the Shadow AI classified domain feed for the authenticated account. Use this endpoint to identify AI, mixed, and non-AI domains, whether prompt inspection is supported, and whether matching should use the exact host only or the host plus subdomains.
Request Parameters:
APIKey - The user's Core API key. It can be sent as the APIKey query parameter, or in the api-key / x-api-key request header.
Example API call:
curl -X GET "https://[CoreAPI address]/coreApi/v1/shadow_ai/classified_domains?APIKey={your apikey}"
Alternative API key header:
curl -X GET "https://[CoreAPI address]/coreApi/v1/shadow_ai/classified_domains" \ -H "api-key: {your apikey}"
Response:
Status Code: 200 OK
Response Content: List of classified domains. Each item includes Domain, ClassificationStatus, PolicyAction, Category, InspectionSupported, MatchScope, and UrlRules.
Field details:
InspectionSupported - true means this domain can be inspected by the Shadow AI proxy. false means it should not be inspected.
MatchScope - ExactHost matches only the exact value in Domain. HostAndSubdomains matches the domain and its subdomains.
UrlRules - For mixed domains, enabled AI URL patterns are returned here. For full-domain AI or non-AI entries, this list is usually empty.
Response Example:
[ { "Domain": "chatgpt.com", "ClassificationStatus": "AI", "PolicyAction": "Block", "Category": "Generative AI", "InspectionSupported": true, "MatchScope": "HostAndSubdomains", "UrlRules": [] }, { "Domain": "example.com", "ClassificationStatus": "Mixed", "PolicyAction": "Allow", "Category": "Mixed", "InspectionSupported": true, "MatchScope": "ExactHost", "UrlRules": [ { "UrlPattern": "*://example.com/ai/*", "ClassificationStatus": "AI", "Description": "AI feature URLs", "IsEnabled": true } ] }, { "Domain": "internal.example", "ClassificationStatus": "NonAI", "PolicyAction": "Ignore", "Category": "Business", "InspectionSupported": false, "MatchScope": "HostAndSubdomains", "UrlRules": [] } ]
To retrieve only blocked Shadow AI domains or URLs, filter the response client-side where PolicyAction equals Block. Full-domain AI services appear in Domain; mixed-domain URL matches appear in UrlRules[].UrlPattern.
19. Get Signer Name
URL: https://[CoreAPI address]/coreApi/v1/get_signer_name
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/get_signer_name
Method: POST
Description: Analyzes an uploaded document and identifies the signer associated with its signature. The response includes the detected signer name and supporting information such as a Latin-character representation, confidence, and evidence.
Request Format:
The request must use multipart/form-data.
Authentication:
Authorization: Bearer <API key>
Request Parameters:
model — Required multipart form field. The public AI Gateway model to use for document analysis. Use a model identifier returned by GET /v1/models. The value cannot exceed 255 characters.
file — Required multipart file containing the signed document. The file must not be empty and cannot exceed 4.5 MiB (4,718,592 bytes).
Example API call:
curl -X POST "https://[CoreAPI address]/coreApi/v1/get_signer_name" \ -H "Authorization: Bearer {your API key}" \ -F "model=claude-haiku-4-5-20251001 (Anthropic)" \ -F "file=@/full/path/to/signed-document.pdf;type=application/pdf"
Successful response:
Status Code: 200 OK
Response fields:
answer — The detected signer name. If no signer name can be determined, this may be "UNKNOWN".
explanation — Supporting information about the result:
signer_name_latin — Latin-character representation of the signer’s name, when available.
confidence — Confidence assigned to the identification, such as high, medium, or low.
evidence — Explanation of the information used to identify the signer.
Response Example:
{ "answer": "Bob Demo", "explanation": { "signer_name_latin": "Bob Demo", "confidence": "high", "evidence": "The printed name appears directly below the signature line." } }
A 400 Bad Request response may be returned when authentication fails, the request is not multipart/form-data, model is missing or invalid, file is missing, empty, duplicated, or oversized, or the document cannot be processed.
20. Validate Signatures
URL: https://[CoreAPI address]/coreApi/v1/validate_signatures
Sample URL for BGD15 environment:
https://BGD15-PragatixAPI.agatdemo.com/coreApi/v1/validate_signatures
Method: POST
Description: Compares signatures detected in an uploaded signed document with signatures detected in a reference file. The response includes an overall verdict, detected candidates, and detailed pair-by-pair comparisons describing similarities and differences.
Request Format:
The request must use multipart/form-data.
Authentication:
Authorization: Bearer <API key>
Request Parameters:
model — Required multipart form field. The public AI Gateway model used for signature analysis. Use a model identifier returned by GET /v1/models. The value cannot exceed 255 characters.
signed_file — Required file containing the signed document to analyze. The file must not be empty and cannot exceed 4.5 MiB (4,718,592 bytes).
source_signature — Required file containing the reference signature. The file must not be empty and cannot exceed 4.5 MiB (4,718,592 bytes).
signer_name — Optional signer name. When provided, it helps locate the relevant signature in the signed document.
Example API call:
curl -X POST "https://[CoreAPI address]/coreApi/v1/validate_signatures" \ -H "Authorization: Bearer {your API key}" \ -F "model=claude-haiku-4-5-20251001 (Anthropic)" \ -F "signed_file=@/full/path/to/signed-document.pdf;type=application/pdf" \ -F "source_signature=@/full/path/to/reference-signature.png;type=image/png" \ -F "signer_name=Bob Demo"
Response:
Status Code: 200 OK
Response fields:
answer — Overall comparison verdict:
MATCH — The signatures are considered a match.
NO_MATCH — The signatures are not considered a match.
UNKNOWN — The available evidence is insufficient for a reliable decision.
explanation — Supporting information for the overall verdict:
match — true for a match, false for a non-match, or null when inconclusive.
reason — Explanation of the overall verdict.
candidates — Signature candidates detected in signed_file.
comparison_candidates — Reference candidates detected in source_signature.
comparisons — Detailed pair-by-pair candidate comparisons.
Each candidate may contain:
page — Page containing the detected signature.
bbox — Bounding-box coordinates within the page or image.
confidence — Confidence of the signature detection.
evidence — Explanation of why the area was identified as a signature.
side — Candidate side or role, when provided.
Each item in comparisons contains:
candidate_index — Zero-based index in candidates.
comparison_candidate_index — Zero-based index in comparison_candidates. This may be null.
result — Pair-specific comparison result:
answer — Pair verdict, normally MATCH, NO_MATCH, or UNKNOWN.
explanation — Detailed supporting information:
match — Boolean or null pair result.
confidence — Confidence in the comparison.
reason — Explanation of the pair verdict.
selected_signature_a — Description of the selected signed-document signature.
selected_signature_b — Description of the selected reference signature.
features_a — Features detected in the signed-document signature.
features_b — Features detected in the reference signature.
shared_features — Features shared by both signatures.
conflicting_features — Features that differ between the signatures.
Response Example:
{ "answer": "MATCH", "explanation": { "match": true, "reason": "The signatures share the same primary stroke structure and identifying features.", "candidates": [ { "page": 1, "bbox": [0.42, 0.15, 0.74, 0.42], "confidence": "high", "evidence": "A handwritten signature was detected above the printed signer name.", "side": "source" } ], "comparison_candidates": [ { "page": 1, "bbox": [0.1, 0.2, 0.8, 0.75], "confidence": "high", "evidence": "A clear reference signature was detected in the uploaded image.", "side": "comparison" } ], "comparisons": [ { "candidate_index": 0, "comparison_candidate_index": 0, "result": { "answer": "MATCH", "explanation": { "match": true, "confidence": "high", "reason": "The signatures have compatible stroke direction, loops, proportions, and terminal flourishes.", "selected_signature_a": "The signature detected above the printed signer name.", "selected_signature_b": "The reference signature detected in the uploaded image.", "features_a": [ "Connected cursive strokes", "Prominent central loop", "Rightward terminal flourish" ], "features_b": [ "Connected cursive strokes", "Prominent central loop", "Rightward terminal flourish" ], "shared_features": [ "Similar overall structure", "Matching central loop", "Similar terminal flourish" ], "conflicting_features": [] } } } ] } }
A 400 Bad Request response may be returned when authentication fails, the request is not multipart/form-data, model is missing or invalid, either required file is missing, empty, duplicated, or oversized, multipart fields are duplicated or malformed, or the signatures cannot be processed.
Postman Samples for all APIs
Attached is the Postman collection with example requests.