You can programmatically send messages to your Meshtastic network using the
/api/messages
endpoint provided by this dashboard server.
This requires making an HTTP POST request with a JSON payload containing the message details.
http://192.168.1.100:8000/api/messages
(Replace 192.168.1.100:8000
with the actual IP address or hostname and port where this dashboard server is running).
Content-Type: application/json
{
"message": "Hello from the API!",
"destination": "!93f84d8f",
"channel": 0
}
Select your preferred programming language:
curl
is a common command-line tool for making HTTP requests. Select your operating system:
curl -X POST "http://192.168.1.100:8000/api/messages" \
-H "Content-Type: application/json" \
-d '{
"message": "Hello from the API!",
"destination": "!93f84d8f",
"channel": 0
}'