> For the complete documentation index, see [llms.txt](https://docs.epic-ai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.epic-ai.com/api-dokumentation/chatbot-expressions.md).

# Chatbot Expressions

## Lists and filters user inputs (expressions)

> \
> \
> \*\*Required Permission:\*\* \`chatbots.expressions.list\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Chatbot expressions","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/chatbots/{chatbotId}/expressions":{"get":{"operationId":"ChatbotExpressionController_listExpressions[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"The limit for how many examples should be fetched.","schema":{"type":"number"}},{"name":"pageToken","required":false,"in":"query","description":"The date after which to filter examples. Only examples after this date will be fetched.","schema":{"type":"string"}},{"name":"intentId","required":false,"in":"query","description":"Filters by a specific intent ID.","schema":{"type":"string"}},{"name":"maxScore","required":false,"in":"query","description":"Filters for expressions with a confidence score less than or equal to this value.","schema":{"type":"number"}},{"name":"language","required":false,"in":"query","description":"The language of the examples.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of expressions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExpressionsResponseDto"}}}},"403":{"description":"Insufficient permissions."}},"summary":"Lists and filters user inputs (expressions)","tags":["Chatbot expressions"],"description":"\n\n**Required Permission:** `chatbots.expressions.list`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"ListExpressionsResponseDto":{"type":"object","properties":{"pageToken":{"type":"string","description":"The date of the latest fetched example."},"expressions":{"description":"A list of expressions.","type":"array","items":{"$ref":"#/components/schemas/ExpressionDto"}},"error":{"type":"string","description":"Optional error message."}},"required":["pageToken","expressions"]},"ExpressionDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the expression."},"created":{"type":"string","description":"The creation timestamp of the expression."},"expression":{"type":"string","description":"The original text of the user input."},"intents":{"description":"List of intents recognized for this expression.","type":"array","items":{"$ref":"#/components/schemas/ExpressionIntentDto"}},"predictedIntentId":{"type":"string","description":"The ID of the intent that was ultimately selected as the prediction."},"predictionScore":{"type":"number","minimum":0,"maximum":1,"description":"The confidence score of the top prediction."},"requiredIntentPredictionScore":{"type":"number","minimum":0,"maximum":1,"description":"The minimum required confidence score for this intent."},"topIntent":{"description":"The intent with the highest confidence.","allOf":[{"$ref":"#/components/schemas/ExpressionIntentDto"}]},"versionId":{"type":"string","description":"The version ID of the chatbot model."},"language":{"type":"string","description":"The language of the expression."},"conversationId":{"type":"string","description":"The ID of the conversation this expression belongs to."}},"required":["id","created","expression","intents","predictedIntentId","predictionScore","requiredIntentPredictionScore","topIntent","language","conversationId"]},"ExpressionIntentDto":{"type":"object","properties":{"category":{"type":"string","description":"The category/name of the intent."},"confidenceScore":{"type":"number","minimum":0,"maximum":1,"description":"The confidence score of the prediction for this intent."}},"required":["category","confidenceScore"]}}}}
```

## Retrieves statistics for recorded expressions

> \
> \
> \*\*Required Permission:\*\* \`chatbots.expressions.list\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Chatbot expressions","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/chatbots/{chatbotId}/expressions/stats":{"get":{"operationId":"ChatbotExpressionController_getExpressionStats[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}}],"responses":{"200":{"description":"Statistical evaluation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExpressionStatsResponseDto"}}}},"403":{"description":"Insufficient permissions."}},"summary":"Retrieves statistics for recorded expressions","tags":["Chatbot expressions"],"description":"\n\n**Required Permission:** `chatbots.expressions.list`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"GetExpressionStatsResponseDto":{"type":"object","properties":{"total":{"type":"number","description":"Total number of expressions."},"averagePredictionScore":{"type":"number","minimum":0,"maximum":1,"description":"Average confidence score of all expressions."},"totals":{"type":"object","description":"Distribution of expressions by confidence buckets.","additionalProperties":{"type":"number"}},"error":{"type":"string","description":"Optional error message."}},"required":["total","averagePredictionScore","totals"]}}}}
```

## Deletes an expression

> \
> \
> \*\*Required Permission:\*\* \`chatbots.expressions.delete\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Chatbot expressions","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/chatbots/{chatbotId}/expressions/{expressionId}":{"delete":{"operationId":"ChatbotExpressionController_deleteExpression[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}},{"name":"expressionId","required":true,"in":"path","description":"The ID of the expression to delete.","schema":{"type":"string"}}],"responses":{"200":{"description":"Result of the deletion process.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteExpressionResponseDto"}}}},"403":{"description":"Insufficient permissions."}},"summary":"Deletes an expression","tags":["Chatbot expressions"],"description":"\n\n**Required Permission:** `chatbots.expressions.delete`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"DeleteExpressionResponseDto":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Indicates whether the deletion was successful."},"error":{"type":"string","description":"Optional error message."}},"required":["deleted"]}}}}
```
