Middle-earth API

Light a beacon

POST/beacons

Lights one beacon and starts the relay: each beacon lights the next within minutes. A beacon that was lit in the last hour returns 429.

Webhooks

Every lit beacon also sends a Beacon lit webhook to your subscribers.

Request

Bodyapplication/json

  • beacon string Required

    The beacon to light.

    Allowed valuesamon_dineilenachnardolerelasmin_rimmoncalenhadhalifirien

  • message string

    Optional message to relay along the chain.

Example request

cURL
curl -X POST 'https://api.middle-earth.example/v3/beacons' \
  -H 'Content-Type: application/json' \
  -d '{
  "beacon": "amon_din",
  "message": "Gondor calls for aid"
}'

Response

Beacon lit.

Body

  • id string Required

    Unique identifier.

  • name string Required

    Display name.

  • state string Required

    Allowed valuesdarklitrelayed

  • next string

    The next beacon in the chain.

Example response

application/json

Json
{
  "id": "bcn_amon_din",
  "name": "amon_din",
  "state": "lit",
  "next": "bcn_eilenach"
}