DocsSkmtc API

This reference is the skmtc/skmtc-api API on Hub. Star it to see each revision, and add a pipeline to get its changes.

Star

Publishing

POST

Publish an API schema

Changed on Nov 24, 2026

Publish a schema. Visibility is mandatory so an omitted query parameter can never publish a private schema publicly by accident. The body is the raw OpenAPI JSON or YAML document. Repeating the same document is content-addressed and deduplicated.

With slug, the publish adds a revision to the API at that slug, or creates it there. Without slug, it creates a new API at a slug derived from the document's info.title, unless the owner already has an API with the same bytes, which is returned with deduped: true, or, with originUrl, an API that already has that source, which takes the revision. Either way, a publish onto an API that exists needs that API's visibility, or it is a 409.

Request

Method
POST
Path
/v1/apis/publish
content-type
application/octet-stream

Query parameters

owner, string

Handle of the account that will own the API - the caller, or an organization the caller is a member of. Defaults to the caller.

slug, string

URL slug of the API within the owner's namespace. Omit to derive one from the document's info.title.

visibility, 'public' | 'private' required

Whether a resource is world-readable or restricted to its owner.

filename, string
originUrl, string

As on uploadApi: the fetchable origin of these bytes, when known.

Request body

string

Response

201 application/json

The request has succeeded and a new resource has been created as a result.

object

The outcome of importing a schema document into the catalog.

api, object required

The API the schema belongs to - newly created, or extended with a revision.

revision, object required

The revision created - or the pre-existing one when deduped is true.

deduped, boolean required

True when identical content already existed; no new revision was created.

isNewApi, boolean required

True when the import created a brand-new API entry.

docsUrl, string required

The absolute URL of the API's docs page.

diffsPending, boolean required

True when the API's full revision history is still being archived + diffed in the background - a large GitHub history deferred to the diff-backfill queue so the import responds without waiting on minutes of container diffs. The returned revision (the newest) is complete; older revisions' diffs fill in shortly. False for single-revision imports, which diff inline.

bundlePending, boolean required

True when the returned revision is not the bundle yet: its document refers to other files, and their download and the bundle run in the background. False when the revision's document is complete.

Example response
{
  "api": {
    "id": "string",
    "owner": {
      "id": "string",
      "handle": "string",
      "displayName": "string",
      "type": "user",
      "avatarUrl": "string",
      "bio": "string",
      "location": "string",
      "emailDomain": "string",
      "claimStatus": "claimed",
      "joinedAt": "2026-10-30T12:00:00Z",
      "url": "string",
      "htmlUrl": "string"
    },
    "slug": "string",
    "name": "string",
    "displayName": "string",
    "language": "en",
    "translationOf": {
      "language": "en",
      "slug": "string",
      "url": "string",
      "htmlUrl": "string"
    },
    "translations": [
      {
        "language": "en",
        "slug": "string",
        "url": "string",
        "htmlUrl": "string"
      }
    ],
    "visibility": "public",
    "description": "string",
    "category": "ai-machine-learning",
    "readme": "string",
    "providerName": "string",
    "homepageUrl": "string",
    "logoUrl": "string",
    "isVerified": true,
    "license": {
      "name": "string",
      "spdxId": "string",
      "url": "string"
    },
    "contact": {
      "name": "string",
      "url": "string",
      "email": "string"
    },
    "externalDocs": {
      "url": "string",
      "description": "string"
    },
    "sources": [
      {
        "id": "string",
        "type": "direct_url",
        "url": "string",
        "extractor": "docusaurus-openapi-docs",
        "pages": [
          {
            "url": "string",
            "checkedAt": "2026-10-30T12:00:00Z",
            "changedAt": "2026-10-30T12:00:00Z",
            "contentHash": "string",
            "operationCount": 0
          }
        ],
        "requestMethod": "GET",
        "requestContentType": "string",
        "discoveredVia": "string",
        "isPrimary": true,
        "refetchEnabled": true,
        "lastCheckedAt": "2026-10-30T12:00:00Z",
        "lastStatus": "updated",
        "lastError": "string",
        "createdAt": "2026-10-30T12:00:00Z"
      }
    ],
    "versions": [
      {
        "label": "string",
        "stability": "ga",
        "isDefault": true,
        "sortRank": 0,
        "releasedAt": "2026-10-30T12:00:00Z",
        "eolAt": "2026-10-30T12:00:00Z"
      }
    ],
    "lastCheckedAt": "2026-10-30T12:00:00Z",
    "lastUpdatedAt": "2026-10-30T12:00:00Z",
    "latestVersionRef": "string",
    "versionCount": 0,
    "retiredAt": "2026-10-30T12:00:00Z",
    "starCount": 0,
    "consumerCount": 0,
    "getStarted": {
      "signUp": {
        "humans": {
          "steps": [
            "string"
          ],
          "facts": [
            {
              "kind": "agentSignUp",
              "tone": "easier",
              "label": "string"
            }
          ],
          "sources": [
            {
              "title": "string",
              "url": "string",
              "checkedAt": "2026-10-30"
            }
          ]
        },
        "agents": {
          "score": 1,
          "firstAccess": "live",
          "steps": [
            {
              "actor": "agent",
              "text": "string"
            }
          ],
          "facts": [
            {
              "kind": "agentSignUp",
              "tone": "easier",
              "label": "string"
            }
          ],
          "sources": [
            {
              "title": "string",
              "url": "string",
              "checkedAt": "2026-10-30"
            }
          ]
        }
      },
      "auth": {
        "rows": [
          {
            "label": "string",
            "value": "string"
          }
        ],
        "sources": [
          {
            "title": "string",
            "url": "string",
            "checkedAt": "2026-10-30"
          }
        ]
      },
      "pricing": {
        "rows": [
          {
            "label": "string",
            "value": "string"
          }
        ],
        "sources": [
          {
            "title": "string",
            "url": "string",
            "checkedAt": "2026-10-30"
          }
        ],
        "paymentMethods": [
          "card"
        ],
        "agentPayments": [
          "x402"
        ],
        "freeTier": "none"
      }
    },
    "createdAt": "2026-10-30T12:00:00Z",
    "updatedAt": "2026-10-30T12:00:00Z",
    "url": "string",
    "htmlUrl": "string",
    "viewer": {
      "canRead": true,
      "canWrite": true,
      "canAdmin": true
    }
  },
  "revision": {
    "publishedAt": "2026-10-30T12:00:00Z",
    "isLatest": true,
    "hasDocument": true,
    "documentUrl": "string",
    "commit": {
      "sha": "string",
      "message": "string",
      "date": "2026-10-30T12:00:00Z",
      "htmlUrl": "string"
    },
    "linkedRepositoryRun": {
      "repository": "string",
      "sha": "string",
      "runId": "string",
      "runAttempt": "string",
      "workflowRef": "string",
      "htmlUrl": "string"
    },
    "specType": "openapi",
    "specVersion": "string",
    "documentVersion": "string",
    "license": {
      "name": "string",
      "spdxId": "string",
      "url": "string"
    },
    "contact": {
      "name": "string",
      "url": "string",
      "email": "string"
    },
    "externalDocs": {
      "url": "string",
      "description": "string"
    },
    "retrievedAt": "2026-10-30T12:00:00Z",
    "sourceType": "direct_url",
    "derivedFrom": {
      "pages": [
        {
          "url": "string",
          "checkedAt": "2026-10-30T12:00:00Z",
          "changedAt": "2026-10-30T12:00:00Z",
          "contentHash": "string",
          "operationCount": 0
        }
      ],
      "snapshotAt": "2026-10-30T12:00:00Z",
      "extractor": "string",
      "repairs": [
        {
          "repair": "string",
          "at": "string"
        }
      ]
    },
    "operationCount": 0,
    "schemaCount": 0,
    "serverUrl": "string",
    "authSchemes": [
      "apiKey"
    ],
    "documentFormat": "json",
    "byteSize": 0,
    "contentHash": "string",
    "contentRef": "string",
    "externalRefs": {
      "fileCount": 0,
      "refCount": 0,
      "files": [
        {
          "path": "string",
          "refs": 0
        }
      ],
      "bundleRefusal": {
        "reason": "relative_refs_in_upload",
        "url": "string",
        "status": 0,
        "limit": "referenced_files",
        "limitValue": 0,
        "detail": "string"
      }
    },
    "url": "string",
    "htmlUrl": "string"
  },
  "deduped": true,
  "isNewApi": true,
  "docsUrl": "string",
  "diffsPending": true,
  "bundlePending": true
}

400 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

code, 'badRequest' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'unprocessable' | 'gone' | 'payloadTooLarge' | 'unsupportedMediaType' | 'documentTooLarge' | 'documentRefersToOtherFiles' | 'marked' | 'webhookLimitReached' | 'rateLimited' | 'internal' | 'unavailable' | 'badGateway' | 'notImplemented' required

Machine-readable error category. Each value pairs with one HTTP status.

message, string required

Human-readable summary safe to surface to end users.

requestId, string required

Correlates the response with server logs for support.

details, array of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

401 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

code, 'badRequest' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'unprocessable' | 'gone' | 'payloadTooLarge' | 'unsupportedMediaType' | 'documentTooLarge' | 'documentRefersToOtherFiles' | 'marked' | 'webhookLimitReached' | 'rateLimited' | 'internal' | 'unavailable' | 'badGateway' | 'notImplemented' required

Machine-readable error category. Each value pairs with one HTTP status.

message, string required

Human-readable summary safe to surface to end users.

requestId, string required

Correlates the response with server logs for support.

details, array of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

403 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

code, 'badRequest' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'unprocessable' | 'gone' | 'payloadTooLarge' | 'unsupportedMediaType' | 'documentTooLarge' | 'documentRefersToOtherFiles' | 'marked' | 'webhookLimitReached' | 'rateLimited' | 'internal' | 'unavailable' | 'badGateway' | 'notImplemented' required

Machine-readable error category. Each value pairs with one HTTP status.

message, string required

Human-readable summary safe to surface to end users.

requestId, string required

Correlates the response with server logs for support.

details, array of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

409 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

code, 'badRequest' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'unprocessable' | 'gone' | 'payloadTooLarge' | 'unsupportedMediaType' | 'documentTooLarge' | 'documentRefersToOtherFiles' | 'marked' | 'webhookLimitReached' | 'rateLimited' | 'internal' | 'unavailable' | 'badGateway' | 'notImplemented' required

Machine-readable error category. Each value pairs with one HTTP status.

message, string required

Human-readable summary safe to surface to end users.

requestId, string required

Correlates the response with server logs for support.

details, array of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}

422 application/json

Binds a concrete HTTP Status to the shared ApiError body.

object

The uniform error envelope returned for every non-2xx response.

code, 'badRequest' | 'unauthorized' | 'forbidden' | 'notFound' | 'conflict' | 'unprocessable' | 'gone' | 'payloadTooLarge' | 'unsupportedMediaType' | 'documentTooLarge' | 'documentRefersToOtherFiles' | 'marked' | 'webhookLimitReached' | 'rateLimited' | 'internal' | 'unavailable' | 'badGateway' | 'notImplemented' required

Machine-readable error category. Each value pairs with one HTTP status.

message, string required

Human-readable summary safe to surface to end users.

requestId, string required

Correlates the response with server logs for support.

details, array of ErrorDetail
Example response
{
  "code": "badRequest",
  "message": "string",
  "requestId": "string",
  "details": [
    {
      "field": "string",
      "message": "string"
    }
  ]
}
Nov 24, 20269468de8ce4f3
  • addedthe new de enum value to the api/allOf[#/components/schemas/Api]/language/allOf[#/components/schemas/ApiLanguage]/ response property for the response status 201
  • addedthe new de enum value to the api/allOf[#/components/schemas/Api]/translationOf/allOf[#/components/schemas/ApiTranslation]/language response property for the response status 201
  • addedthe new de enum value to the api/allOf[#/components/schemas/Api]/translations/items/language response property for the response status 201
  • addedthe new ko enum value to the api/allOf[#/components/schemas/Api]/language/allOf[#/components/schemas/ApiLanguage]/ response property for the response status 201
  • addedthe new ko enum value to the api/allOf[#/components/schemas/Api]/translationOf/allOf[#/components/schemas/ApiTranslation]/language response property for the response status 201
  • addedthe new ko enum value to the api/allOf[#/components/schemas/Api]/translations/items/language response property for the response status 201
  • addedthe new ru enum value to the api/allOf[#/components/schemas/Api]/language/allOf[#/components/schemas/ApiLanguage]/ response property for the response status 201
  • addedthe new ru enum value to the api/allOf[#/components/schemas/Api]/translationOf/allOf[#/components/schemas/ApiTranslation]/language response property for the response status 201
  • addedthe new ru enum value to the api/allOf[#/components/schemas/Api]/translations/items/language response property for the response status 201
Nov 23, 20269ddcffc53372
  • addedthe new es enum value to the api/allOf[#/components/schemas/Api]/language/allOf[#/components/schemas/ApiLanguage]/ response property for the response status 201
  • addedthe new es enum value to the api/allOf[#/components/schemas/Api]/translationOf/allOf[#/components/schemas/ApiTranslation]/language response property for the response status 201
  • addedthe new es enum value to the api/allOf[#/components/schemas/Api]/translations/items/language response property for the response status 201
  • addedthe new fr enum value to the api/allOf[#/components/schemas/Api]/language/allOf[#/components/schemas/ApiLanguage]/ response property for the response status 201
  • addedthe new fr enum value to the api/allOf[#/components/schemas/Api]/translationOf/allOf[#/components/schemas/ApiTranslation]/language response property for the response status 201
  • addedthe new fr enum value to the api/allOf[#/components/schemas/Api]/translations/items/language response property for the response status 201
  • addedthe new pt enum value to the api/allOf[#/components/schemas/Api]/language/allOf[#/components/schemas/ApiLanguage]/ response property for the response status 201
  • addedthe new pt enum value to the api/allOf[#/components/schemas/Api]/translationOf/allOf[#/components/schemas/ApiTranslation]/language response property for the response status 201
  • addedthe new pt enum value to the api/allOf[#/components/schemas/Api]/translations/items/language response property for the response status 201
  • addedthe new referenced_file_blocked enum value to the revision/allOf[#/components/schemas/ApiRevision]/externalRefs/allOf[#/components/schemas/ExternalRefs]/bundleRefusal/allOf[#/components/schemas/BundleRefusal]/reason response property for the response status 201