Skip to main content
PUT
Update a ruleset.

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Path Parameters

id
string
required

ObjectId hex or custom ruleset_id.

Body

name
string
required
definition
string
required

Full Spectral ruleset definition stored as a JSON string.

ruleset_id
string

Optional stable identifier. If not provided, defaults to the record's internal ID hex. Must be unique within the org. Never changed after creation.

description
string
active
boolean
resource_type
enum<string>
Available options:
oas-api,
mcp-api
action
enum<string>
Available options:
none,
warn
categories
string[] | null

Optional list of category names to associate with this ruleset. Each value must match an existing org API category (as returned by GET /apis/categories); matching is case-insensitive. Unknown values are rejected with 400. Entries are sanitized before validation and storage: surrounding whitespace is trimmed, empty entries are dropped, and case-insensitive duplicates are removed (first occurrence wins).

Example:

Response

Ruleset updated.

_id
string
ruleset_id
string

Stable migration identifier. Same value across environments.

org_id
string
name
string
description
string
active
boolean
resource_type
string
action
string
categories
string[] | null
owner
string

ID of the user who created the ruleset. Set server-side from the session; cannot be supplied by the caller.

definition
string

Full Spectral ruleset definition stored as a JSON string.

is_template
boolean
date_created
string<date-time>
last_updated
string<date-time>