Create a property definition
curl -X POST "https://api.summerbase.com/v1/property_definitions" \ -H "Authorization: Bearer sb_..." \ -H "Content-Type: application/json" \ -d '{ "key": "seats", "label": "Seats", "subject_type": "customer", "value_type": "number" }'const response = await fetch("https://api.summerbase.com/v1/property_definitions", { method: "POST", headers: { Authorization: "Bearer sb_...", "Content-Type": "application/json", }, body: JSON.stringify({ "key": "seats", "label": "Seats", "subject_type": "customer", "value_type": "number" }),})const data = await response.json()Declare a key before anything writes it, so the first value arrives with a type already decided.
Worth doing for a key whose values come from a provider, where everything
is a string: declaring seats a number here is what makes a range filter
on it work later. The key lands in your own source’s namespace.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Relationships to include in the response instead of fetching separately. A dotted path expands what an expanded record can expand in turn — at most 4 deep, 10 paths a request, and never back to a record already on the path.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The key, as written. Immutable once it exists.
What a screen calls this property: the name the source that owns it
gave it, or the key in words — deal_stage is Deal Stage.
What kind of record this key describes.
What values of this key hold, fixed by the first one written.
Example
{ "key": "seats", "label": "Seats", "subject_type": "customer", "value_type": "number"}Response
Section titled “Response”Returns the property definition object.
Example
{ "archived": false, "created_at": "2026-02-11T09:20:13Z", "id": "0198f1a5-7a8b-7c9d-8e0f-1a2b3c4d5e6f", "key": "seats", "label": "Seats", "object": "property_definition", "source_id": "0198f1a3-0c18-7d93-a6e2-1b4f9d7c3a58", "subject_type": "customer", "value_type": "number"}