Spec0docs
API Reference

Publish OpenAPI spec from CLI

Publishes a design-time API spec for CLI workflows.

  • If apiId is provided: update that API metadata/spec and publish version.
  • If apiId is omitted: create a new API using name + team and publish version.
POST
/api-management/cli/v1/publish

Header Parameters

X-Org-Id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api-management/cli/v1/publish" \  -H "X-Org-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "openapiSpec": "string"  }'
{
  "apiId": "2500ac85-f71b-4d01-b32c-62f3af3fe2c5",
  "specRecordId": "f0de8374-0665-454e-81ee-9d4898be7f8b",
  "version": "string",
  "created": true,
  "versionCreated": true,
  "noChanges": true,
  "versionUnchanged": true,
  "versionUnchangedHint": "string",
  "apiName": "string",
  "teamName": "string",
  "orgSlug": "string",
  "registryUrl": "string"
}
{
  "status": 0,
  "title": "string",
  "detail": "string"
}
{
  "status": 0,
  "title": "string",
  "detail": "string"
}
{
  "status": 0,
  "title": "string",
  "detail": "string"
}
{
  "status": 0,
  "title": "string",
  "detail": "string"
}
{
  "status": 0,
  "title": "string",
  "detail": "string"
}