v1
latestOpenAPI 3.0.02026-07-174565114.3 KBthreads
Generate new suggestions
Generates and stores new suggestions for a specific message
post/threads/{id}/messages/{messageId}/suggestions
Path parameters
idstring required
Example:thread_123456789
ID of the thread to generate suggestions for
messageIdstring required
Example:msg_123456789
ID of the message to generate suggestions for
Request body
Example request
{
"availableComponents": [
{
"name": "Button",
"description": "A clickable button component",
"contextTools": [
{
"name": "fetchData",
"description": "Fetches data for the button",
"parameters": []
}
],
"props": {
"variant": "primary",
"size": "medium"
}
}
]
}Response
New suggestions generated successfully
Example response
[
{
"id": "sug_123456789",
"messageId": "msg_123456789",
"title": "Add error handling",
"detailedSuggestion": "Add try-catch block to handle potential API errors",
"description": "Add try-catch block to handle potential API errors",
"metadata": {
"category": "error-handling",
"priority": "high"
}
}
]