Create a rule

Create a rule in a namespace.

Path Parameters
  • namespace
    Type: string
    required
Body
required
application/json
  • document
    Type: string
    required
  • slug
    Type: string
    required
  • title
    Type: string
    required
  • description
    Type: string
  • isPrivate
    Type: boolean
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/rulesets/{namespace}
import Scalar from '@scalar/sdk';

const client = new Scalar({
  bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var
});

const createRuleset = await client.rules.createRuleset('namespace', {
  title: '',
  slug: '',
  document: '',
});

console.log(createRuleset);
{
  "uid": "string"
}