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

# Quickstart

> Start scheduling webhooks in under 2 minutes

This guide walks you through setting up Posthook, connecting your local environment, and sending your first scheduled hook.

<Tip>
  Prefer an interactive guide? You can follow this same walkthrough interactively in the [Posthook Dashboard](https://posthook.io/app/home).
</Tip>

## 1. Log In

Connect your local development server to Posthook using the CLI. This lets you receive webhooks locally without tunneling tools like ngrok.

<CodeGroup>
  ```bash npm theme={null}
  npx posthook login
  ```

  ```bash yarn theme={null}
  yarn dlx posthook login
  ```

  ```bash pnpm theme={null}
  pnpm dlx posthook login
  ```
</CodeGroup>

You will be prompted to enter your **API Secret Key**. You can find this in the **Settings** page of your project in the [Dashboard](https://posthook.io/app/home).

## 2. Start the Listener

Start the Posthook listener to forward webhooks to your local application.

```bash theme={null}
npx posthook listen --forward http://localhost:3000
```

Replace `http://localhost:3000` with the base URL of your local server.

<Note>
  The listener connects to Posthook via WebSocket. It receives webhooks and forwards them to your specified local URL.
</Note>

## 3. Install the SDK (Optional)

Install an official SDK for a streamlined experience. You can also use `curl` directly.

<CodeGroup>
  ```bash TypeScript theme={null}
  npm install @posthook/node
  ```

  ```bash Python theme={null}
  pip install posthook-python
  ```

  ```bash Go theme={null}
  go get github.com/posthook/posthook-go
  ```
</CodeGroup>

## 4. Send a Test Hook

In a new terminal, schedule a test webhook to fire in 5 seconds.

<CodeGroup>
  ```typescript TypeScript theme={null}
  import Posthook from '@posthook/node';
  const posthook = new Posthook('phk_your_api_key');

  const hook = await posthook.hooks.schedule({
    path: '/webhooks/posthook/send-reminder',
    postIn: '5s',
    data: {
      user_id: 'usr_123',
      reminder_id: 'rem_456'
    }
  });

  console.log('Scheduled:', hook.id);
  ```

  ```python Python theme={null}
  from posthook import Posthook

  client = Posthook("phk_your_api_key")

  hook = client.hooks.schedule(
      path="/webhooks/posthook/send-reminder",
      post_in="5s",
      data={
          "user_id": "usr_123",
          "reminder_id": "rem_456"
      }
  )

  print("Scheduled:", hook.id)
  ```

  ```go Go theme={null}
  client, _ := posthook.NewClient("phk_your_api_key")

  hook, _, _ := client.Hooks.Schedule(context.Background(), &posthook.HookScheduleParams{
      Path:   "/webhooks/posthook/send-reminder",
      PostIn: "5s",
      Data: map[string]string{
          "user_id":     "usr_123",
          "reminder_id": "rem_456",
      },
  })

  fmt.Println("Scheduled:", hook.ID)
  ```

  ```bash curl theme={null}
  curl -X POST https://api.posthook.io/v1/hooks \
    -H "Content-Type: application/json" \
    -H "X-API-Key: $POSTHOOK_API_KEY" \
    -d '{
      "path": "/webhooks/posthook/send-reminder",
      "postIn": "5s",
      "data": {
        "user_id": "usr_123",
        "reminder_id": "rem_456"
      }
    }'
  ```
</CodeGroup>

You can find your API Key in the **Settings** page of your project in the [Dashboard](https://posthook.io/app/home).

### Verification

Check your `posthook listen` terminal. You should see the hook arrive when it fires:

```
2026-01-01 12:00:00 [200 OK] POST /webhooks/posthook/send-reminder
```

## 5. Check the Dashboard

Open the [Activity page](https://posthook.io/app/home) in the Dashboard. You can inspect the full payload, view delivery timing, and check response details for any hook.

## Next Steps

<CardGroup cols={2}>
  <Card title="How Posthook Works" icon="diagram-project" href="/essentials/how-it-works">
    Understand the full hook lifecycle from scheduling to delivery.
  </Card>

  <Card title="Receiving Webhooks" icon="inbox" href="/essentials/receiving-webhooks">
    Handle deliveries in your app with framework-specific examples.
  </Card>

  <Card title="Security" icon="shield" href="/essentials/security">
    Verify the `Posthook-Signature` to ensure requests are genuine.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore the full API to schedule, list, and manage your hooks.
  </Card>
</CardGroup>
