Skip to content

Send Data with Beam's REST API

Beam runs a local REST API while it’s up — no internet, no auth, just your own machine talking to its own Beam daemon at http://127.0.0.1:9091.

Send a Package

POST/api/package

Sends a Package synchronously over whichever channels you specify.

Headers

NameValue
Content-Typeapplication/json

Body — exactly one of data, message, location, or waypoint:

FieldTypeDescription
idInt32 (optional)Package ID
channelsArray of Satellite, Radio (Node only), Cellular (optional)Channels to send over. Omit to use every available channel.
collapseKeyInt32 (optional)Replaces any queued Package with a matching collapseKey — use it to swap in fresh data for one still in flight.
priorityInt32 (optional)Higher priority Packages jump the queue. Default 11; Messages default to 12, Locations to 10, SOS to 100.
dataData (one-of)A raw base64 byte payload
messageMessage (one-of)A text message
locationLocation (one-of)A position report
waypointWaypoint (one-of)A point of interest

Data

Raw bytes, base64-encoded.

FieldTypeDescription
payloadString (base64)Raw bytes to send
curl http://127.0.0.1:9091/api/package \
-H "Content-Type: application/json" \
-d '{
"data": {
"payload": "VGVzdAo="
}
}'

Message

A text message.

FieldTypeDescription
contentStringMessage content
curl http://127.0.0.1:9091/api/package \
-H "Content-Type: application/json" \
-d '{
"message": {
"content": "Hello from space!"
}
}'

Location

A position report.

FieldTypeDescription
latitudeDoubleLatitude (WGS84)
longitudeDoubleLongitude (WGS84)
timestampString (ISO 8601, optional)When the position was recorded
altitudeFloat (optional)Altitude above mean sea level
speedOverGroundFloat (optional)Speed over ground, in m/s
courseOverGroundFloat (optional)Degrees clockwise from true north
curl http://127.0.0.1:9091/api/package \
-H "Content-Type: application/json" \
-d '{
"location": {
"latitude": "37.781001",
"longitude": "-122.393456",
"timestamp": "2023-04-12T19:15:14Z"
}
}'

Waypoint

A point of interest.

FieldTypeDescription
latitudeDoubleLatitude (WGS84)
longitudeDoubleLongitude (WGS84)
timestampString (ISO 8601, optional)Timestamp
nameStringName of the point of interest
notesString (optional)Additional notes
curl http://127.0.0.1:9091/api/package \
-H "Content-Type: application/json" \
-d '{
"waypoint": {
"latitude": "37.819466",
"longitude": "-122.478628",
"timestamp": "2023-04-12T19:15:14Z",
"name": "Golden Gate Bridge"
}
}'

Response

The response carries a status. These are terminal statuses only.

{
"id": 1,
"status": "Delivered",
"data": {
"payload": ""
}
}

Package status

StatusDescription
DeliveredSent successfully over the channel. This isn’t end-to-end confirmation — over satellite, for example, it means the Package reached the satellite gateway, not that the target client has it yet.
ErrorFailed to send over every channel.
CollapsedReplaced by a more recent Package sharing the same collapseKey.
CanceledCanceled by a call to /api/package/{id}/cancel.