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

# Introduction

> Posthook API Reference

The Posthook API follows REST conventions with predictable, resource-oriented URLs. It accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

## Base URL

All API requests should be made to:

```bash theme={null}
https://api.posthook.io/v1
```

## SDKs

Official SDKs handle authentication, pagination, and error handling automatically.

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

Initialize the client with your API key:

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

  const posthook = new Posthook('phk_your_api_key');
  ```

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

  client = Posthook("phk_your_api_key")
  ```

  ```go Go theme={null}
  import "github.com/posthook/posthook-go"

  client, err := posthook.NewClient("phk_your_api_key")
  ```
</CodeGroup>

## Authentication

The Posthook API uses API keys to authenticate requests.

```bash theme={null}
X-API-Key: <YOUR_API_KEY>
```

See the [Authentication](/essentials/authentication) guide for more details.

## Response Codes

Posthook uses standard HTTP response codes to indicate the success or failure of an API request.

| Code  | Meaning                                                               |
| ----- | --------------------------------------------------------------------- |
| `200` | **OK** - Request succeeded.                                           |
| `201` | **Created** - The resource was successfully created.                  |
| `400` | **Bad Request** - Invalid request (e.g., missing required fields).    |
| `401` | **Unauthorized** - The `X-API-Key` header is missing or invalid.      |
| `404` | **Not Found** - The requested resource (e.g. Hook ID) does not exist. |
| `413` | **Payload Too Large** - The request body exceeds the maximum size.    |
| `429` | **Too Many Requests** - You have exceeded your rate limits.           |
| `500` | **Internal Server Error** - Something went wrong on our end.          |
