---
updatedAt: 2026-08-06T09:23:13.000Z
agentTools:
  projectIndex: https://developers.alcmeon.com/llms.txt
---

# Provide statistics about a suggested answer

Provide statistics about a suggested answer

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "AI Webhooks",
    "version": "1.0"
  },
  "x-readme": {
    "explorer-enabled": false
  },
  "components": {
    "schemas": {
      "HTTPError": {
        "properties": {
          "detail": {
            "type": "object"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "detail": {
            "type": "object",
            "properties": {
              "<location>": {
                "type": "object",
                "properties": {
                  "<field_name>": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResponseOk": {
        "type": "string",
        "enum": [
          "ok"
        ]
      },
      "RateLimitResponseError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Rate limit reached"
          },
          "details": {
            "type": "string",
            "description": "A string showing the time when the rate limit will be reset. Example: {'rate_limited_until': '2024-01-22T13:05:41Z'}\n"
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/suggest-stats": {
      "post": {
        "tags": [
          "Suggest Statistics"
        ],
        "summary": "Provide statistics about a suggested answer",
        "description": "Provide statistics about a suggested answer",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "version",
                  "question",
                  "context",
                  "suggestion",
                  "suggestion_id",
                  "status"
                ],
                "properties": {
                  "version": {
                    "type": "string",
                    "enum": [
                      "1.0"
                    ],
                    "description": "Version of the API"
                  },
                  "question": {
                    "type": "string",
                    "description": "Last user question"
                  },
                  "context": {
                    "description": "The context of the conversation. For performance reason, only the last 100 items are returned.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "bot",
                            "adviser",
                            "user",
                            "system"
                          ],
                          "description": "Type of context item"
                        },
                        "content": {
                          "type": "string",
                          "description": "The content of the item. For `system` item, it's in the form `key=value`, with one of the following keys:\n- `adviser_lang`: Language used by the agent - `adviser_user_id`: Agent id - `adviser_user_name`: Agent name - `user_id`: User id - `user_external_id`: External user id (depending on the channel) - `user_name`: User name - `user_site_id`: Channel id - `user_site_name`: Channel name - `custom_field_i`: User custom_field_i value, i being the unique id of the custom field. - `adviser_gender`: Agent gender as an integer, possible values 0,1,2,3,9. 0: unknown, 1: male, 2: female, 3: prefer not to say, 9: neutral (based on https://en.wikipedia.org/wiki/ISO/IEC_5218)\n"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date of the item creation."
                        }
                      }
                    }
                  },
                  "suggestion": {
                    "type": "string",
                    "description": "AI Generated Suggestion"
                  },
                  "suggestion_id": {
                    "type": "string",
                    "description": "id of the generated suggestion"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "rejected",
                      "accepted",
                      "edited"
                    ],
                    "description": "Status of the suggestion: - `rejected`: Rejected by the agent - `accepted`: Accepted by the agent and sent directly - `edited`: Accepted by the agent and edited before being sent.\n"
                  },
                  "answer": {
                    "description": "Answer sent by the agent if the suggestion was not rejected.",
                    "type": "string"
                  }
                },
                "example": {
                  "version": "1.0",
                  "question": "The question",
                  "context": [
                    {
                      "role": "user",
                      "content": "The question",
                      "date": "2024-01-18 08:25:36"
                    },
                    {
                      "role": "adviser",
                      "content": "This is my answer",
                      "date": "2024-01-22 13:05:41"
                    },
                    {
                      "role": "system",
                      "content": "adviser_lang=en",
                      "date": "2024-01-22 13:05:41"
                    }
                  ],
                  "suggestion": "This is my answer",
                  "suggestion_id": "1234",
                  "status": "accepted",
                  "answer": "This is my answer"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseOk"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "429": {
            "description": "Rate limit reached. Default limit is set to 15 requests per minute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    }
  }
}
```