Decision types
List all decision types with pagination.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Query Parameters
1 <= value11 <= value <= 10020Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/decision-types"{}Create a new decision type with its first version.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Payload for creating a new decision type.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/decision-types" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "options": [ "string", "string" ] }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "active_version": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "version_number": 0, "options": [ "string" ], "reason_codes": [ "string" ], "hard_rules": [ {} ], "input_schema": {}, "confidence_thresholds": {}, "escalation_policy": {}, "created_at": "2019-08-24T14:15:22Z" }, "pii_fields": [], "retention_days": 0, "fallback_option": "string", "model_deployed": false, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Get a decision type by ID with its active version.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "active_version": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "version_number": 0, "options": [ "string" ], "reason_codes": [ "string" ], "hard_rules": [ {} ], "input_schema": {}, "confidence_thresholds": {}, "escalation_policy": {}, "created_at": "2019-08-24T14:15:22Z" }, "pii_fields": [], "retention_days": 0, "fallback_option": "string", "model_deployed": false, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Soft-delete a decision type.
Sets deleted_at so the row is excluded from all queries.
Associated data (versions, examples, policies, logs) is preserved
for audit purposes.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidResponse Body
application/json
curl -X DELETE "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08"Update a decision type.
Only creates a new immutable version when logic fields change (options, reason_codes, hard_rules, input_schema, confidence_thresholds, escalation_policy). Metadata-only changes (name, description, pii_fields, retention_days) update the DecisionType row without bumping the version.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Payload for updating a decision type (all fields optional).
Response Body
application/json
application/json
curl -X PUT "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "active_version": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "version_number": 0, "options": [ "string" ], "reason_codes": [ "string" ], "hard_rules": [ {} ], "input_schema": {}, "confidence_thresholds": {}, "escalation_policy": {}, "created_at": "2019-08-24T14:15:22Z" }, "pii_fields": [], "retention_days": 0, "fallback_option": "string", "model_deployed": false, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}List all versions for a decision type.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions"[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "version_number": 0, "options": [ "string" ], "reason_codes": [ "string" ], "hard_rules": [ {} ], "input_schema": {}, "confidence_thresholds": {}, "escalation_policy": {}, "created_at": "2019-08-24T14:15:22Z" }]Get a specific version of a decision type.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuiduuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "version_number": 0, "options": [ "string" ], "reason_codes": [ "string" ], "hard_rules": [ {} ], "input_schema": {}, "confidence_thresholds": {}, "escalation_policy": {}, "created_at": "2019-08-24T14:15:22Z"}