Create or replace draft
Creates an unpublished draft for a custom schema so you can iterate on changes without affecting any exports that reference the current published version.
Two modes:
- Empty body — copies the latest published version into a new draft. Useful when you want to start editing from the current state.
- JSON body (same shape as
PUT /v1/export-schemas/{id}/draft) — creates the draft directly with the supplied content.
If a draft already exists, it is replaced. The published version is not touched.
Built-in schemas have no drafts — the request returns 404 not_found.
Publish the draft with POST /v1/export-schemas/{id}/publish, or discard it with
DELETE /v1/export-schemas/{id}/draft.
Authorizations
Your API key. Get one from the dashboard at https://app.ticksupply.com/api-keys
Headers
Unique key for idempotent requests. If you retry a request with the same key, you'll receive the original response without the operation being performed again.
Must be a valid UUID (any version — v4 recommended for uniqueness), up to 128 characters.
128Path Parameters
Export schema ID
^sch_[a-f0-9]{32}$Body
Body for replacing a schema's content. Used by atomic update (PUT /v1/export-schemas/{id}), and by draft create/update (POST / PUT /v1/export-schemas/{id}/draft). name and stream_category are immutable — they are set when the schema is first created and cannot be changed by these endpoints.
Replacement column definitions, in output order. Must contain at least one column. Capped at 100 columns by default; contact support to request a higher limit. Exceeding the limit returns 400 invalid_argument.
1Per-exchange unfold rules. Omit (or send null) to clear any previously configured unfold rules.
Per-exchange derived-field rules (same shape as on create). Omit (or send null) to clear any previously configured derive rules.
Response
Draft created. has_draft is true and version reflects the latest published version (unchanged).
Export schema with the content of its latest published version. Returned by create and get-by-id. Exports that reference the schema by name or ID snapshot the latest published version at the time the export is created.
Export schema ID
^sch_[a-f0-9]{32}$"sch_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4"
Schema name
"normalized"
Stream category this schema applies to
trade, orderbook, book_update, quote, kline, ticker, liquidation "trade"
true for schemas provided by Ticksupply (e.g., normalized, book_5, book_20). Built-ins are read-only and cannot be deleted. false for schemas you created.
false
Creation timestamp
Published version number reflected in this response. 1 for a newly created schema.
1
Whether an unpublished draft version exists for this schema.
false
Column definitions from the latest published version, in output order.
Per-exchange unfold rules. When an exchange packs multiple events into one JSON array, unfold expands each element into its own row. Keys are exchange codes, values specify the JSON path to the array. Omitted when no unfold rules are configured.
Per-exchange derived-field rules. Each exchange maps to a list of synthetic fields computed before column extraction. Omitted when no derive rules are configured.