Talk with Archie
API reference › Topics
Skills › Topics

Ask a Question

POST/api/v1/skills/topic.ask/invoke
Asks Archie a question in a Topic's conversation and waits for the answer. It needs topic_id and question, and it waits up to timeout_seconds, which defaults to 120. If the answer is not ready in time it returns status running with the ids to poll while the turn carries on, and topic.messages reads the answer once it is done. When it finishes in time it returns status completed with the answer.
Body parameters
topic_idstringRequired
Topic permakey (preferred) or UUID
questionstringRequired
The question to ask in the topic's conversation, from 1 to 20000 characters.
conversation_idstring
Existing conversation in the topic; omitted = the topic's most-recent conversation, auto-created+linked if none exists
timeout_secondsinteger · default 120
Seconds to wait for the final answer before returning with status running, from 10 to 300 (default 120).
Returns

Skill executed successfully

skillstringRequired
Example topic_ask
outputobjectRequired
output.stub_fieldsarray of strings
output.warningsarray of strings
output.topic_idstring · default
The topic's permakey (the public id).
output.permakeystring · default
The 7-char public topic id — THE id to show users and reuse in later topic_* calls (UUIDs are internal).
output.conversation_idstring · default
output.message_idstring · default
output.query_idstring · default
output.statusstring · default
output.answerstring · default
output.metadataobject
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALIDAuthentication required
403PERMISSION.CAPABILITY_DENIEDInsufficient permissions
404SKILL.NOT_FOUNDSkill not found
422VALIDATION.INVALID_FORMATValidation error
429RATE_LIMIT.USERRate limit exceeded
5XXINTERNAL.UNKNOWNInternal server error
curl https://uk.heyarchie.com/api/v1/skills/topic.ask/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "topic_id": "string",
       "question": "string",
       "conversation_id": null,
       "timeout_seconds": 0
     }'
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "topic.ask",
    topic_id="string",
    question="string",
    conversation_id=None,
    timeout_seconds=0,
)
print(result)
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("topic.ask", {
  "topic_id": "string",
  "question": "string",
  "conversation_id": null,
  "timeout_seconds": 0
});
console.log(result);
Response
{
  "skill": "topic_ask",
  "output": {
    "answer": "Corporation tax for the year ended 31 December 2026 is payable by 1 October 2027, and the return is due by 31 December 2027.",
    "conversation_id": "7d1e4a9c-2b36-4f58-8a0d-6c3e9b5f1a27",
    "message_id": "b5a3c7e1-9d24-4e68-a1f0-3c8d2e6b4a95",
    "permakey": "K7M2QX9",
    "query_id": "e2c4a6b8-1d3f-4579-8b0a-9c7e5d3f1a24",
    "status": "completed",
    "topic_id": "K7M2QX9"
  },
  "correlation_id": "<string>"
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}

Every response also carries X-Request-ID. Quote it if you write to us about a call.