🔐
Trust Enterprises
  • Getting Started
  • Intro video course
    • Introduction of the Trust Enterprises project [2:16]
    • Deployment of your first Serverless client [6:29]
    • Using Postman with the Trust Enterprises API [6:33]
    • Installation of the Trust Enterprises Laravel package [7:51]
    • Basic interaction with your client with Laravel. [10:28]
  • Deployment
    • Vercel
    • Environment Variables
    • Github Actions
  • REST API
    • Overview
    • Inscriptions
      • Deploy an Inscription
      • Mint an Inscription
      • Burn an Inscription
      • Transfer an Inscription
    • NFT Ecosystem
      • Create an NFT Collection
      • Generate Metadata
      • Mint an NFT
      • Transfer an NFT
      • Claiming NFTs through Passes
    • Accounts
    • Tokens
      • Create a token
      • Bequesting a token
      • Token Holdings and Balance
    • Topics
      • Get topic info
      • Creating a new topic
      • Updating a topic
    • Consensus Messages
    • Balance
    • Status
    • Webhooks
  • The Laravel Client
    • Overview
    • Installation
    • Interacting with your client
    • Create a Marketplace
    • Manage your Inscription Flow
    • Checking account balances and sending tokens
  • Contributing
    • Local Development
      • Architecture Rationale
    • Contributing Guidelines
    • Changelog
  • Links
    • Github
    • Trust Enterprises
    • Postman Documentation
    • Hedera Network Status
    • Remote Software Development
Powered by GitBook
On this page

Was this helpful?

  1. REST API

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.

{
    "data": {
        "reference": "my reference",
        "topic_id": "16091",
        "transaction_id": "0.0.1156@1598828456.197000000",
        "explorer_url": "https://ledger-testnet.hashlog.io/tx/0.0.1156@1598828456.197000000",
        "consensus_timestamp": {
            "seconds": 1598828466,
            "nanos": 501124002
        }
    }

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.

PreviousUpdating a topicNextBalance

Last updated 4 years ago

Was this helpful?