# Ask a Question

> Asks Archie a question in a Topic's conversation and waits for the answer. It needs topicid and question, and it waits up to timeoutseconds, which…

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_id string Required

Topic permakey (preferred) or UUID

question string Required

The question to ask in the topic's conversation, from 1 to 20000 characters.

conversation_id string

Existing conversation in the topic; omitted = the topic's most-recent conversation, auto-created+linked if none exists

timeout_seconds integer · default 120

Seconds to wait for the final answer before returning with status running, from 10 to 300 (default 120).

Returns

Skill executed successfully

skill string Required

Example topic_ask

output object Required

output.stub_fields array of strings

output.warnings array of strings

output.topic_id string · default

The topic's permakey (the public id).

output.permakey string · default

The 7-char public topic id — THE id to show users and reuse in later topic_* calls (UUIDs are internal).

output.conversation_id string · default

output.message_id string · default

output.query_id string · default

output.status string · default

output.answer string · default

output.metadata object

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Previous ← Archive a Topic](https://heyarchie.com/en-gb/developers/api-reference/topics/archive-a-topic/)[Next Create a Topic in the Caller's Workspace →](https://heyarchie.com/en-gb/developers/api-reference/topics/create-a-topic-in-the-callers-workspace/)

```
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>"
  }
}
```

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