Scalar Rules API
The rules API from Scalar — 6 operation(s) for rules.
The rules API from Scalar — 6 operation(s) for rules.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/scalar:scalar-rules-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Scalar Rules API
contact:
name: Marc from Scalar
url: https://scalar.com
email: support@scalar.com
version: '1.0'
description: 'Operations tagged rules across 3 of this provider''s published API definitions: scalar-core.json, scalar-openapi.json, scalar-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.scalar.com/core
security:
- BearerAuth: []
tags:
- name: Rules
paths:
/rulesets/{namespace}/{slug}:
get:
tags:
- Rules
description: Get a the rule document
operationId: getrulesetsNamespaceSlug
responses:
'200':
description: Default Response
content:
application/json:
schema: {}
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
parameters:
- schema:
type: string
in: path
name: namespace
required: true
- schema:
type: string
in: path
name: slug
required: true
summary: Getrulesets namespace slug
x-summary-source: derived
patch:
tags:
- Rules
description: Update rule metadata
operationId: patchrulesetsNamespaceSlug
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
namespace:
type: string
slug:
type: string
title:
type: string
description:
type: string
isPrivate:
type: boolean
blockPublishOn:
type: string
enum:
- error
- warning
- info
- hint
- none
additionalProperties: false
required: true
parameters:
- schema:
type: string
in: path
name: namespace
required: true
- schema:
type: string
in: path
name: slug
required: true
summary: Patchrulesets namespace slug
x-summary-source: derived
delete:
tags:
- Rules
description: Delete a specific rule
operationId: deleterulesetsNamespaceSlug
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
parameters:
- schema:
type: string
in: path
name: namespace
required: true
- schema:
type: string
in: path
name: slug
required: true
summary: Deleterulesets namespace slug
x-summary-source: derived
/rulesets/get-by-id/{uid}:
get:
tags:
- Rules
description: Get a the rule document
operationId: getrulesetsGetByIdUid
responses:
'200':
description: Default Response
content:
application/json:
schema: {}
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
parameters:
- schema:
type: string
in: path
name: uid
required: true
summary: Getrulesets get by id uid
x-summary-source: derived
/rulesets/{namespace}:
get:
tags:
- Rules
description: Get a list of all rulesets for the namespace
operationId: getrulesetsNamespace
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: array
items:
type: object
properties:
uid:
default: nanoid()
$ref: '#/components/schemas/nanoid'
title:
default: ''
type: string
maxLength: 100
description:
default: ''
type: string
slug:
default: randomManagedDocSlug()
$ref: '#/components/schemas/slug'
namespace:
$ref: '#/components/schemas/namespace'
isPrivate:
default: false
type: boolean
required:
- uid
- title
- description
- slug
- namespace
- isPrivate
additionalProperties: false
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
parameters:
- schema:
type: string
in: path
name: namespace
required: true
summary: Getrulesets namespace
x-summary-source: derived
post:
tags:
- Rules
description: Create a new rule for the namespace
operationId: postrulesetsNamespace
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
uid:
type: string
required:
- uid
additionalProperties: false
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
title:
type: string
description:
type: string
slug:
type: string
isPrivate:
type: boolean
blockPublishOn:
type: string
enum:
- error
- warning
- info
- hint
- none
document:
type: string
required:
- title
- slug
additionalProperties: false
required: true
parameters:
- schema:
type: string
in: path
name: namespace
required: true
summary: Postrulesets namespace
x-summary-source: derived
/rulesets/upload:
post:
tags:
- Rules
description: Update rule content
operationId: postrulesetsUpload
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
uid:
type: string
data:
type: string
required:
- uid
- data
additionalProperties: false
required: true
summary: Postrulesets upload
x-summary-source: derived
/rules/access-group:
post:
tags:
- Rules
description: Adds an access group to a rule
operationId: postrulesAccessGroup
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
namespace:
type: string
slug:
type: string
groupUid:
$ref: '#/components/schemas/nanoid'
required:
- namespace
- slug
- groupUid
additionalProperties: false
required: true
summary: Postrules access group
x-summary-source: derived
delete:
tags:
- Rules
description: Removes an access group from a rule
operationId: deleterulesAccessGroup
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: 'null'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
namespace:
type: string
slug:
type: string
groupUid:
$ref: '#/components/schemas/nanoid'
required:
- namespace
- slug
- groupUid
additionalProperties: false
required: true
summary: Deleterules access group
x-summary-source: derived
/rulesets/check-slug:
post:
tags:
- Rules
description: Checks if a ruleset slug is available for the provided namespace
operationId: postrulesetsCheckSlug
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
available:
type: boolean
required:
- available
additionalProperties: false
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: No auth
content:
application/json:
schema:
$ref: '#/components/schemas/401'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/403'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/404'
'422':
description: Invalid payload
content:
application/json:
schema:
$ref: '#/components/schemas/422'
'500':
description: Uncaught error
content:
application/json:
schema:
$ref: '#/components/schemas/500'
requestBody:
content:
application/json:
schema:
type: object
properties:
namespace:
$ref: '#/components/schemas/namespace'
slug:
$ref: '#/components/schemas/slug'
required:
- namespace
- slug
additionalProperties: false
required: true
summary: Postrulesets check slug
x-summary-source: derived
components:
schemas:
namespace:
type: string
minLength: 3
maxLength: 50
pattern: ^[a-zA-Z0-9-_]+$
slug:
type: string
minLength: 3
maxLength: 60
pattern: ^[a-z](?:[a-z0-9-]*[a-z0-9])?$
'401':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
'404':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
'422':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
'403':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
'500':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
nanoid:
type: string
minLength: 5
'400':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
namespace_2:
type: string
minLength: 2
maxLength: 50
pattern: ^[a-zA-Z0-9-_]+$
examples:
- acme
slug_2:
type: string
minLength: 1
maxLength: 60
pattern: ^[a-z](?:[a-z0-9-]*[a-z0-9])?$
examples:
- acme-api
'401_2':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: Invalid authentication token.
code: unauthorized
'404_2':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: Resource not found.
code: not-found
'422_2':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: The request body contains invalid values.
code: invalid-payload
'403_2':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: You do not have permission to access this resource.
code: forbidden
'500_2':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: An unexpected error occurred.
code: unknown
nanoid_2:
type: string
minLength: 5
examples:
- UakgbKJ5m9gl0JDMbcJqL
'400_2':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: Invalid request parameters.
code: bad-request
namespace_3:
type: string
minLength: 2
maxLength: 50
pattern: ^[a-zA-Z0-9-_]+$
examples:
- acme
slug_3:
type: string
minLength: 1
maxLength: 60
pattern: ^[a-z](?:[a-z0-9-]*[a-z0-9])?$
examples:
- acme-api
'401_3':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: Invalid authentication token.
code: unauthorized
'404_3':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: Resource not found.
code: not-found
'422_3':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: The request body contains invalid values.
code: invalid-payload
'403_3':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: You do not have permission to access this resource.
code: forbidden
'500_3':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: An unexpected error occurred.
code: unknown
nanoid_3:
type: string
minLength: 5
examples:
- UakgbKJ5m9gl0JDMbcJqL
'400_3':
type: object
properties:
message:
type: string
code:
type: string
required:
- message
- code
examples:
- message: Invalid request parameters.
code: bad-request
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
x-refined-from:
- scalar-core.json
- scalar-openapi.json
- scalar-openapi.json