postv1ApisNamespace
Create an API
Create a new api document specification
Path Parameters
- Type: string
namespace required
Body
required
application/json
- Type: string
description - Type: string
document required - Type: boolean
is Private - Type: string
ruleset - Type: string
slug required - Type: string
title required - Type: string
version Pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$required
Responses
- Type: object
200 - Type: string
uid required
- Type: object
400 - Type: string
code required - Type: string
message required
- Type: object
401 - Type: string
code required - Type: string
message required
- Type: object
403 - Type: string
code required - Type: string
message required
- Type: object
404 - Type: string
code required - Type: string
message required
- Type: object
422 - Type: string
code required - Type: string
message required
- Type: object
500 - Type: string
code required - Type: string
message required
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.apiDocs.postv1ApisNamespace({
namespace: "<value>",
requestBody: {
title: "<value>",
version: "<value>",
slug: "<value>",
document: "<value>",
},
});
console.log(result);
}
run();
{
"uid": "string"
}