Skip to content

The Questions API manages inter-session question requests generated by the AI agent. Use these endpoints to list pending questions, reply with user selections, reject questions, or consult a separate AI model for an automated recommendation.


GET /api/v1/workspaces/{workspaceID}/questions

Section titled “GET /api/v1/workspaces/{workspaceID}/questions”

Get all pending question requests across all sessions.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
[
{
"id": "que_a1b2c3d4e5f6g7h8i9j0k1l2",
"sessionID": "5f9e3c2a1b8d4f7e6a5b3c2d1e",
"questions": [
{
"question": "Which authentication method should the new service use?",
"header": "Auth method",
"options": [
{
"label": "OAuth 2.0",
"description": "Industry standard, supports delegated authorization"
},
{
"label": "API Keys",
"description": "Simple to implement, ideal for server-to-server"
},
{
"label": "JWT tokens",
"description": "Stateless, no session storage required"
}
],
"multiple": false,
"custom": true
}
],
"tool": {
"messageID": "msg_8x7y6z5w4v3u2t1s0r9q8p7o",
"callID": "call_3a4b5c6d7e8f9g0h1i2j3k4l"
}
}
]
const questions = await client.agent.questions.list({
workspaceID: "ws_5f9e3c2a1b8d4f7e6a5b3c2d",
});
Terminal window
curl -X GET "https://api.hoody.com/api/v1/workspaces/ws_5f9e3c2a1b8d4f7e6a5b3c2d/questions" \
-H "Authorization: Bearer <token>"

POST /api/v1/workspaces/{workspaceID}/questions/{requestID}/consult

Section titled “POST /api/v1/workspaces/{workspaceID}/questions/{requestID}/consult”

Ask a separate AI model for advice on how to answer a pending question. This is a stateless one-shot call — no session is created and the parent agent is unaware of the consultation.

NameInTypeRequiredDescription
requestIDpathstringYesQuestion request identifier
workspaceIDpathstringYesWorkspace identifier
FieldTypeRequiredDescription
providerIDstringYesIdentifier of the AI provider to consult
modelIDstringYesIdentifier of the model to consult
notestringNoAdditional context for the consultant model
questionIndexintegerNoIndex of a specific question within the request to consult on (0-based)
systemstringNoCustom system prompt to guide the consultation
{
"providerID": "anthropic",
"modelID": "claude-sonnet-4-20250514",
"note": "The project uses a microservices architecture with strict compliance requirements",
"questionIndex": 0,
"system": "You are advising on a software architecture decision. Be concise."
}
{
"recommendation": ["OAuth 2.0"],
"reasoning": "OAuth 2.0 provides the strongest security guarantees for a multi-tenant API while supporting future integrations with third-party clients without requiring significant rework.",
"confidence": "high",
"usage": {
"promptTokens": 312,
"completionTokens": 88,
"totalTokens": 400
}
}
const result = await client.agent.questions.consult({
workspaceID: "ws_5f9e3c2a1b8d4f7e6a5b3c2d",
requestID: "que_a1b2c3d4e5f6g7h8i9j0k1l2",
data: {
providerID: "anthropic",
modelID: "claude-sonnet-4-20250514",
note: "The project uses a microservices architecture with strict compliance requirements",
questionIndex: 0,
system: "You are advising on a software architecture decision. Be concise.",
},
});
Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/ws_5f9e3c2a1b8d4f7e6a5b3c2d/questions/que_a1b2c3d4e5f6g7h8i9j0k1l2/consult" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"providerID": "anthropic",
"modelID": "claude-sonnet-4-20250514",
"note": "The project uses a microservices architecture with strict compliance requirements"
}'

POST /api/v1/workspaces/{workspaceID}/questions/{requestID}/reject

Section titled “POST /api/v1/workspaces/{workspaceID}/questions/{requestID}/reject”

Reject a question request from the AI assistant. The request is marked as declined and the originating session is notified.

NameInTypeRequiredDescription
requestIDpathstringYesQuestion request identifier
workspaceIDpathstringYesWorkspace identifier

This endpoint takes no parameters in the path beyond those listed above and accepts no request body.

true
const rejected = await client.agent.questions.reject({
workspaceID: "ws_5f9e3c2a1b8d4f7e6a5b3c2d",
requestID: "que_a1b2c3d4e5f6g7h8i9j0k1l2",
});
Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/ws_5f9e3c2a1b8d4f7e6a5b3c2d/questions/que_a1b2c3d4e5f6g7h8i9j0k1l2/reject" \
-H "Authorization: Bearer <token>"

POST /api/v1/workspaces/{workspaceID}/questions/{requestID}/reply

Section titled “POST /api/v1/workspaces/{workspaceID}/questions/{requestID}/reply”

Provide answers to a question request from the AI assistant. Answers are supplied as an array of selections, ordered to match the questions in the request.

NameInTypeRequiredDescription
requestIDpathstringYesQuestion request identifier
workspaceIDpathstringYesWorkspace identifier
FieldTypeRequiredDescription
answersarrayYesUser answers in order of questions. Each answer is an array of selected label strings.
{
"answers": [
["OAuth 2.0"],
["PostgreSQL", "Redis"]
]
}
true
const replied = await client.agent.questions.reply({
workspaceID: "ws_5f9e3c2a1b8d4f7e6a5b3c2d",
requestID: "que_a1b2c3d4e5f6g7h8i9j0k1l2",
data: {
answers: [
["OAuth 2.0"],
["PostgreSQL", "Redis"],
],
},
});
Terminal window
curl -X POST "https://api.hoody.com/api/v1/workspaces/ws_5f9e3c2a1b8d4f7e6a5b3c2d/questions/que_a1b2c3d4e5f6g7h8i9j0k1l2/reply" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"answers": [
["OAuth 2.0"],
["PostgreSQL", "Redis"]
]
}'