Generate Developer Portals

The apimatic.json Reference

How to configure your portal's branding and navigation, SDK languages and publishing, and Context Plugins.

apimatic.json is the APIMatic CLI's project file. It lives at src/apimatic.json and holds three things:

  • portal — the documentation portal built by apimatic portal generate and apimatic portal serve.
  • plugin — the Context Plugin's identity, recorded by apimatic plugin generate.
  • languages — the project's SDK languages, which apimatic sdk publish adds to.

Every section is optional. Add only the ones you use.

Example

src/apimatic.json
{
  "$schema": "https://cdn.jsdelivr.net/npm/@apimatic/cli@beta/apimatic.schema.json",
  "schemaVersion": 1,
  "portal": {
    "site": {
      "name": "Acme Payments",
      "url": "https://docs.acme.com",
      "description": "Accept payments and manage payouts with the Acme API."
    },
    "brand": {
      "colors": {
        "primary": { "light": "#1d4ed8", "dark": "#60a5fa" }
      },
      "colorMode": "both"
    },
    "navigation": {
      "links": [
        { "label": "Dashboard", "url": "https://dashboard.acme.com" },
        { "label": "Changelog", "url": "/changelog" }
      ]
    },
    "ai": {
      "pageActions": true
    },
    "pluginUrl": "https://plugins.acme.com/acme-payments"
  },
  "plugin": {
    "pluginId": "acme-payments",
    "pluginName": "Acme Payments",
    "pluginVersion": "0.1.0",
    "author": { "name": "Acme", "email": "devrel@acme.com" },
    "license": "MIT"
  },
  "languages": {
    "csharp": {
      "publishing": {
        "source": { "repositoryUrl": "https://github.com/acme/acme-csharp", "branch": "main" },
        "package": { "version": "1.2.0" },
        "packageConfiguration": { "packageId": "Acme.Payments" }
      }
    },
    "typescript": {
      "publishing": {
        "source": { "repositoryUrl": "https://github.com/acme/acme-typescript", "branch": "main" },
        "package": { "version": "1.2.0" },
        "packageConfiguration": { "name": "@acme/payments" }
      }
    },
    "python": {}
  }
}

Add the $schema line to get autocomplete and validation in VS Code and other JSON-aware editors. The CLI ignores it.

Top-level properties

PropertyTypeRequiredDescription
$schemastringNoWhere editors find the JSON schema. Ignored by the CLI.
schemaVersion1NoFormat of this file. Must be 1; the CLI refuses a version it does not read.
portalobjectNoDocumentation portal settings.
pluginobjectNoContext plugin identity.
languagesobjectNoSDK languages and where they are published.

Unknown top-level properties are allowed and ignored.


portal

Configures the portal built by apimatic portal generate and apimatic portal serve. Unknown properties are not allowed anywhere inside portal.

PropertyTypeDescription
siteobjectName, address, and description of the portal.
brandobjectLogo, favicon, colors, and color mode.
navigationobjectHeader links.
aiobjectAI features on portal pages.
pluginUrlstringWhere the Context Plugin is hosted. Must start with https:// and contain no spaces. The Context Plugin page installs the plugin from here; the portal does not carry its own copy.

portal.site

PropertyTypeDefaultDescription
namestring (non-blank)Title of the only specificationThe portal's name. Required when the spec directory holds more than one specification.
urlstring—Address the portal is served from, for example, https://docs.example.com or https://acme.github.io/docs. It can include a path, and the portal is then built to be served under that path; canonical links, og:url, and the sitemap use it too. Each part of the path can contain only letters, digits, ., _, ~, and -. Don't include a page name such as index.html, or ?, #, or \. http:// and https:// are accepted; a single trailing / is allowed.
descriptionstringFirst paragraph of the only specification's descriptionPortal description. An empty string means no description.

portal.brand

PropertyTypeDefaultDescription
logostatic path or { light, dark }—One image for both color modes, or one per mode. When using the object form, both light and dark are required.
faviconstatic pathThe light logoBrowser tab icon.
colors.primarycolor or { light, dark }—Primary brand color for both modes, or one per mode. When using the object form, both light and dark are required.
colorMode"light" | "dark" | "both""both"Color modes the portal offers. Forcing light or dark hides the theme switch.
One logo and color for both modes
"brand": {
  "logo": "static/images/logo.svg",
  "colors": { "primary": "#1d4ed8" }
}

portal.navigation

PropertyTypeDescription
linksarray of linkLinks shown in the header and the mobile menu, in order.

portal.ai

PropertyTypeDefaultDescription
pageActionsbooleantrueWhether each page shows the Copy Markdown button and the Open menu (View as Markdown, Scira AI, ChatGPT, Claude, Cursor). See Markdown for Every Page.

plugin

The Context Plugin's identity, recorded by apimatic plugin generate. Unknown properties are allowed.

PropertyTypeRequiredDescription
pluginIdstringYesLower-case alphanumeric words separated by single dashes, for example, acme-payments.
pluginNamestring (non-blank)YesDisplay name, for example, Acme Payments.
pluginVersionstringYesmajor.minor.patch, for example, 0.1.0.
pluginKeystringNoPlugin key.
author.namestringNoAuthor name.
author.emailstringNoAuthor email.
licensestringNoLicense identifier, for example, MIT.

pluginId, pluginName, and pluginVersion are all required to generate the plugin. If plugin is present without them, the file fails validation.


languages

The project's SDK languages. apimatic sdk publish adds to this section. Keys must be one of:

csharp · python · typescript

An entry without publishing marks a language that is wanted but not yet published, for example, "python": {}.

Unknown properties are not allowed anywhere inside languages: not on a language entry, nor in publishing, source, package, or packageConfiguration.

Language entry

PropertyTypeDescription
publishingobjectWhere the SDK is published. Omit it for a language that isn't published yet.
publishing.sourceobjectThe Git repository the SDK source was published to.
publishing.source.repositoryUrlstringRepository URL.
publishing.source.branchstringBranch.
publishing.packageobjectThe published release.
publishing.package.versionstringReleased version, major.minor.patch, for example, 1.2.0.
publishing.packageConfigurationobjectHow the package is set up in its registry. Fields depend on the language; see below. Required when package is present.

publishing.package holds only the version. The package's name lives in packageConfiguration.

apimatic sdk publish writes packageConfiguration from your publishing profile, so you rarely edit it by hand. The portal's SDK card uses the package name in it for the install command.

packageConfiguration by language

Only the package name is required. Every other field is optional and, unless noted, accepts a string or null.

C# (NuGet)

PropertyTypeRequiredDescription
packageIdstringYesNuGet package ID.
authorsstring | nullNoPackage authors.
descriptionstring | nullNoPackage description.
titlestring | nullNoPackage title.
packageTagsstring | nullNoTags.
repositoryUrlstring | nullNoSource repository URL.
repositoryTypestring | nullNoRepository type, for example, git.
packageProjectUrlstring | nullNoProject homepage.
packageIconstring | nullNoPackage icon.
packageReleaseNotesstring | nullNoRelease notes.
copyrightstring | nullNoCopyright notice.

Python (PyPI)

PropertyTypeRequiredDescription
namestringYesPyPI project name.
descriptionstring | nullNoPackage description.
authorsarray of { name, email }NoAuthors. Both fields are string or null.
maintainersarray of { name, email }NoMaintainers. Both fields are string or null.
keywordsarray of stringNoKeywords.
classifiersarray of stringNoTrove classifiers.
urlsobject of stringNoProject URLs keyed by label, for example, { "Documentation": "https://docs.acme.com" }.

TypeScript (npm)

PropertyTypeRequiredDescription
namestringYesnpm package name.
descriptionstring | nullNoPackage description.
author{ name, email, url }NoPackage author.
contributorsarray of { name, email, url }NoContributors.
bugs{ url, email }NoWhere to report issues.
keywordsarray of stringNoKeywords.
homepagestring | nullNoHomepage URL.
repository{ type, url, directory }NoSource repository.

Fields inside author, contributors, bugs, and repository are string or null.

Examples
"languages": {
  "csharp": {
    "publishing": {
      "package": { "version": "1.0.0" },
      "packageConfiguration": { "packageId": "Acme.Payments" }
    }
  },
  "python": {
    "publishing": {
      "source": { "repositoryUrl": "https://github.com/acme/acme-python", "branch": "main" },
      "package": { "version": "1.0.0" },
      "packageConfiguration": {
        "name": "acme-payments",
        "description": "Python SDK for the Acme Payments API.",
        "authors": [{ "name": "Acme", "email": "devrel@acme.com" }]
      }
    }
  },
  "typescript": {}
}

Value formats

Static paths

Paths to files inside src/static, written relative to src, for example, static/images/logo.png. A leading ./ is allowed; . and .. segments are not.

✅ Valid❌ Invalid
static/images/logo.pngimages/logo.png (not under static)
./static/logo.svgstatic/../logo.png (.. segment)
static\images\logo.pngstatic (no file)

Colors

#rgb or #rrggbb hex, for example, #1d4ed8 or #fff. Case-insensitive.

PropertyTypeRequiredDescription
labelstring (non-blank)YesText shown for the link.
urlstringYesA portal page starting with / (for example, /changelog), or an external address starting with https:// or http://. Protocol-relative URLs such as //example.com are rejected.

Unknown properties are not allowed on links.

On this page