Pinnate Docs

GitHubApp

API reference

Version 0.4.6

Public REST API for managing APIs (OpenAPI documents), JSON Schemas, Spectral rulesets, hosted sites, language SDKs, and generator builds.

Rulesets may define a default blocking severity (off / error / warn / info). Attach a ruleset to an API (and optionally override severity) to reject OpenAPI version publishes that fail Spectral lint at that threshold.

Base URL

Production

Authentication

Organization API key (`sk_…`)

APIs

Register OpenAPI documents, attach Spectral rulesets, and publish new revisions.

List APIs

Lists OpenAPI registry entries in the API key's organization, ordered by name. Each item may include the current spec summary when one is published. Results are paginated with page and limit.

Parameters

page

integerquery

1-based page of results to return.

Example

1

limit

integerquery

Maximum number of items to return (1–100).

Example

10

Responses

data

array object[] · Api[]required

APIs in the API key's organization for the current page.

total

integerrequired

Total number of APIs matching the request across all pages.

Example

1

Create an API

Creates a new OpenAPI registry entry. Optionally attach a Spectral ruleset and blocking severity so later spec uploads are linted before publish.

Request body *

ApiCreateRequest
application/json

name

stringrequired

Display name for the API.

Example

Payments API

slug

string^[a-z0-9]+(?:-[a-z0-9]+)*$

Optional URL slug; derived from `name` when omitted. Used in registry URLs.

Example

payments-api

visibility

string

Registry visibility. Defaults to `private`.

Example

public

values

private
public

description

string

Optional summary shown in the console and public registry.

Example

Charge, refund, and reconcile card payments for connected accounts.

ruleset_id

string

Optional Spectral ruleset to attach for linting uploads.

Example

01J8A7B2C3D4E5F6G7H8J9KMN3

blocking_severity

string

Optional per-API lint threshold override.

Example

warn

values

off
error
warn
info

Responses

data

objectrequired

The API.

Get an API

Returns one API, including its current OpenAPI revision when published.

Parameters

api

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

API ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Responses

data

objectrequired

The API.

Update an API

Update metadata, attached ruleset, or per-API blocking severity override. When a ruleset is attached, new OpenAPI uploads are linted and rejected if findings meet the effective blocking threshold.

Parameters

api

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

API ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Request body *

ApiUpdateRequest
application/json

name

string

Updated display name.

Example

Payments API

slug

string^[a-z0-9]+(?:-[a-z0-9]+)*$

Updated URL slug.

Example

payments-api

visibility

string

Updated registry visibility.

Example

public

values

private
public

description

string | nullnullable

Updated summary. Send `null` to clear.

Example

Charge, refund, and reconcile card payments for connected accounts.

logo_url

string | nullnullable

Updated logo URL. Send `null` to clear.

Example

https://cdn.example.com/logos/payments.svg

ruleset_id

any | null · Ulidnullable

Attach or detach a Spectral ruleset. Send `null` to clear.

Example

01J8A7B2C3D4E5F6G7H8J9KMN3

blocking_severity

any | null · BlockingSeveritynullable

Override or clear the lint blocking threshold. Send `null` to inherit the ruleset default.

Example

warn

Responses

data

objectrequired

The API.

Upload an OpenAPI document

Validates and stores a new current SpecVersion. An unchanged checksum is a no-op that returns the existing current version.

When the API has an attached ruleset, the document is linted with Spectral. Uploads that meet the effective blocking severity are rejected (422) and not stored.

Parameters

api

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

API ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Request body *

SpecUploadRequest
application/json

document

objectrequired

OpenAPI 3.x document as a JSON string or object (YAML strings are also accepted).

Responses

data

objectrequired

The spec version.

Schemas

JSON Schema registry entries and version history for shared models.

List schemas

Lists JSON Schema registry entries in the API key's organization, ordered by name. Results are paginated with page and limit.

Parameters

page

integerquery

1-based page of results to return.

Example

1

limit

integerquery

Maximum number of items to return (1–100).

Example

10

Responses

data

array object[] · Schema[]required

Schemas in the API key's organization for the current page.

total

integerrequired

Total number of schemas matching the request across all pages.

Example

1

Create a schema

Creates a JSON Schema registry entry. Pass an optional document to publish the first version in the same request.

Request body *

SchemaCreateRequest
application/json

name

stringrequired

Display name for the schema.

Example

Customer

slug

string^[a-z0-9]+(?:-[a-z0-9]+)*$

Optional URL slug; derived from `name` when omitted.

Example

customer

visibility

string

Whether the schema is listed on the public registry.

Example

public

values

private
public

description

string

Optional summary shown in the console and public registry.

Example

Canonical customer profile used by billing and support APIs.

document

object

Optional initial JSON Schema document to publish as the first version.

Responses

data

objectrequired

The schema.

Get a schema

Returns one JSON Schema registry entry with its current version when published.

Parameters

schema

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

Schema ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Responses

data

objectrequired

The schema.

Upload a JSON Schema document

Validates and stores a new current SchemaVersion. An unchanged checksum is a no-op that returns the existing current version.

Parameters

schema

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

Schema ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Request body *

DocumentUploadRequest
application/json

document

objectrequired

Document as a JSON string, YAML string, or JSON object.

Responses

data

objectrequired

The schema version.

Rulesets

Spectral rulesets that lint OpenAPI uploads before they become current.

List rulesets

Lists Spectral rulesets in the API key's organization, ordered by name. Results are paginated with page and limit.

Parameters

page

integerquery

1-based page of results to return.

Example

1

limit

integerquery

Maximum number of items to return (1–100).

Example

10

Responses

data

array object[] · Ruleset[]required

Rulesets in the API key's organization for the current page.

total

integerrequired

Total number of rulesets matching the request across all pages.

Example

1

Create a ruleset

Creates a ruleset. When document is omitted, a default Spectral OAS ruleset (extends: spectral:oas) is stored as the first version.

Request body *

RulesetCreateRequest
application/json

name

stringrequired

Display name for the ruleset.

Example

OAS baseline

slug

string^[a-z0-9]+(?:-[a-z0-9]+)*$

Optional URL slug; derived from `name` when omitted.

Example

oas-baseline

visibility

string

Whether the ruleset is listed on the public registry.

Example

private

values

private
public

description

string

Optional summary of the ruleset.

Example

Company-wide OpenAPI style and security checks based on spectral:oas.

blocking_severity

string

Default severity that blocks OpenAPI publishes for attached APIs.

Example

error

values

off
error
warn
info

document

object

Optional initial Spectral ruleset (YAML or JSON). Defaults to `extends: [spectral:oas]`.

Responses

data

objectrequired

The ruleset.

Get a ruleset

Returns one Spectral ruleset with its current version when published.

Parameters

ruleset

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

Ruleset ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Responses

data

objectrequired

The ruleset.

Update a ruleset

Update metadata or the default blocking severity for attached APIs.

Parameters

ruleset

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

Ruleset ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Request body *

RulesetUpdateRequest
application/json

name

string

Updated display name.

Example

OAS baseline

slug

string^[a-z0-9]+(?:-[a-z0-9]+)*$

Updated URL slug.

Example

oas-baseline

visibility

string

Updated visibility for the ruleset.

Example

private

values

private
public

description

string | nullnullable

Updated summary. Send `null` to clear.

Example

Company-wide OpenAPI style and security checks based on spectral:oas.

blocking_severity

string

Updated default blocking threshold for attached APIs.

Example

warn

values

off
error
warn
info

Responses

data

objectrequired

The ruleset.

Upload a Spectral ruleset document

Validates and stores a new current RulesetVersion. An unchanged checksum is a no-op that returns the existing current version.

Parameters

ruleset

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

Ruleset ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Request body *

DocumentUploadRequest
application/json

document

objectrequired

Document as a JSON string, YAML string, or JSON object.

Responses

data

objectrequired

The ruleset version.

Sites

Hosted documentation sites with attached API references.

List sites

Lists hosted documentation sites in the API key's organization, ordered by name. Results are paginated with page and limit.

Parameters

page

integerquery

1-based page of results to return.

Example

1

limit

integerquery

Maximum number of items to return (1–100).

Example

10

Responses

data

array object[] · Site[]required

Sites in the API key's organization for the current page.

total

integerrequired

Total number of sites matching the request across all pages.

Example

1

Create a site

Creates a hosted docs site. Pass api_ids to attach APIs for the reference section; guides and domains can be configured in the console afterward.

Request body *

SiteCreateRequest
application/json

name

stringrequired

Internal site name.

Example

Payments docs

slug

string

Optional URL slug; derived from `name` when omitted.

Example

payments-docs

title

string

Public title shown in the docs UI.

Example

Payments Documentation

api_ids

array any[]

Optional APIs to attach for the reference section.

Responses

data

objectrequired

The site.

SDKs

Language client generation configs (TypeScript, PHP) for one or more APIs.

List SDKs

Lists SDK generation configs in the API key's organization, newest first. Results are paginated with page and limit.

Parameters

page

integerquery

1-based page of results to return.

Example

1

limit

integerquery

Maximum number of items to return (1–100).

Example

10

Responses

data

array object[] · Sdk[]required

SDKs in the API key's organization for the current page.

total

integerrequired

Total number of SDKs matching the request across all pages.

Example

1

Create an SDK

Creates a multi-target SDK config for one or more APIs. Connect a repository per target in the console; successful builds open a pull request with generated code.

Request body *

SdkCreateRequest
application/json

name

stringrequired

Display name for the SDK.

Example

Payments SDK

targets

array object[] · SdkTargetType[]required

Generation targets to enable.

config

object · SdkConfig

Product-owned SDK configuration stored in the database.

apis

array object[] · SdkApiAttachment[]required

One or more APIs to generate clients for.

Responses

data

objectrequired

The SDK.

Builds

SDK generator runs and publish status.

Queue an SDK build

Queues one generator run per SDK target that has a connected output repository. Successful builds open a pull request with generated files.

Parameters

sdk

string · Ulid^[0-9A-HJKMNP-TV-Z]{26}$pathrequired

SDK ULID.

Example

01J8X4K2M9N7P6Q5R4S3T2V1W0

Responses

data

array object[] · Build[]required

List builds

Lists SDK generator builds for the organization, newest first. Results are paginated with page and limit.

Parameters

page

integerquery

1-based page of results to return.

Example

1

limit

integerquery

Maximum number of items to return (1–100).

Example

10

Responses

data

array object[] · Build[]required

Builds matching the request for the current page.

total

integerrequired

Total number of builds matching the request across all pages.

Example

1

Models

Schemas defined in this OpenAPI document.

BlockingSeverity

Severity threshold for blocking OpenAPI version publishes when a ruleset is attached. `off` never blocks. `error` blocks only errors. `warn` blocks warnings and errors. `info` blocks info, warnings, and errors. On an API, omit or null to inherit the ruleset default.

string

DocumentSource

How this document version entered the registry. `upload` is a direct API/console upload, `github` / `gitlab` come from repository sync, and `restore` is a previous version made current again.

string

OrganizationId

Owning organization ULID. Derived from the API key — never sent in create/update bodies.

string

SdkTargetType

Language or CLI target generated for an SDK.

string

Ulid

Universally Unique Lexicographically Sortable Identifier (26 Crockford base32 characters).

string

Visibility

Access mode for registry resources and hosted docs. Private resources require authentication. Public APIs, schemas, and rulesets are served on the public registry host; public sites are reachable on their domains.

string