Create a docs project
Create a docs project. Omit provider to have Scalar host the repository.
Body
required
application/json
- Type: stringnamerequired
- Type: "forgejo" or "github" or "bitbucket"enumproviderrequired
- Properties: 2Type: objectbitbucket
Repository - Type: booleanblank
- Properties: 2Type: objectgithub
Repository - Type: booleanis
Private - Type:slugmin length:1max length:60
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/docs
import Scalar from '@scalar/sdk';
const client = new Scalar({
bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var
});
const docsProject = await client.scalarDocs.createProject({
name: 'Acme Documentation',
provider: 'forgejo',
});
console.log(docsProject);
{
"uid": "UakgbKJ5m9gl0JDMbcJqL",
"name": "Acme Documentation",
"slug": "acme-api",
"isPrivate": false,
"accessGroups": [
"UakgbKJ5m9gl0JDMbcJqL"
],
"loginPortalUid": "LakgbKJ5m9gl0JDMbcJqL",
"activeThemeId": "TakgbKJ5m9gl0JDMbcJqL",
"agentEnabled": true,
"analyticsEnabled": true,
"lastPublished": null,
"publishStatus": "published"
}