AckdbSourceDefinition
Defines the expected shape of data arriving from a source type. Global defaults ship with ackDB.
Properties
sourceTypestringrequiredSource type identifier
contentSchemaobjectrequiredField names → type strings. "?" suffix means optional (e.g. "string?").
identityLinkTypesarray ofrequiredExternal ID types this source can produce.
defaultTraitsarray ofrequiredTraits that auto-populate when an org enables this source.
validEventTypesarray ofrequiredValid event types for this source, as stored on `entity_events.event_type` (the source's `eventTypePrefix` is prepended to the bare metadata event type). Write API rejects unknown types. This is a denormalized convenience copy - the authoritative, always-current list (with full field schemas and ingest examples) is `GET /schemas/sources/{sourceType}/events`. For Stripe: `stripe_charge.succeeded`, `stripe_charge.refunded`, `stripe_invoice.paid`, `stripe_customer.subscription.created`, etc. For Slack: `slack_message`, `slack_member_joined_channel`, etc.
eventTypeFieldstring | nullrequiredWhich content.metadata field determines the event type. Null means the source has a single static event type (e.g. Slack always produces 'message').
eventTypePrefixstringrequiredNamespace prefix for event types (e.g. 'stripe_'). When eventTypeField is null, this is used as the full static event type.
eventMetadataFieldsarray ofrequiredContent.metadata fields to promote into entity_events.metadata for queryable event data. These fields become available for filtering in search_events and aggregation in aggregate_events.
createdAtstring <date-time>requiredWhen this definition was created.
Example
{
"sourceType": "slack",
"contentSchema": {
"channel_id": "string",
"channel_name": "string",
"message_text": "string",
"user": "string",
"thread_ts": "string?",
"timestamp": "datetime"
},
"identityLinkTypes": [
"slack_channel_id",
"slack_user_id"
],
"defaultTraits": [
{
"traitKey": "slack_message_count",
"valueType": "number"
}
],
"validEventTypes": [
"stripe_customer.subscription.created",
"stripe_charge.succeeded",
"stripe_invoice.paid",
"stripe_charge.refunded"
],
"eventTypeField": "event_type",
"eventTypePrefix": "stripe_",
"eventMetadataFields": [
"amount_cents",
"currency",
"status",
"customer_id"
],
"createdAt": "1970-01-01T00:00:00.000Z"
}