events/API_DOCUMENTATION.md
padreug c669da5822
Some checks are pending
lint / lint (push) Waiting to run
Adds public events endpoint and user tickets
Adds a public events endpoint that allows read-only access to all events.
Improves ticket management by adding support for user IDs as an identifier, alongside name and email.
This simplifies ticket creation for authenticated users and enhances security.
Also introduces an API endpoint to fetch tickets by user ID.
2025-11-03 23:05:31 +01:00

1.3 KiB

Events API Documentation

Public Events Endpoint

GET /api/v1/events/public

Retrieve all events in the database with read-only access. No authentication required.

Authentication: None required (public endpoint)

Headers:

None required

Query Parameters:

  • None

Response:

[
  {
    "id": "event_id",
    "wallet": "wallet_id",
    "name": "Event Name",
    "info": "Event description",
    "closing_date": "2024-12-31",
    "event_start_date": "2024-12-01",
    "event_end_date": "2024-12-02",
    "currency": "sat",
    "amount_tickets": 100,
    "price_per_ticket": 1000.0,
    "time": "2024-01-01T00:00:00Z",
    "sold": 0,
    "banner": null
  }
]

Example Usage:

curl http://your-lnbits-instance/events/api/v1/events/public

Notes:

  • This endpoint allows read-only access to all events in the database
  • No authentication required (truly public endpoint)
  • Returns events ordered by creation time (newest first)
  • Suitable for public event listings or read-only integrations

Comparison with Existing Endpoints

Endpoint Authentication Scope Use Case
/api/v1/events Invoice Key User's wallets only Private event management
/api/v1/events/public None All events Public event browsing