VocalDocscontracts 1.65.0

Delete a case of a decision corpus

DELETE /v1/agents/{agent_id}/decision-corpora/{corpus_id}/cases/{case_id}

PropertyValue
Operationdelete_decision_case
GroupDecision corpora
Scopeagents:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited decision_case.delete (mutation)
Released in1.58.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Deletes the case at the corpus revision If-Match names and raises the corpus's version and revision (1.58.0); earlier runs keep their results.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the agents:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X DELETE "$VOCAL_API/v1/agents/agt_.../decision-corpora/dcp_.../cases/dcs_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"'

Parameters

NameInTypeRequiredDescription
agent_idpathAgentIdyesThe id of an Agent: agt_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
corpus_idpathDecisionCorpusIdyesThe id of a decision corpus: dcp_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
case_idpathDecisionCaseIdyesThe id of one case of a decision corpus: dcs_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Responses

StatusContent typeShapeError codes
200application/jsonDecisionCaseDeletion
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopedecision_corpus_archived
412application/jsonErrorEnveloperevision_mismatch
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is DecisionCaseDeletion.

FieldTypeRequiredDescription
corpus_versionintegeryesThe corpus's version after the deletion.
deleted_atTimestampyes
idDecisionCaseIdyes
object"decision_case_deletion"yes