Skip to main content
POST
/
capture
TypeScript SDK
import Seerstack from 'seerstack';

const client = new Seerstack({
  apiKey: process.env['SEERSTACK_API_KEY'],
});

const response = await client.events.capture({
  name: 'invoice.paid',
  user_id: 'user_123',
  data: {
    invoice_id: 'inv_993',
    amount: 2000,
    currency: 'usd'
  }
});

console.log(response.success);
{
  "success": true
}

Authorizations

Authorization
string
header
required

Use your SeerStack API key as a Bearer token. You can find your API key in the SeerStack Dashboard under Settings > Developer.

Body

application/json
name
string
required

The name of the event. We recommend using noun.verb syntax (e.g., invoice.paid, user.signup).

Example:

"invoice.paid"

user_id
string

The external user ID associated with this event. Use your database's primary key.

Example:

"user_123"

timestamp
string<date-time>

ISO 8601 timestamp for when the event occurred. Defaults to the current time if not provided.

Example:

"2025-01-04T12:00:00Z"

data
object

Additional data to include with the event. Can contain any JSON-serializable values.

Example:
{
"invoice_id": "inv_993",
"amount": 2000,
"currency": "usd"
}

Response

Event captured successfully

success
boolean
required

Indicates whether the operation was successful.

Example:

true