Skip to main content
POST
/
api
/
ai
/
v1
/
sentiment
Sentiment Analysis - Beta
curl --request POST \
  --url https://{subdomain}.domo.com/api/ai/v1/sentiment \
  --header 'Content-Type: application/json' \
  --header 'X-DOMO-Developer-Token: <api-key>' \
  --data @- <<EOF
{
  "input": [
    {
      "type": "TEXT",
      "text": "This product is absolutely amazing! The quality exceeded my expectations and the customer service was outstanding. I'm very happy with my purchase."
    }
  ]
}
EOF
{
  "type": "DEFAULT",
  "sentiment": "positive",
  "model": "domo.domo_ai.domogpt-medium-v2.1:anthropic",
  "isCustomerModel": false,
  "sessionId": "34c1b391-1302-4149-89ad-dd5c9a009e89",
  "requestId": "5e2d7a6b-af27-4cf2-9fe8-70cfb90d72c2",
  "modelProviderUsage": null
}

Documentation Index

Fetch the complete documentation index at: https://domoinc-arun-raj-connectors-domo-480626-update-new-field-mi.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-DOMO-Developer-Token
string
header
required

Body

application/json

Request for sentiment analysis using the Messages API.

Supports two modes:

  • Simple sentiment: When topics is null/empty, analyzes overall sentiment
  • Targeted sentiment: When topics provided, analyzes sentiment for each topic

Validation happens primarily in AIValidator, not in this constructor.

input
object[]
required

The input message content to analyze (text, images, documents, etc.)

Text-based message content.

topics
object[]

Optional list of topics for targeted sentiment analysis. When provided, sentiment is analyzed for each topic individually. When omitted or empty, overall sentiment of the content is analyzed. Topic names must start with a letter and contain only letters, numbers, and underscores (e.g., 'customer_service', 'productQuality').

instructions
string

Optional instructions for sentiment analysis behavior

model
string

The ID of the model to use (optional, uses default if not specified)

modelConfiguration
object

Additional model parameters (temperature, max_tokens, etc.)

sessionId
string<uuid>

AI session ID for associating with existing session

reasoningConfig
object

Configuration for reasoning behavior

targetedSentiment
boolean

Returns true if this is a targeted sentiment request (has topics).

simpleSentiment
boolean

Returns true if this is a simple sentiment request (no topics).

Response

Successful sentiment analysis response.

Response for simple sentiment analysis containing overall sentiment.

sentiment
enum<string>

The overall sentiment (POSITIVE, NEGATIVE, NEUTRAL, or NOT_APPLICABLE)

Available options:
positive,
negative,
neutral,
not_applicable
model
string

The ID of the model used

isCustomerModel
boolean

Whether the model is a customer model

sessionId
string<uuid>

The AI session ID

requestId
string<uuid>

The request ID

modelProviderUsage
object

Token usage information