> ## 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 monitor

> Retrieve details for a specific monitor by ID including tracked event types and active status

<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 -X GET https://xquik.com/api/v1/monitors/7 \
    -H "x-api-key: xq_YOUR_KEY_HERE" \
    | jq '{
      monitor_id: .id,
      username: .username,
      x_user_id: .xUserId,
      event_types: .eventTypes,
      is_active: .isActive,
      created_at: .createdAt,
      next_billing_at: .nextBillingAt,
      update_endpoint: ("/api/v1/monitors/" + .id),
      events_endpoint: ("/api/v1/events?monitorId=" + .id),
      event_detail_endpoint_pattern: "/api/v1/events/{event_id}",
      webhooks_endpoint: "/api/v1/webhooks",
      deliveries_endpoint_pattern: "/api/v1/webhooks/{webhook_id}/deliveries"
    }'
  ```

  ```javascript Node.js theme={null}
  const monitorId = "7";
  const response = await fetch(`https://xquik.com/api/v1/monitors/${monitorId}`, {
    method: "GET",
    headers: {
      "x-api-key": "xq_YOUR_KEY_HERE",
    },
  });
  const monitor = await response.json();
  const monitorState = {
    monitor_id: monitor.id,
    username: monitor.username,
    x_user_id: monitor.xUserId,
    event_types: monitor.eventTypes,
    is_active: monitor.isActive,
    created_at: monitor.createdAt,
    next_billing_at: monitor.nextBillingAt,
    update_endpoint: `/api/v1/monitors/${monitor.id}`,
    events_endpoint: `/api/v1/events?monitorId=${monitor.id}`,
    event_detail_endpoint_pattern: "/api/v1/events/{event_id}",
    webhooks_endpoint: "/api/v1/webhooks",
    deliveries_endpoint_pattern: "/api/v1/webhooks/{webhook_id}/deliveries",
  };
  process.stdout.write(`${JSON.stringify(monitorState)}\n`);
  ```

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

  monitor_id = "7"
  response = requests.get(
      f"https://xquik.com/api/v1/monitors/{monitor_id}",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
  )
  monitor = response.json()
  monitor_state = {
      "monitor_id": monitor["id"],
      "username": monitor["username"],
      "x_user_id": monitor["xUserId"],
      "event_types": monitor["eventTypes"],
      "is_active": monitor["isActive"],
      "created_at": monitor["createdAt"],
      "next_billing_at": monitor["nextBillingAt"],
      "update_endpoint": f"/api/v1/monitors/{monitor['id']}",
      "events_endpoint": f"/api/v1/events?monitorId={monitor['id']}",
      "event_detail_endpoint_pattern": "/api/v1/events/{event_id}",
      "webhooks_endpoint": "/api/v1/webhooks",
      "deliveries_endpoint_pattern": "/api/v1/webhooks/{webhook_id}/deliveries",
  }
  print(json.dumps(monitor_state))
  ```

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

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

  type Monitor struct {
      ID            string   `json:"id"`
      Username      string   `json:"username"`
      XUserID       string   `json:"xUserId"`
      EventTypes    []string `json:"eventTypes"`
      IsActive      bool     `json:"isActive"`
      CreatedAt     string   `json:"createdAt"`
      NextBillingAt string   `json:"nextBillingAt"`
  }

  type MonitorState struct {
      DeliveriesEndpointPattern  string   `json:"deliveries_endpoint_pattern"`
      EventDetailEndpointPattern string   `json:"event_detail_endpoint_pattern"`
      EventsEndpoint             string   `json:"events_endpoint"`
      EventTypes                 []string `json:"event_types"`
      CreatedAt                  string   `json:"created_at"`
      IsActive                   bool     `json:"is_active"`
      MonitorID                  string   `json:"monitor_id"`
      NextBillingAt              string   `json:"next_billing_at"`
      UpdateEndpoint             string   `json:"update_endpoint"`
      Username                   string   `json:"username"`
      WebhooksEndpoint           string   `json:"webhooks_endpoint"`
      XUserID                    string   `json:"x_user_id"`
  }

  func main() {
      monitorID := "7"
      req, err := http.NewRequest("GET", "https://xquik.com/api/v1/monitors/"+monitorID, 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 monitor Monitor
      if err := json.NewDecoder(resp.Body).Decode(&monitor); err != nil {
          log.Fatal(err)
      }
      state := MonitorState{
          DeliveriesEndpointPattern:  "/api/v1/webhooks/{webhook_id}/deliveries",
          EventDetailEndpointPattern: "/api/v1/events/{event_id}",
          EventsEndpoint:             "/api/v1/events?monitorId=" + monitor.ID,
          EventTypes:                 monitor.EventTypes,
          CreatedAt:                  monitor.CreatedAt,
          IsActive:                   monitor.IsActive,
          MonitorID:                  monitor.ID,
          NextBillingAt:              monitor.NextBillingAt,
          UpdateEndpoint:             "/api/v1/monitors/" + monitor.ID,
          Username:                   monitor.Username,
          WebhooksEndpoint:           "/api/v1/webhooks",
          XUserID:                    monitor.XUserID,
      }
      if err := json.NewEncoder(os.Stdout).Encode(state); err != nil {
          log.Fatal(err)
      }
  }
  ```
</CodeGroup>

The Node.js, Python, and Go examples convert the fetched account monitor into
one state snapshot row. Store `monitor_id`, `event_types`, `is_active`,
`next_billing_at`, `update_endpoint`, `events_endpoint`,
`event_detail_endpoint_pattern`, `webhooks_endpoint`, and
`deliveries_endpoint_pattern` before changing filters, pausing alerts, or
reconciling webhooks.

## State handoff

Use `GET /monitors/{id}` before changing routing, billing checks, or alert
state for one account monitor. The endpoint returns the current stored monitor
for your account only; deleted or cross-account IDs return `404`.

<CardGroup cols={2}>
  <Card title="Tracked Account" icon="user-check">
    Treat `username` and `xUserId` as the resolved X account identity. Store
    both with downstream CRM, warehouse, or queue records.
  </Card>

  <Card title="Current Filter" icon="funnel">
    Treat `eventTypes` as the active matching contract. Mirror those event
    types into webhook subscriptions before relying on signed alerts.
  </Card>

  <Card title="Active State" icon="power">
    Use `isActive` to decide whether the monitor should poll and bill. Use
    [Update Monitor](/api-reference/monitors/update) to pause or resume it.
  </Card>

  <Card title="Event Join" icon="link">
    Use `id` as `monitorId` with [List Events](/api-reference/events/list) to
    reconcile stored events and webhook deliveries for this account.
  </Card>

  <Card title="Event Detail" icon="file-search">
    Use event IDs returned by [List Events](/api-reference/events/list) with
    [Get Event](/api-reference/events/get) when a support, audit, or agent
    workflow needs the full tweet payload.
  </Card>

  <Card title="Webhook Alignment" icon="webhook">
    Use [List Webhooks](/api-reference/webhooks/list) to compare webhook
    `eventTypes` with this monitor before relying on signed alerts.
  </Card>

  <Card title="Delivery Audit" icon="activity">
    Use [List Deliveries](/api-reference/webhooks/deliveries) for each webhook
    and join delivery `streamEventId` to event IDs. Do not use `x_event_id` as
    the delivery join key.
  </Card>
</CardGroup>

## Path parameters

<ParamField path="id" type="string" required>
  The unique monitor ID. Returned when you [create a monitor](/api-reference/monitors/create) or [list monitors](/api-reference/monitors/list).
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key. Session cookie authentication is also supported. Generate a key from the [dashboard](https://xquik.com/dashboard).
</ParamField>

## Response

<Tabs>
  <Tab title="200 OK">
    <ResponseField name="id" type="string">Unique monitor ID.</ResponseField>
    <ResponseField name="username" type="string">Normalized X username.</ResponseField>
    <ResponseField name="xUserId" type="string">Resolved X user ID.</ResponseField>
    <ResponseField name="eventTypes" type="string[]">Subscribed event types.</ResponseField>
    <ResponseField name="isActive" type="boolean">Whether the monitor is currently active.</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601 creation timestamp.</ResponseField>
    <ResponseField name="nextBillingAt" type="string">Next hourly credit charge time for active monitor billing.</ResponseField>

    ```json theme={null}
    {
      "id": "7",
      "username": "elonmusk",
      "xUserId": "44196397",
      "eventTypes": ["tweet.new", "tweet.reply"],
      "isActive": true,
      "createdAt": "2026-02-24T10:30:00.000Z",
      "nextBillingAt": "2026-02-24T11:30:00.000Z"
    }
    ```
  </Tab>

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

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

  <Tab title="401 Unauthenticated">
    ```json theme={null}
    { "error": "unauthenticated", "message": "Missing or invalid API key" }
    ```

    Missing or invalid API key.
  </Tab>

  <Tab title="404 Not Found">
    ```json theme={null}
    { "error": "not_found", "message": "Monitor not found" }
    ```

    No monitor 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 Monitors](/api-reference/monitors/list) to see all monitors, [List Events](/api-reference/events/list) to audit stored events, [List Deliveries](/api-reference/webhooks/deliveries) to audit webhook delivery status, [Update Monitor](/api-reference/monitors/update) to change event types or toggle active status, or [Delete Monitor](/api-reference/monitors/delete) to remove this monitor.
</Note>
