The SeerStack API allows you to send events, identify users, and track behavior in your applications. All API requests require authentication using a Bearer token.
Base URL
All API requests should be made to:
https://api.seerstack.com
Authentication
Authenticate your requests by including your API key as a Bearer token in the Authorization header.
Authorization: Bearer sk_live_your_api_key
You can find your API key in the SeerStack Dashboard under Settings > Developer.
Keep your API key secure. Never expose it in client-side code or commit it to version control.
SDKs
We provide official SDKs for TypeScript and Ruby that handle authentication and provide a better developer experience.
Quick Examples
import Seerstack from 'seerstack';
const client = new Seerstack({
apiKey: process.env['SEERSTACK_API_KEY'],
});
// Send an event
await client.events.capture({
name: 'user.signup',
user_id: 'user_123',
data: { plan: 'pro' }
});
// Identify a user
await client.users.identify({
user_id: 'user_123',
email: '[email protected]',
name: 'Jane Doe'
});
require "seerstack"
seerstack = Seerstack::Client.new(
api_key: ENV["SEERSTACK_API_KEY"]
)
# Send an event
seerstack.events.capture(
name: "user.signup",
user_id: "user_123",
data: { plan: "pro" }
)
# Identify a user
seerstack.users.identify(
user_id: "user_123",
email: "[email protected]",
name: "Jane Doe"
)
# Send an event
curl -X POST https://api.seerstack.com/capture \
-H "Authorization: Bearer $SEERSTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "user.signup", "user_id": "user_123"}'
# Identify a user
curl -X POST https://api.seerstack.com/identify \
-H "Authorization: Bearer $SEERSTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "user_123", "email": "[email protected]"}'
All successful responses return a JSON object with a success field:
Error responses include an error field with a human-readable message:
{
"error": "Missing or invalid API key"
}
Rate Limits
The API allows up to 1,000 requests per minute per API key.