Download OpenAPI specification:Download
The SFConnectAI API
The SFConnectAI API is built on REST principles. It features predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON responses, and adheres to standard HTTP response codes and verbs.
The SFConnectAI API utilizes a Bearer Token for authentication. This token must be included in the Authorization header for every request.
Obtain Token:
Acquire a valid Bearer Token (API Token) from the SFConnectAI Console.
Authorization:
Include the Bearer Token in the Authorization header for each request as follows:
httpCopy codeAuthorization: Bearer <your-token-value>
Replace with the actual token you received from the SFConnectAI Console.
/create/{{prefix}}Creates a new Project under the specified prefix and returns a unique sense_id that can be used for linking services, queries, and resources.
A Project acts as a container for connecting and organizing services, executing queries, and storing metadata. This endpoint allows you to create a new Project by providing a name and region.
Requires a valid Bearer token in the Authorization header.
| Name | Type | Required | Description |
|---|---|---|---|
prefix |
string | โ | Super Prefix used to organize and isolate Projects |
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | โ | A human-readable name for the Project |
region |
string | โ | Region where the Project will be created Available Region: us-east-north-1, aus-southeast-1 |
{
"name": "Customers List",
"region": "us-east-north-1"
}
| prefix required | string |
| Authorization | string |
{- "name": "Products Catalog",
- "region": "us-east-north-1",
- "tier": 1
}/list/{{prefix}}?size={{size}}&page={{page}}Retrieves a paginated list of Projects based on the provided list of sense_ids (super_ids). You can also apply optional filters.
This endpoint returns metadata for multiple Projects identified by their super_ids. It supports pagination and future filtering options. Useful for displaying a list of active or relevant Projects under a given prefix.
No authentication is required for this endpoint unless otherwise configured.
| Name | Type | Required | Description |
|---|---|---|---|
prefix |
string | โ | Super Prefix used to organize and isolate Projects |
| Name | Type | Required | Description |
|---|---|---|---|
size |
integer | โ | Number of records per page |
page |
integer | โ | Page number to retrieve (starting from 1) |
| Field | Type | Required | Description |
|---|---|---|---|
super_ids |
string[] | โ | List of Project IDs (sense_id) to retrieve |
filters |
array | โ | Optional filters for narrowing down the results |
{
"super_ids": [
"3b5516dd-1d69-49e5-8045-983a66026395",
"579c43e4-1414-4c4e-9f11-345f5f6fc78c"
],
"filters": []
}
| prefix required | string |
| size | integer Example: size=10 |
| page | integer Example: page=1 |
{- "super_ids": [
- "3b5516dd-1d69-49e5-8045-983a66026395",
- "579c43e4-1414-4c4e-9f11-345f5f6fc78c",
- "..."
], - "filters": [ ]
}/salesforce/{{prefix}}/{{sense_id}}Connects to a Salesforce account using a refresh token and stores its schema under a specific Project.
This endpoint allows you to integrate a Salesforce account by providing the refresh token and instance URL. It retrieves metadata (objects/schema) from Salesforce and stores both the connection and schema under the specified Project.
No authentication required for this endpoint itself.
Salesforce credentials (refresh_token, instance_url) must be provided in the JSON body.
| Name | Type | Required | Description |
|---|---|---|---|
prefix |
string | โ | Super Prefix used to organize and isolate resources |
sense_id |
string | โ | The unique identifier of the Project to associate the Salesforce schema with |
| Field | Type | Required | Description |
|---|---|---|---|
refresh_token |
string | โ | Salesforce OAuth refresh token |
instance_url |
string | โ | Salesforce instance URL (e.g., https://your-instance.salesforce.com) |
{
"refresh_token": "your_salesforce_refresh_token",
"instance_url": "https://your-instance.salesforce.com"
}
| prefix required | string |
| sense_id required | string |
{- "refresh_token": "your_salesforce_refresh_token",
}/query/{{prefix}}/{{sense_id}}Executes a structured query against an AI-powered data agent and returns the results based on the given instructions.
This endpoint allows you to submit a natural language query (or system prompt) and enrich it with contextual modifications such as URL transformations or prefixing. The result is returned as a stream and typically formatted as a JSON array.
Bearer token must be provided in the Authorization header.
This token authorizes the query execution for a specific session and user.
| Name | Type | Required | Description |
|---|---|---|---|
prefix |
string | โ | Super Prefix used to organize and isolate resources |
sense_id |
string | โ | The unique identifier of the Project powering the query agent |
| Field | Type | Required | Description |
|---|---|---|---|
question |
string | โ | The natural language prompt or question |
enrich_text |
string | โ | Optional enrichment or transformation rules to apply on output |
session_id |
string | โ | Optional session context ID. If omitted, a new session will be generated |
{
"question": "Give me the list of cases in the past 24 hours. Respond ONLY with a clean JSON array, without any text. Each record should have fields: case_number, case subject, case_owner, and url.",
"enrich_text": "prefix the url with https://supersense-demo.my.salesforce.com for records\nalso replace services/data/v59.0/sobject with lightning/r\nand tail it with \"/view\"",
"session_id": "711b86bb-36f4-4eb4-9f0b-88a96cae1111"
}
| prefix required | string |
| sense_id required | string |