AckdbSourceDefinition

Defines the expected shape of data arriving from a source type. Global defaults ship with ackDB.

Properties

sourceTypestringrequired

Source type identifier

contentSchemaobjectrequired

Field names → type strings. "?" suffix means optional (e.g. "string?").

identityLinkTypesarray ofrequired

External ID types this source can produce.

string
defaultTraitsarray ofrequired

Traits that auto-populate when an org enables this source.

validEventTypesarray ofrequired

Valid 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.

string
eventTypeFieldstring | nullrequired

Which content.metadata field determines the event type. Null means the source has a single static event type (e.g. Slack always produces 'message').

eventTypePrefixstringrequired

Namespace prefix for event types (e.g. 'stripe_'). When eventTypeField is null, this is used as the full static event type.

eventMetadataFieldsarray ofrequired

Content.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.

string
createdAtstring <date-time>required

When this definition was created.

Example

AckdbSourceDefinition 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"
}