Create a rule
Create a rule in a namespace.
OAuth scopes
- platform:write
Path Parameters
- Type: stringnamespacerequired
Body
required
application/json
- Type: stringdocumentrequired
- Type: stringslugrequired
- Type: stringtitlerequired
- Type: stringdescription
- Type: booleanis
Private
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/rulesets/{namespace}
curl https://access.scalar.com/v1/rulesets/acme \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"title": "Acme API Rules",
"description": "API for managing Acme products and orders.",
"slug": "acme-rules",
"isPrivate": false,
"document": "extends: [\"spectral:oas\"]\nrules:\n info-contact: warn\n"
}'
{
"uid": "UakgbKJ5m9gl0JDMbcJqL"
}