Create a rule

​

Create a rule in a namespace.

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}
import Scalar from '@scalar/sdk';

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

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

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