Delete an A/B variant
Soft-deletes a variant and deactivates it. It stops being picked for new calls and disappears from
GET /api/agents/{agentId}/ab-tests and the results; it no longer counts toward the 10-variant
limit. Calls already placed with it keep their reference. To stop a variant but keep it in the
comparison, PATCH it with isActive: false instead.
Side effects. Writes an audit entry.
Idempotency. Safe to retry: a second call answers 404 Variant not found or already deleted.
Webhook events. audit.log_recorded (when subscribed). See Webhooks.
Access
- Required scope:
write. - Rate limit: Agent mutations — 10 requests/min per workspace, shared with every agent write; the request also counts against the General API limit. See Rate limits.
- Plan: Every plan includes A/B testing. It requires an active subscription (
active,trialingorpast_due); without one every A/B test operation, reads included, is refused with403 BILLING_ERROR(metadata.kind: subscription_required).
Authentication
Workspace API key: jl_ followed by 64 lowercase hex characters, created by the workspace owner in the
dashboard (Settings → API Keys) and sent as Authorization: Bearer jl_.... The plaintext is shown once,
at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys.
Operations restricted to admins or owners reject keys without the full scope with 403, and say so in
their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret —
that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds.
See Authentication.
Path parameters
UUID of the agent that owns the variant. A value that is not a UUID answers 400 Invalid params.
UUID of the variant to delete. A variant of another agent, another workspace or already deleted answers 404; a value that is not a UUID answers 400 Invalid params.

