> ## 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 Started With the Xquik API

> Create an X API key, make your first REST request, monitor tweets every 1 second, and send signed webhooks in 5 minutes.

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

Use this account quickstart to create a full API key, call `GET /account`, monitor tweets every 1 second with `POST /monitors`, and send signed webhook events with `POST /webhooks`. For accountless reads, use a [guest wallet](/guides/guest-wallets) across 33 routes or [direct MPP](/mpp/quickstart) across 7 operations.

<CardGroup cols={2}>
  <Card title="First API Call" icon="terminal">
    Call `GET /account` to confirm authentication, plan status, available credits, and monitor billing.
  </Card>

  <Card title="First Monitor" icon="radio">
    Create an account monitor that checks every 1 second. Active monitors cost 21 credits per hour while enabled.
  </Card>

  <Card title="First Webhook" icon="shield-check">
    Register an HTTPS endpoint and save the one-time secret for HMAC signature verification.
  </Card>

  <Card title="Accountless Reads" icon="wallet-cards" href="/guides/guest-wallets">
    Prepay 33 eligible GET routes with a $10-$250 USD Stripe-hosted Payment Link. No account required.
  </Card>
</CardGroup>

<Steps>
  <Step title="Create an account">
    Sign up at [xquik.com](https://xquik.com) with your email. You'll receive a magic link, no password required.
  </Step>

  <Step title="Fund your account">
    <Warning>
      Metered account operations require enough available credits. An active plan is not required while sufficient credits remain.
    </Warning>

    Subscribe for monthly credits or use your remaining account balance. Starter is USD 20/month and includes 140,000 monthly credits. Manage funding from the [dashboard billing page](https://dashboard.xquik.com/en/account?tab=subscription). Guest wallets cover 33 prepaid GET routes without an account. Direct MPP covers 7 fixed-price operations.
  </Step>

  <Step title="Generate an API key">
    Open [API Keys](https://dashboard.xquik.com/en/account?tab=api-keys) in the dashboard and create a new key. Copy the full key immediately - it's only shown once.

    ```text theme={null}
    xq_your_api_key_here
    ```

    <Warning>
      Store your API key securely. It cannot be retrieved after creation. Revoke and replace if compromised.
    </Warning>
  </Step>

  <Step title="Make your first request">
    Verify your setup by fetching your account info:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s https://xquik.com/api/v1/account \
        -H "x-api-key: xq_your_api_key_here" | jq
      ```

      ```javascript Node.js theme={null}
      const response = await fetch("https://xquik.com/api/v1/account", {
        headers: { "x-api-key": "xq_your_api_key_here" },
      });
      const account = await response.json();
      process.stdout.write(`${JSON.stringify(account, null, 2)}\n`);
      ```

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

      response = requests.get(
          "https://xquik.com/api/v1/account",
          headers={"x-api-key": "xq_your_api_key_here"},
      )
      print(response.json())
      ```

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

      import (
          "fmt"
          "io"
          "net/http"
      )

      func main() {
          req, _ := http.NewRequest("GET", "https://xquik.com/api/v1/account", nil)
          req.Header.Set("x-api-key", "xq_your_api_key_here")

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

          body, _ := io.ReadAll(resp.Body)
          fmt.Println(string(body))
      }
      ```
    </CodeGroup>

    **Response:**

    ```json theme={null}
    {
      "plan": "active",
      "monitorsAllowed": 9007199254740991,
      "monitorsUsed": 0,
      "monitorBilling": {
        "activeDailyEstimate": "0",
        "activeHourlyBurn": "0",
        "creditsPerActiveMonitorDay": "500",
        "creditsPerActiveMonitorHour": "21",
        "eventsIncluded": true,
        "instantCheckIntervalSeconds": 1,
        "unlimitedSlots": true
      },
      "creditInfo": {
        "balance": "50000",
        "lifetimePurchased": "140000",
        "lifetimeUsed": "90000",
        "autoTopupEnabled": false,
        "autoTopupAmountDollars": 10,
        "autoTopupThreshold": "50000"
      }
    }
    ```
  </Step>

  <Step title="Create a monitor">
    Start tracking an X account:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s -X POST https://xquik.com/api/v1/monitors \
        -H "x-api-key: xq_your_api_key_here" \
        -H "Content-Type: application/json" \
        -d '{"username": "elonmusk", "eventTypes": ["tweet.new", "tweet.reply"]}' | jq
      ```

      ```javascript Node.js theme={null}
      const response = await fetch("https://xquik.com/api/v1/monitors", {
        method: "POST",
        headers: {
          "x-api-key": "xq_your_api_key_here",
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          username: "elonmusk",
          eventTypes: ["tweet.new", "tweet.reply"],
        }),
      });
      const monitor = await response.json();
      process.stdout.write(`${JSON.stringify(monitor, null, 2)}\n`);
      ```

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

      response = requests.post(
          "https://xquik.com/api/v1/monitors",
          headers={"x-api-key": "xq_your_api_key_here"},
          json={
              "username": "elonmusk",
              "eventTypes": ["tweet.new", "tweet.reply"],
          },
      )
      print(response.json())
      ```

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

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "io"
          "net/http"
      )

      func main() {
          body, _ := json.Marshal(map[string]interface{}{
              "username":   "elonmusk",
              "eventTypes": []string{"tweet.new", "tweet.reply"},
          })

          req, _ := http.NewRequest("POST", "https://xquik.com/api/v1/monitors", bytes.NewReader(body))
          req.Header.Set("x-api-key", "xq_your_api_key_here")
          req.Header.Set("Content-Type", "application/json")

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

          respBody, _ := io.ReadAll(resp.Body)
          fmt.Println(string(respBody))
      }
      ```
    </CodeGroup>

    **Response:**

    ```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-24T10:30:00.000Z"
    }
    ```
  </Step>

  <Step title="Set up a webhook (optional)">
    Receive signed monitor events at your endpoint:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s -X POST https://xquik.com/api/v1/webhooks \
        -H "x-api-key: xq_your_api_key_here" \
        -H "Content-Type: application/json" \
        -d '{"url": "https://your-server.com/webhook", "eventTypes": ["tweet.new"]}' | jq
      ```

      ```javascript Node.js theme={null}
      const response = await fetch("https://xquik.com/api/v1/webhooks", {
        method: "POST",
        headers: {
          "x-api-key": "xq_your_api_key_here",
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          url: "https://your-server.com/webhook",
          eventTypes: ["tweet.new"],
        }),
      });
      const webhook = await response.json();
      const webhookSecret = webhook.secret;
      if (!webhookSecret) throw new Error("missing webhook secret");
      process.stdout.write(`Webhook ${webhook.id} ready\n`);
      // Store webhookSecret in your secret manager; do not print it.
      ```

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

      response = requests.post(
          "https://xquik.com/api/v1/webhooks",
          headers={"x-api-key": "xq_your_api_key_here"},
          json={
              "url": "https://your-server.com/webhook",
              "eventTypes": ["tweet.new"],
          },
      )
      webhook = response.json()
      webhook_secret = webhook["secret"]
      if not webhook_secret:
          raise RuntimeError("missing webhook secret")
      print(f"Webhook {webhook['id']} ready")
      # Store webhook_secret in your secret manager; do not print it.
      ```

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

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          body, _ := json.Marshal(map[string]interface{}{
              "url":        "https://your-server.com/webhook",
              "eventTypes": []string{"tweet.new"},
          })

          req, _ := http.NewRequest("POST", "https://xquik.com/api/v1/webhooks", bytes.NewReader(body))
          req.Header.Set("x-api-key", "xq_your_api_key_here")
          req.Header.Set("Content-Type", "application/json")

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

          var webhook struct {
              ID     string `json:"id"`
              Secret string `json:"secret"`
          }
          if err := json.NewDecoder(resp.Body).Decode(&webhook); err != nil {
              panic(err)
          }

          webhookSecret := webhook.Secret
          if webhookSecret == "" {
              panic("missing webhook secret")
          }
          fmt.Printf("Webhook %s ready\n", webhook.ID)
          // Store webhookSecret in your secret manager; do not print it.
      }
      ```
    </CodeGroup>

    **Response:**

    ```json theme={null}
    {
      "id": "15",
      "url": "https://your-server.com/webhook",
      "eventTypes": ["tweet.new"],
      "secret": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
      "createdAt": "2026-02-24T10:30:00.000Z"
    }
    ```

    Save the `secret` from the response in a secret manager. It is only returned once, and you need it to [verify webhook signatures](/webhooks/verification). Do not print it in shared logs.
  </Step>
</Steps>

## Next steps

<CardGroup cols={3}>
  <Card title="API Reference" icon="book" href="/api-reference/overview">
    Full endpoint documentation.
  </Card>

  <Card title="Export Tweets & Followers" icon="pickaxe" href="/api-reference/extractions/create">
    Pull followers, replies, and more from X.
  </Card>

  <Card title="Run a Draw" icon="trophy" href="/api-reference/draws/create">
    Execute a giveaway draw on a tweet.
  </Card>

  <Card title="Webhook Verification" icon="shield-check" href="/webhooks/verification">
    Verify HMAC signatures on incoming webhooks.
  </Card>

  <Card title="MCP Server" icon="bot" href="/mcp/overview">
    Connect API MCP v2.6.0 through Streamable HTTP. Use `explore`, then `xquik`.
  </Card>

  <Card title="Error Handling" icon="circle-alert" href="/guides/error-handling">
    Handle errors, rate limits, and retries.
  </Card>

  <Card title="Billing & Usage" icon="credit-card" href="/guides/billing">
    Track usage, manage your subscription, and view quotas.
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Magic link email not received">
    Keep using your Xquik account email. Wait 60 seconds, request a new link, then open the newest email within 15 minutes. Check your spam or junk folder. If no email arrives, contact [support@xquik.com](mailto:support@xquik.com) with the exact request time.
  </Accordion>

  <Accordion title="API key not working (401)">
    Verify the header name is `x-api-key` (lowercase). Check that the key starts with `xq_` and hasn't been revoked. Regenerate from the [API Keys dashboard](https://dashboard.xquik.com/en/account?tab=api-keys).
  </Accordion>

  <Accordion title="Getting 401 or 402">
    Neither status creates checkout. Anonymous non-MPP paid reads return `401` with a Bearer challenge and guest wallet action. The 7 direct MPP reads return `402` with a Payment challenge and the same action. Account and guest credit failures return `402` with credential-specific choices. Ask the user to choose and confirm before creating checkout. See [Billing](/guides/billing).
  </Accordion>

  <Accordion title="Webhook not receiving events">
    Verify the URL uses HTTPS. Check that the webhook is active via [List Webhooks](/api-reference/webhooks/list). Test delivery with the [Test Webhook](/api-reference/webhooks/test) endpoint.
  </Accordion>

  <Accordion title="Rate limited (429)">
    The fixed windows allow 300 reads/1s, 120 writes/60s, and 60 deletes/60s. Respect `Retry-After`. See [Rate Limits](/guides/rate-limits).
  </Accordion>
</AccordionGroup>
