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.
128Body
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.
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.