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

# Peeng Quickstart: Send Your First Log in 5 Minutes

> Walk through sending your first structured log to Peeng using curl, Node.js, or Python — no SDK required to get started in minutes.

This guide walks you through sending your first log entry to Peeng. You only need an HTTP client — no SDK, no extra dependencies. By the end you will have a working request that returns `202 Accepted` and a log visible in the Peeng dashboard.

<Steps>
  <Step title="Create a project and API key">
    Go to [https://peeng.dev/register](https://peeng.dev/register) and sign up or sign in. Create an organization and a project if you haven't already, then navigate to **Settings → API Keys** and generate a new key.

    Your key looks like this:

    ```
    pk_test_a1b2c3...
    ```

    <Warning>
      Copy your key now — it is only shown once at creation time. If you lose it, you will need to regenerate it. See [Authentication](/authentication) for details on test vs. live keys and key rotation.
    </Warning>
  </Step>

  <Step title="Send a log">
    Every integration path — SDK or raw HTTP — calls the same endpoint: `POST https://api.peeng.dev/v1/logs`. Pick whichever example fits your stack:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.peeng.dev/v1/logs \
        -H "Content-Type: application/json" \
        -H "x-api-key: YOUR_API_KEY" \
        -d '{"logs": [{"level": "info", "message": "User signed up", "environment": "production", "service": "auth", "statusCode": 200}]}'
      ```

      ```javascript Node.js theme={null}
      await fetch("https://api.peeng.dev/v1/logs", {
        method: "POST",
        headers: { "Content-Type": "application/json", "x-api-key": "YOUR_API_KEY" },
        body: JSON.stringify({ logs: [{ level: "info", message: "User signed up", environment: "production", service: "auth", statusCode: 200 }] }),
      });
      ```

      ```python Python theme={null}
      import requests
      requests.post("https://api.peeng.dev/v1/logs", headers={"x-api-key": "YOUR_API_KEY"}, json={"logs": [{"level": "info", "message": "User signed up", "environment": "production", "service": "auth", "statusCode": 200}]})
      ```
    </CodeGroup>

    A successful request returns `202 Accepted` with the following body:

    ```json theme={null}
    { "accepted": 1 }
    ```

    The `accepted` count reflects the number of log entries Peeng queued from your request.
  </Step>

  <Step title="Check the dashboard">
    Open the log explorer in your Peeng project. Your log appears within a few seconds of the request completing. You can filter the explorer by:

    * **Level** — `info`, `warn`, `error`, `debug`
    * **Service** — the `service` field you set in the log body
    * **Status code** — the `statusCode` field
    * **Request ID** — a `requestId` you attach to correlate logs across a single request
    * **User ID** — a `userId` you attach to trace activity for a specific user
  </Step>

  <Step title="(Optional) Install an SDK">
    For production use, the official SDKs handle batching, automatic retries on transient failures, and idempotency — so you never block your application waiting for a log to flush, and you never lose entries during a brief network hiccup.

    <CodeGroup>
      ```bash npm theme={null}
      npm install peeng
      ```

      ```bash pip theme={null}
      pip install peeng
      ```
    </CodeGroup>

    <Tip>
      See the [JavaScript / TypeScript SDK](/sdks/javascript) and [Python SDK](/sdks/python) pages for full setup and configuration guides.
    </Tip>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn how test vs. live keys work, and how to rotate a key safely.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Every field and option that `POST /v1/logs` accepts.
  </Card>
</CardGroup>
