SignalInput

One usage event.

  • What happened, e.g. document_uploaded. Plans price usage and spend credits by it.

  • Which of your products the usage is for.

    Properties: 2
  • Whose usage it is, by customerId or externalCustomerId (one of them is required and can't be empty: 400 otherwise). Required unless customerUnit is given. A customer that doesn't exist yet is accepted: the signal is kept unattributed and joins them once they do. With a customer API key, it must be the key's own customer.

    Properties: 2
  • The customer unit (team, workspace or project) the usage belongs to. Without customer, the unit's customer is the signal's customer, and a unit that doesn't exist is a 404 CUSTOMER_UNIT_NOT_FOUND. With customer, it must be that customer's unit (400 CUSTOMER_UNIT_MISMATCH, also when that customer doesn't exist yet). Usage on a non-billable unit, or under one, is kept but not charged.

    Properties: 1
  • Anything to keep with the signal; plans can price by its numbers (quantity, or the field the plan names). trace_id links the AI costs traced under that trace ID; external_user_id names the customer's user who did it. Keys _derived, _dims and _billing, and keys starting with them and a dot, are reserved.

    Properties: 1
  • Your unique ID for this event. A signal whose key was used before is a duplicate and isn't stored again. Keys don't expire. With an org key, keys can't start with sb:ck:.

  • When the usage happened (ISO 8601). Default when the request arrives.