POST
/
v1
/
sms
/
analyze
SMS Conversation Analysis
curl --request POST \
  --url https://api.bland.ai/v1/sms/analyze \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "schema_id": "<string>",
  "conversation_id": "<string>"
}'
{
    "data": {
        "status": "success",
        "conversation_id": "conv_123456",
        "schema_id": "schema_789",
        "schema_name": "Customer Intent Analysis",
        "variables_extracted": 5,
        "extracted_variables": {
            "customer_name": "John Smith",
            "preferred_time": "morning",
            "service_type": "moving",
            "urgency": "high",
            "budget_range": "$500-1000"
        },
        "citations": [
            {
                "variable": "customer_name",
                "message": "Hi, this is John Smith calling about...",
                "confidence": 0.95
            }
        ],
        "messages_processed": 12
    },
    "errors": []
}

Headers

authorization
string
required
Your API key for authentication.

Body

schema_id
string
required
The ID of the citation schema to use for extracting variables from the SMS conversation.
conversation_id
string
required
The ID of the SMS conversation to analyze.

Response

data
object
The response data containing analysis results.
errors
array
An array of error objects. Empty array when the request is successful.
{
    "data": {
        "status": "success",
        "conversation_id": "conv_123456",
        "schema_id": "schema_789",
        "schema_name": "Customer Intent Analysis",
        "variables_extracted": 5,
        "extracted_variables": {
            "customer_name": "John Smith",
            "preferred_time": "morning",
            "service_type": "moving",
            "urgency": "high",
            "budget_range": "$500-1000"
        },
        "citations": [
            {
                "variable": "customer_name",
                "message": "Hi, this is John Smith calling about...",
                "confidence": 0.95
            }
        ],
        "messages_processed": 12
    },
    "errors": []
}