Skip to main content
POST
Save a captured conversation or scripted scenario as a regression case. Choose exactly one conversation or scenario. Cases may be saved without criteria, but cannot run until they have at least one local or shared criterion. Copies require the same agent and source conversation; they copy saved setup, including recovered mocks, and do not copy runs.

Headers

string
required
Bearer token containing your workspace API key. The key needs write scope.

Body parameters

string
required
Agent UUID. The agent must belong to the workspace.
enum
required
conversation or scenario.
string
Required for conversation cases. Must be absent for scenarios.
string
required
Nonblank name, up to 200 characters.
array
Local criterion definitions, up to 50. Defaults to an empty array; shared group checks can supply run criteria.
array
Shared group UUIDs, up to 50. Overrides the single-group compatibility field.
string
Single shared group UUID. Prefer criteriaGroupIds for new integrations.
object
Attribute values for this test only, up to 100 KB. Reserved top-level names __proto__, constructor and prototype are rejected.
object
Required scripted input when sourceType is scenario. See Case input.
array
Captured-conversation response overrides, up to 200. See Recorded Action overrides.
array
Up to 100 manual references: kind is rule or article, and id is a UUID. Rules must be assigned to the agent; articles must be live workspace articles.
string
Collection UUID to add the new case to.
string
Conversation case UUID to copy from its saved snapshot. Requires duplicateSourceUpdatedAt.
string
ISO timestamp from the source case. Requires duplicateOfCaseId; stale copies return 409.

Response

Returns the case detail, effective and local criteria, setup, artifacts and history. A new scenario intentionally has empty arrays for Action-response overrides and run history.