Skip to main content
Build custom integrations with the PostMetric REST API.

Authentication

All API requests require authentication using an API key. Get your API key from your dashboard:
  1. Go to your website settings
  2. Click “API Keys”
  3. Create a new API key
  4. Copy the key (you won’t be able to see it again)

Base URL

https://your-domain.com/api/v1

Authentication header

Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Rate limits

API requests are rate-limited to prevent abuse:
  • 100 requests per minute per API key
  • Rate limit headers are included in responses:
    • X-RateLimit-Limit - Request limit
    • X-RateLimit-Remaining - Remaining requests
    • X-RateLimit-Reset - When the limit resets

Response format

All API responses follow this format:

Success response

{
  "status": "success",
  "data": {
    // Response data
  }
}

Error response

{
  "status": "error",
  "error": {
    "code": 400,
    "message": "Error message"
  }
}

Endpoints

Example request

curl -X GET "https://your-domain.com/api/v1/visitor?visitorId=visitor_123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Next steps

GET Visitor

Learn how to get visitor data