Consensus Messages
Send a consensus message to hedera through your API with the option of using webhooks for waiting synchronously for finality.
Create new consensus message
POST
https://hedera-serverless-consensus.vercel.app/api/consensus/message/
This endpoint allows you to send a message to a topic id, you may simply broadcast the message, or wait for consensus to be reached using allow_synchronous_consensus. If you are using testnet or mainnet environments there will be a explorer_url property linking to an external hashgraph explorer for the given transaction.
Query Parameters
Name | Type | Description |
---|---|---|
reference | string | A reference to an internal app idenitier so that after the response it will be easier to link. |
allow_synchronous_consensus | boolean | Wait for consensus to be finished to finality before receiving a response. |
topic_id | string | The id of the topic you want to sent the message to. |
message | string | The string message that is sent to received a consensus response. |
Headers
Name | Type | Description |
---|---|---|
Authentication | string | The API_SECRET_KEY from th e client's environment variables. |
WARNING: if you have a WEBHOOK_URL set in your client it is recommended that you do not set the allow_synchronous_consensus to false due to the implications of the NodeJS event loop with AWS Lambda.
Last updated