Create API Document
Create an API document.
Path Parameters
- Type: stringnamespacerequired
Body
required
application/json
- Type: stringdocumentrequired
- Type: stringslugrequired
- Type: stringtitlerequired
- Type: string ·versionmin length:1required
- Type: stringdescription
- Type: booleanis
Private - Type: stringruleset
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/apis/{namespace}
import { Scalar } from "@scalar/sdk";
const scalar = new Scalar({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await scalar.registry.postv1ApisNamespace({
namespace: "<value>",
requestBody: {
title: "<value>",
version: "<value>",
slug: "<value>",
document: "<value>",
},
});
console.log(result);
}
run();
{
"uid": "string"
}