Create a rule

​

Create a rule in a namespace.

OAuth scopes
  • platform:write

Path Parameters

Body

required
application/json

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"
}