POST /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/share
Shares a saved Spotter conversation, grants or revokes access to a shared conversation for one or more principals.
Available on ThoughtSpot Cloud instances from 26.9.0.cl onwards.
Spotter agent conversation sharing APIs
You can share a Spotter conversation with other users and groups and manage shared content programmatically using REST API endpoints.
Supported endpoints🔗
|
|
For information about creating, saving, and managing saved conversation, see Spotter agent conversation APIs and APIs for managing saved conversations.
Required privileges🔗
-
To use these APIs, you need the
CAN_USE_SPOTTER(Can use Spotter) privilege. -
To share a conversation or view the sharing status, you must be the owner of the conversation. Only the user who created the conversation can manage its share access.
-
To retrieve shared content, you must be the conversation owner or a principal (user or group) that has been granted access.
|
Note
|
The shared view is a read-only snapshot of the conversation at the time of sharing. Recipients cannot send messages or modify the conversation. |
Share a conversation🔗
To share a conversation with other ThoughtSpot users and groups, refresh shared content, or revoke access, send a POST request to the /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/share endpoint. When principals are added, ThoughtSpot creates a read-only shared view of the conversation from its current state.
The conversation to share is identified by the conversation_identifier URL path parameter. In your API request, you must include the GUID of the saved Spotter conversation as a path parameter and add the attributes to grant or revoke access in the request body.
|
Note
|
Do not include the same principal identifiers in both |
Request parameters🔗
| Parameter | Description |
|---|---|
| Array of strings. Array of principals to grant access to the conversation specified in the request. Specify |
| Array of strings. Principals to revoke access from. Specify |
| Boolean. When set to |
Request examples🔗
- Grant access to a conversation
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/share' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"refresh_shared_content": false,
"grant": [
{ "principal_identifier": "user-001", "principal_type": "USER" },
{ "principal_identifier": "group-001", "principal_type": "USER_GROUP" }
],
"revoke": []
}'
- Revoke access granted to a shared conversation
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/share' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"refresh_shared_content": false,
"grant": [],
"revoke": [
{ "principal_identifier": "user-001", "principal_type": "USER" },
{ "principal_identifier": "group-001", "principal_type": "USER_GROUP" }
]
}'
- Refresh shared content
-
To regenerate the shared snapshot for existing recipients without changing access, set
refresh_shared_contenttotruewith emptygrantandrevokearrays.curl -X POST \ --url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/share' \ -H 'Authorization: Bearer {access-token}' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --data-raw '{ "refresh_shared_content": true, "grant": [], "revoke": [] }' - Refresh shared content and update access details
-
To update access and refresh the snapshot in a single call, combine
refresh_shared_content: truewith the recipient details in thegrantorrevokearray.
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/share' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"refresh_shared_content": true,
"grant": [
{ "principal_identifier": "user-002", "principal_type": "USER" },
{ "principal_identifier": "group-002", "principal_type": "USER_GROUP" }
]
}'
API response🔗
If the request is successful, ThoughtSpot returns a 204 response code.
Get shared conversation content🔗
To retrieve the full read-only view of a shared conversation, including ordered messages and data source metadata, send a GET request to the /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/get-shared-content endpoint. This endpoint is accessible to the conversation owner and any principal that has been granted access.
Use this endpoint to render a shared conversation in a UI or to retrieve its content for post-processing.
Request parameters🔗
| Parameter | Type | Description |
|---|---|---|
| String | The unique ID of the source conversation. |
Example request🔗
curl -X GET \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/get-shared-content' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
API response🔗
If the request is successful, the API returns the shared conversation content with the following fields:
{
"conversation_id": "conv-abc-123",
"shared_conversation_id": "snap-xyz-456",
"conversation_title": "Sales by Region Q1",
"creator_user_id": "5d3e6cc7-2f4a-4b0e-9a1c-8f2b6d4e7a10",
"data_sources": [{ "id": "ds-001", "name": "Retail Sales" }],
"analyst_ids": ["spot-7f2a"],
"messages": [
{
"message_id": "node-u-01",
"timestamp_in_millis": 1744000000000,
"user_prompt": {
"message": {
"message_id": "msg-u-01",
"content": "Show me revenue by region."
},
"attachments": []
},
"response_items": [
{
"type": "tool_call",
"tool_call_id": "toolu-01",
"tool_name": "search_datasets",
"step_title": "Searching datasets",
"arguments": { "query": "revenue by region" },
"timestamp_in_millis": 1744000001000,
"is_thinking": false
},
{
"type": "answer",
"answer_id": "ans-01",
"tool_call_id": "toolu-02",
"tool_name": "fetch_and_visualize",
"step_title": "Visualizing",
"timestamp_in_millis": 1744000004000,
"is_thinking": false
},
{
"type": "text",
"content": "Revenue is highest in APAC.",
"content_type": "TEXT_MARKDOWN",
"timestamp_in_millis": 1744000005000,
"is_thinking": false,
"step_title": null,
"file_reference": null
}
]
}
],
"code_execution_files": [
{
"file_id": "revenue_by_region.csv",
"display_name": "revenue_by_region.csv",
"file_type": "csv",
"created_time_in_millis": 1744027200000,
"expired": false
}
]
}
Response fields🔗
| Field | Description |
|---|---|
| String. Conversation ID sent in the request parameter. |
| String. Id of the shared snapshot. This is not the same as |
| String. Display title of the conversation. |
| String. Id of the user who created and shared the conversation. This is the original creator, not the caller retrieving the shared content. |
| Array of strings. Array of data sources used by the conversation. Each entry includes the |
| Array of strings. Array of the identifiers of the AI analysts the conversation ran against. An analyst is a purpose-built agent configured over a set of data sources, with its own instructions and access rules. An empty array is returned if the conversation is not associated with any analyst. |
| Array of conversation messages. Ordered conversation messages, from oldest to newest. The structure is the same as returned by the get conversation endpoint. An empty array is returned when the conversation has no messages. |
| Array of code execution files. Sanitized metadata for files generated by the code execution tool. Each entry in the * If there are no code execution steps, an empty array is returned. |
Load answer payloads from a shared view🔗
The full answer payload is not embedded in messages. Each answer response item in messages[].response_items contains an answer_id field. To retrieve the full answer payload, call loadAnswer with:
-
conversation_identifier: theshared_conversation_idvalue from this response. -
answer_id: theanswer_idfrom theanswerresponse item.
|
Important
|
|
Get share information🔗
To view the current share state of a conversation you own, send a GET request to the /api/rest/2.0/ai/agent/conversations/{conversation_identifier}/get-share-info endpoint. The response shows whether the shared view reflects the latest conversation content and lists the principals that currently have access.
Use this endpoint to render a share management UI, audit who has access to a conversation, or determine whether the shared view needs to be refreshed before sending a link.
Request parameters🔗
| Parameter | Description |
|---|---|
| String. The unique ID of the conversation, as returned when creating a conversation or listing conversations. |
Example request🔗
curl -X GET \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/ai/agent/conversations/{conversation_identifier}/get-share-info' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'
API response🔗
The following example shows the response for a conversation that is shared and current:
{
"conversation_id": "conv-abc-123",
"is_shared_content_outdated": false,
"principals": [
{
"id": "user-001",
"type": "USER",
"display_name": "Alice Example",
"name": "alice.example",
"permission": "READ_ONLY"
},
{
"id": "group-001",
"type": "USER_GROUP",
"display_name": "Sales Team",
"name": "sales-team",
"permission": "READ_ONLY"
}
]
}
The following example shows the response for a conversation that has never been shared:
{
"conversation_id": "conv-abc-123",
"is_shared_content_outdated": null,
"principals": []
}
When is_shared_content_outdated is true, call the share endpoint with refresh_shared_content: true to update the shared view with the latest conversation content.
Response fields🔗
| Field | Description |
|---|---|
| String. Echoes the request parameter. |
| Boolean.
|
| Array of strings. List of principals with access. Empty when no access has been granted. The conversation owner is never included. Each entry in the * |