Skip to content

Copy a historical rule version as a new active version

Requires ADMIN. Target must be superseded/rolled_back (not draft/active).

projectId
required
string

Project (tenant) identifier. Row-level tenant isolation is enforced on every query.

id
required
string

New active version cloned from the target.

Media typeapplication/json
object
version
object
id
string
projectId
string
campaignId
string
version
integer
conditionJson
string
effectsJson
string
rulesHash
string
status
string
cooldownSeconds
integer
createdAt
string
publishedAt
string | null
rolledBackFrom
object
id
string
version
integer

Missing/invalid path input (e.g. projectId) or invalid JSON body.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Not authenticated (401 via requireAuthenticated) or insufficient project role (403).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Resource not found (or cross-tenant — same 404).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Target not a historical version (error=invalid_state), duplicate hash, or active conflict.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}