Salesforce Connect AI Docs (1.0.0)

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.

Authentication

The SFConnectAI API utilizes a Bearer Token for authentication. This token must be included in the Authorization header for every request.

Bearer Token

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.

Projects

Manage SFConnectAIs

Create

๐Ÿง  Create Project

POST /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.


๐Ÿ” Description

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.


๐Ÿ” Authentication

Requires a valid Bearer token in the Authorization header.


๐Ÿงพ Path Parameters

Name Type Required Description
prefix string โœ… Super Prefix used to organize and isolate Projects

๐Ÿ“ฅ Request Body (application/json)

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

๐Ÿ“ฆ Example Request Body

{
  "name": "Customers List",
  "region": "us-east-north-1"
}
path Parameters
prefix
required
string
header Parameters
Authorization
string
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "name": "Products Catalog",
  • "region": "us-east-north-1",
  • "tier": 1
}

List

๐Ÿ“‹ List Projects

POST /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.


๐Ÿ” Description

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.


๐Ÿ” Authentication

No authentication is required for this endpoint unless otherwise configured.


๐Ÿงพ Path Parameters

Name Type Required Description
prefix string โœ… Super Prefix used to organize and isolate Projects

๐Ÿ” Query Parameters

Name Type Required Description
size integer โœ… Number of records per page
page integer โœ… Page number to retrieve (starting from 1)

๐Ÿ“ฅ Request Body (application/json)

Field Type Required Description
super_ids string[] โœ… List of Project IDs (sense_id) to retrieve
filters array โŒ Optional filters for narrowing down the results

๐Ÿ“ฆ Example Request Body

{
  "super_ids": [
    "3b5516dd-1d69-49e5-8045-983a66026395",
    "579c43e4-1414-4c4e-9f11-345f5f6fc78c"
  ],
  "filters": []
}
path Parameters
prefix
required
string
query Parameters
size
integer
Example: size=10
page
integer
Example: page=1
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "super_ids": [
    ],
  • "filters": [ ]
}

Project Resources

List Resources

path Parameters
prefix
required
string
sense_id
required
string

Responses

Resource

path Parameters
prefix
required
string
sense_id
required
string
header Parameters
Authorization
string

Responses

Manually Create Connection to an Org

๐Ÿงฉ Salesforce Integration API

POST /salesforce/{{prefix}}/{{sense_id}}

Connects to a Salesforce account using a refresh token and stores its schema under a specific Project.


๐Ÿ” Description

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.


๐Ÿ” Authentication

No authentication required for this endpoint itself.
Salesforce credentials (refresh_token, instance_url) must be provided in the JSON body.


๐Ÿงพ Path Parameters

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

๐Ÿ“ฅ Request Body (application/json)

Field Type Required Description
refresh_token string โœ… Salesforce OAuth refresh token
instance_url string โœ… Salesforce instance URL (e.g., https://your-instance.salesforce.com)

๐Ÿ“ฆ Example Request Body

{
  "refresh_token": "your_salesforce_refresh_token",
  "instance_url": "https://your-instance.salesforce.com"
}
path Parameters
prefix
required
string
sense_id
required
string
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Query

Query

๐Ÿค– Query Execution API

POST /query/{{prefix}}/{{sense_id}}

Executes a structured query against an AI-powered data agent and returns the results based on the given instructions.


๐Ÿ” Description

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.


๐Ÿ” Authentication

Bearer token must be provided in the Authorization header.
This token authorizes the query execution for a specific session and user.


๐Ÿงพ Path Parameters

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

๐Ÿ“ฅ Form Data (multipart/form-data)

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

๐Ÿ“ฆ Example Request Body

{
  "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"
}
path Parameters
prefix
required
string
sense_id
required
string

Responses