Skip to main content
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:
https://api.posthook.io/v1

SDKs

Official SDKs handle authentication, pagination, and error handling automatically.
npm install @posthook/node
Initialize the client with your API key:
import Posthook from '@posthook/node';

const posthook = new Posthook('phk_your_api_key');

Authentication

The Posthook API uses API keys to authenticate requests.
X-API-Key: <YOUR_API_KEY>
See the Authentication guide for more details.

Response Codes

Posthook uses standard HTTP response codes to indicate the success or failure of an API request.
CodeMeaning
200OK - Request succeeded.
201Created - The resource was successfully created.
400Bad Request - Invalid request (e.g., missing required fields).
401Unauthorized - The X-API-Key header is missing or invalid.
404Not Found - The requested resource (e.g. Hook ID) does not exist.
413Payload Too Large - The request body exceeds the maximum size.
429Too Many Requests - You have exceeded your rate limits.
500Internal Server Error - Something went wrong on our end.