POST api/Village/{village}/AI/Message

Post a new AI chat history message

Request Information

URI Parameters

NameDescriptionTypeAdditional information
village

string

None.

Body Parameters

AIChatHistoryEditModel
NameDescriptionTypeAdditional information
Role

Role (0 = User, 1 = AI Assistant, 2 = Caring Village Assistant

ChatHistoryRole

None.

Content

Message content

string

None.

Date

Date message was posted

date

None.

Request Formats

application/json, text/json

Sample:
{
  "Role": 0,
  "Content": "sample string 1",
  "Date": "2025-06-03T04:38:05.705+00:00"
}

application/xml, text/xml

Sample:
<AIChatHistoryEditModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models">
  <Content>sample string 1</Content>
  <Date>2025-06-03T04:38:05.7056812+00:00</Date>
  <Role>User</Role>
</AIChatHistoryEditModel>

multipart/form-data

Sample:

Failed to generate the sample for media type 'multipart/form-data'. Cannot use formatter 'MultipartMediaTypeFormatter' to write type 'AIChatHistoryEditModel'.

Response Information

Resource Description

AIChatHistoryModel
NameDescriptionTypeAdditional information
Id

Message ID

globally unique identifier

None.

VillageId

Village ID

globally unique identifier

None.

UserId

User ID

globally unique identifier

None.

Role

Role (0 = User, 1 = AI Assistant, 2 = Caring Village Assistant

ChatHistoryRole

None.

Content

Message content

string

None.

Date

Date message was posted

date

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "fed8aa82-dd06-4e9b-add4-89ada55537cf",
  "VillageId": "e8557080-95c7-4f65-9063-53b7cb664a49",
  "UserId": "15092e71-921a-484f-b438-a430f3e45610",
  "Role": 0,
  "Content": "sample string 4",
  "Date": "2025-06-03T04:38:05.721+00:00"
}

application/xml, text/xml

Sample:
<AIChatHistoryModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models">
  <Content>sample string 4</Content>
  <Date>2025-06-03T04:38:05.7213136+00:00</Date>
  <Role>User</Role>
  <Id>fed8aa82-dd06-4e9b-add4-89ada55537cf</Id>
  <UserId>15092e71-921a-484f-b438-a430f3e45610</UserId>
  <VillageId>e8557080-95c7-4f65-9063-53b7cb664a49</VillageId>
</AIChatHistoryModel>