> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get event

> Retrieve a single monitor event by ID with full tweet data, author info, and event metadata

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

<Callout icon="circle-check" color="#16a34a">
  **Free** - does not consume credits
</Callout>

<CodeGroup>
  ```bash cURL theme={null}
  curl https://xquik.com/api/v1/events/9001 \
    -H "x-api-key: xq_YOUR_KEY_HERE" \
    | jq '{
      event_id: .id,
      event_type: .type,
      monitor_type: .monitorType,
      monitor_id: .monitorId,
      keyword_monitor_id: (.keywordMonitorId // null),
      username: (.username // null),
      query: (.query // null),
      occurred_at: .occurredAt,
      x_event_id: (.xEventId // null),
      tweet_id: (.xEventId // .data.id // null),
      tweet_text: (.data.text // null),
      author_username: (.data.author.userName // null),
      event_detail_endpoint: ("/api/v1/events/" + .id),
      delivery_join_key: .id
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://xquik.com/api/v1/events/9001", {
    headers: { "x-api-key": "xq_YOUR_KEY_HERE" },
  });
  const event = await response.json();
  const eventRow = {
    event_id: event.id,
    event_type: event.type,
    monitor_type: event.monitorType,
    monitor_id: event.monitorId,
    keyword_monitor_id: event.keywordMonitorId ?? null,
    username: event.username ?? null,
    query: event.query ?? null,
    occurred_at: event.occurredAt,
    x_event_id: event.xEventId ?? null,
    tweet_id: event.xEventId ?? event.data?.id ?? null,
    tweet_text: event.data?.text ?? null,
    author_username: event.data?.author?.userName ?? null,
    event_detail_endpoint: `/api/v1/events/${event.id}`,
    delivery_join_key: event.id,
  };

  process.stdout.write(`${JSON.stringify(eventRow)}\n`);
  ```

  ```python Python theme={null}
  import json
  import requests

  response = requests.get(
      "https://xquik.com/api/v1/events/9001",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
  )
  event = response.json()
  tweet = event.get("data") if isinstance(event.get("data"), dict) else {}
  author = tweet.get("author") if isinstance(tweet.get("author"), dict) else {}
  event_row = {
      "event_id": event["id"],
      "event_type": event["type"],
      "monitor_type": event["monitorType"],
      "monitor_id": event["monitorId"],
      "keyword_monitor_id": event.get("keywordMonitorId"),
      "username": event.get("username"),
      "query": event.get("query"),
      "occurred_at": event["occurredAt"],
      "x_event_id": event.get("xEventId"),
      "tweet_id": event.get("xEventId") or tweet.get("id"),
      "tweet_text": tweet.get("text"),
      "author_username": author.get("userName"),
      "event_detail_endpoint": f"/api/v1/events/{event['id']}",
      "delivery_join_key": event["id"],
  }
  print(json.dumps(event_row))
  ```

  ```go Go theme={null}
  package main

  import (
    "encoding/json"
    "log"
    "net/http"
    "os"
  )

  type EventAuthor struct {
    UserName *string `json:"userName"`
  }

  type EventPayload struct {
    ID     *string      `json:"id"`
    Text   *string      `json:"text"`
    Author *EventAuthor `json:"author"`
  }

  type Event struct {
    ID               string       `json:"id"`
    Type             string       `json:"type"`
    MonitorType      string       `json:"monitorType"`
    MonitorID        string       `json:"monitorId"`
    KeywordMonitorID *string      `json:"keywordMonitorId"`
    Username         *string      `json:"username"`
    Query            *string      `json:"query"`
    OccurredAt       string       `json:"occurredAt"`
    Data             EventPayload `json:"data"`
    XEventID         *string      `json:"xEventId"`
  }

  type EventRow struct {
    DeliveryJoinKey      string  `json:"delivery_join_key"`
    EventDetailEndpoint  string  `json:"event_detail_endpoint"`
    EventID              string  `json:"event_id"`
    EventType            string  `json:"event_type"`
    MonitorType          string  `json:"monitor_type"`
    MonitorID            string  `json:"monitor_id"`
    KeywordMonitorID     *string `json:"keyword_monitor_id"`
    Username             *string `json:"username"`
    Query                *string `json:"query"`
    OccurredAt           string  `json:"occurred_at"`
    XEventID             *string `json:"x_event_id"`
    TweetID              *string `json:"tweet_id"`
    TweetText            *string `json:"tweet_text"`
    AuthorUsername       *string `json:"author_username"`
  }

  func main() {
    req, err := http.NewRequest("GET", "https://xquik.com/api/v1/events/9001", nil)
    if err != nil {
      log.Fatal(err)
    }
    req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
      log.Fatal(err)
    }
    defer resp.Body.Close()

    var event Event
    if err := json.NewDecoder(resp.Body).Decode(&event); err != nil {
      log.Fatal(err)
    }

    tweetID := event.XEventID
    if tweetID == nil {
      tweetID = event.Data.ID
    }

    var authorUsername *string
    if event.Data.Author != nil {
      authorUsername = event.Data.Author.UserName
    }

    row := EventRow{
      DeliveryJoinKey:     event.ID,
      EventDetailEndpoint: "/api/v1/events/" + event.ID,
      EventID:             event.ID,
      EventType:           event.Type,
      MonitorType:         event.MonitorType,
      MonitorID:           event.MonitorID,
      KeywordMonitorID:    event.KeywordMonitorID,
      Username:            event.Username,
      Query:               event.Query,
      OccurredAt:          event.OccurredAt,
      XEventID:            event.XEventID,
      TweetID:             tweetID,
      TweetText:           event.Data.Text,
      AuthorUsername:      authorUsername,
    }
    if err := json.NewEncoder(os.Stdout).Encode(row); err != nil {
      log.Fatal(err)
    }
  }
  ```
</CodeGroup>

The Node.js, Python, and Go examples convert one event into an audit row. Store
`event_id`, `monitor_type`, `monitor_id`, `event_type`, `occurred_at`,
`x_event_id`, tweet fields from `data`, `event_detail_endpoint`, and
`delivery_join_key`; keyword monitor events use `keyword_monitor_id` and
`query` instead of `username`.

## Event detail handoff

Use this endpoint after list or delivery workflows find an event that needs full
tweet data, author context, or support/audit review.

<CardGroup cols={2}>
  <Card title="Detail Row" icon="fingerprint">
    Store `event_id`, `event_type`, `occurred_at`, `event_detail_endpoint`, and
    `delivery_join_key`. Keep `event_id` as the Xquik event identifier.
  </Card>

  <Card title="Delivery Join" icon="link">
    Match `delivery_join_key` to webhook delivery `streamEventId` from
    [List Deliveries](/api-reference/webhooks/deliveries). Do not use
    `x_event_id` for delivery joins.
  </Card>

  <Card title="Monitor Source" icon="radar">
    Store `monitor_type`, `monitor_id`, `keyword_monitor_id`, `username`, and
    `query` so account and keyword monitor audits stay separate.
  </Card>

  <Card title="Tweet Payload" icon="message-circle">
    Store `x_event_id`, `tweet_id`, `tweet_text`, and `author_username` from
    `data` when the event contains tweet content.
  </Card>

  <Card title="Delivery Status" icon="activity">
    After joining deliveries, attach `status`, `attempts`, `lastStatusCode`,
    `lastError`, `createdAt`, and `deliveredAt` to the event detail row.
  </Card>
</CardGroup>

## Path parameters

<ParamField path="id" type="string" required>
  The event ID to retrieve.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key.
</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    <ResponseField name="id" type="string">
      Unique event identifier.
    </ResponseField>

    <ResponseField name="type" type="string">
      Event type (e.g. `tweet.new`, `tweet.reply`, `tweet.quote`, `tweet.retweet`).
    </ResponseField>

    <ResponseField name="monitorId" type="string">
      Account monitor ID for account events, or keyword monitor ID for keyword events.
    </ResponseField>

    <ResponseField name="monitorType" type="string">
      Source type: `account` or `keyword`.
    </ResponseField>

    <ResponseField name="keywordMonitorId" type="string">
      Keyword monitor ID. Present only for keyword monitor events.
    </ResponseField>

    <ResponseField name="username" type="string">
      X username that triggered the event. Present only for account monitor events.
    </ResponseField>

    <ResponseField name="query" type="string">
      Keyword query that matched the event. Present only for keyword monitor events.
    </ResponseField>

    <ResponseField name="occurredAt" type="string">
      ISO 8601 timestamp of when the event occurred on X.
    </ResponseField>

    <ResponseField name="data" type="object">
      Raw tweet object from the X real-time stream. Fields vary by event type. See [Webhooks Overview](/webhooks/overview) for event data shapes.
    </ResponseField>

    <ResponseField name="xEventId" type="string">
      X platform tweet ID associated with this event. Present only for tweet events.
    </ResponseField>

    ```json theme={null}
    {
      "id": "9001",
      "type": "tweet.new",
      "monitorId": "7",
      "monitorType": "account",
      "username": "elonmusk",
      "occurredAt": "2026-02-24T14:22:00.000Z",
      "data": {
        "id": "1893456789012345678",
        "text": "The future is now.",
        "author": {
          "id": "44196397",
          "userName": "elonmusk",
          "name": "Elon Musk"
        },
        "isRetweet": false,
        "isReply": false,
        "isQuote": false,
        "createdAt": "2026-02-24T14:22:00.000Z"
      },
      "xEventId": "1893456789012345678"
    }
    ```
  </Tab>

  <Tab title="401 Unauthenticated">
    ```json theme={null}
    { "error": "unauthenticated" }
    ```

    Missing or invalid API key. Check the `x-api-key` header value.
  </Tab>

  <Tab title="400 Invalid ID">
    ```json theme={null}
    { "error": "invalid_id", "message": "Invalid ID format." }
    ```

    The provided event ID is not a valid format.
  </Tab>

  <Tab title="404 Not Found">
    ```json theme={null}
    { "error": "not_found" }
    ```

    No event exists with this ID, or it belongs to a different account.
  </Tab>

  <Tab title="429 Rate Limited">
    ```json theme={null}
    { "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 1 }
    ```

    Too many requests. Wait for the `Retry-After` header before retrying.
  </Tab>
</Tabs>

<Note>
  **Related:** [List Events](/api-reference/events/list) · [List Deliveries](/api-reference/webhooks/deliveries) · [Get Monitor](/api-reference/monitors/get)
</Note>
