Sending Messages via API

API Endpoint: /api/messages

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.

Endpoint URL
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).

Request Details

  • Method: POST
  • Required Header: Content-Type: application/json

Request Body (JSON)

JSON Payload
{
    "message": "Hello from the API!",
    "destination": "!93f84d8f",
    "channel": 0
}

Code Examples

Select your preferred programming language:

Using curl

curl is a common command-line tool for making HTTP requests. Select your operating system:

Linux / macOS / Git Bash / WSL
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
}'