# Post a Message

> Posts a message into a Topic's conversation and sends it to Archie for an answer. It needs topicid and message, and it returns at once with messageid and…

POST /api/v1/skills/topic.post.message/invoke

Posts a message into a Topic's conversation and sends it to Archie for an answer. It needs topic_id and message, and it returns at once with message_id and query_id instead of waiting. Read the answer later with topic.messages. When the topic has no conversation yet, one is created and linked for you.

Body parameters

topic_id string Required

Topic permakey (preferred) or UUID

message string Required

The message text to post into 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

Returns

Skill executed successfully

skill string Required

Example topic_post_message

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 submitted

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 ← Read a Topic Conversation's Messages](https://heyarchie.com/en-gb/developers/api-reference/topics/read-a-topic-conversations-messages/)[Next Update a Topic's Metadata →](https://heyarchie.com/en-gb/developers/api-reference/topics/update-a-topics-metadata/)

```
curl https://uk.heyarchie.com/api/v1/skills/topic.post.message/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "topic_id": "string",
       "message": "string",
       "conversation_id": null
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "topic.post.message",
    topic_id="string",
    message="string",
    conversation_id=None,
)
print(result)
```

```
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("topic.post.message", {
  "topic_id": "string",
  "message": "string",
  "conversation_id": null
});
console.log(result);
```

Response

```
{
  "skill": "topic_post_message",
  "output": {
    "conversation_id": "7d1e4a9c-2b36-4f58-8a0d-6c3e9b5f1a27",
    "message_id": "b5a3c7e1-9d24-4e68-a1f0-3c8d2e6b4a95",
    "permakey": "K7M2QX9",
    "query_id": "e2c4a6b8-1d3f-4579-8b0a-9c7e5d3f1a24",
    "status": "submitted",
    "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.
