# /Event

## Overview

The `/event` endpoint retrieves a single Nostr event by its ID, along with the profiles of relevant authors.

## Endpoint Details

* **URL**: `/event`
* **Method**: GET
* **Auth Required**: No
* **Permissions Required**: None

## Request Parameters

| Parameter | Description                      | Required |
| --------- | -------------------------------- | -------- |
| `id`      | The ID of the event to retrieve. | Yes      |

## Response Schema

The response is a JSON object with the following structure:

```json
{
  "event": {
    "id": "event_id",
    "pubkey": "author_pubkey",
    "created_at": 1234567890,
    "kind": 1,
    "tags": [],
    "content": "Event content",
    "sig": "event_signature"
  },
  "profiles": {
    "author_pubkey": {
      "id": "profile_event_id",
      "pubkey": "author_pubkey",
      "created_at": 1234567890,
      "kind": 0,
      "tags": [],
      "content": "Profile content",
      "sig": "profile_signature"
    }
  }
}
```

* `event`: The requested Nostr event.
* `profiles`: A map of author profiles, keyed by pubkey. This includes the profile of the event author and any other relevant profiles (e.g., mentioned users).

## Example Call

```bash
curl -X GET "https://huddlers-ovduv.ondigitalocean.app/event?id=5c3e529bb75f165d822b468114e3bc928288ae5679e38849452e0389124a333b"
```

## Notes

* The profiles map also includes profiles of other authors mentioned in the event.

## Error Responses

* **400 Bad Request**: If the event ID is missing or invalid.
* **404 Not Found**: If the requested event cannot be found.
* **500 Internal Server Error**: If there's an issue processing the request or retrieving profiles.
