Add message to HCS topic endpoint
POST /v2/hcs/topic/{topicId}/message
POST
/v2/hcs/topic/{topicId}/message
Add a new message to an existing HCS topic endpoint.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” topicId
required
string
Topic UUID
Header Parameters
Section titled “Header Parameters ” X-API-Key
string
API Key
X-API-Secret
string
API Secret
Request Body required
Section titled “Request Body required ”object
topicId
required
The topic UUID
string
123e4567-e89b-12d3-a456-426614174000
eventName
required
The event name
string
InvoiceCreated
attributes
The attributes for the event
Array<object>
object
[ { "dataType": "string", "hash": "123e4567-e89b-12d3-a456-426614174000" }]
Responses
Section titled “ Responses ”Message has been added to the topic. If the response is empty, it means the message is not added yet, you have to use webhook to subscribe the event, or to get the message id, you can use the getHcsTopicMessageV2 endpoint.
object
id
required
The Message Id
string
topicId
required
The topic UUID
string
message
The message published on Hedera Consensus Service topic
string
url
The link to the network message
string
event
required
The name of the event
string
transactionId
A transaction id from saved topic message
string