API Reference

Complete reference for the Solinth REST API.

15 min readUpdated December 2024

Overview

The Solinth API is a RESTful API that allows you to programmatically interact with your Solinth account. All requests use JSON and require authentication.

Base URL

https://api.solinth.com/v1

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer sk_live_xxxxxxxxxxxxx
API Key Security
Keep your API key secure. Never expose it in client-side code or commit it to version control.

Events

Track Event

POST /events

Send a single event to Solinth.

Request Body

{
  "event": "purchase",
  "timestamp": "2024-01-15T10:30:00Z",
  "properties": {
    "amount": 99.00,
    "currency": "USD",
    "customer_id": "cust_123"
  }
}

Response

{
  "success": true,
  "event_id": "evt_abc123"
}

Batch Events

POST /events/batch

Send multiple events in a single request (up to 1000).

Request Body

{
  "events": [
    { "event": "pageview", "properties": { "page": "/home" } },
    { "event": "signup", "properties": { "plan": "free" } }
  ]
}

Metrics

Query Metrics

GET /metrics

Retrieve aggregated metrics.

Query Parameters

  • event (required) - Event name to query
  • metric - Aggregation type: count, sum, avg, min, max
  • property - Property to aggregate (for sum, avg, etc.)
  • from - Start date (ISO 8601)
  • to - End date (ISO 8601)
  • interval - Grouping: hour, day, week, month

Response

{
  "data": [
    { "date": "2024-01-01", "value": 1500 },
    { "date": "2024-01-02", "value": 1750 }
  ],
  "total": 3250
}

Dashboards

List Dashboards

GET /dashboards

Get Dashboard

GET /dashboards/:id

Create Dashboard

POST /dashboards

Update Dashboard

PATCH /dashboards/:id

Delete Dashboard

DELETE /dashboards/:id

Rate Limits

PlanRequests/MinuteEvents/Day
Free10010,000
Pro1,0001,000,000
Enterprise10,000Unlimited

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error
SDKs
We offer official SDKs for JavaScript, Python, Ruby, and Go. Check our GitHub for the latest versions.
Solinth Suite - All-in-One Business Management