Programmatic OpenAPI uploads (Pro)

Automate uploading your OpenAPI file from CI/CD using our npm package. Pro plans receive an API key for authentication. This keeps your docs in sync with every deploy.

Install

npm i -D @apidex/uploader
# or
yarn add -D @apidex/uploader

Authenticate

Create an API key in your account (Pro). Store it as a CI secret and expose as an env var:

APIDEX_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxx

Usage (Node)

import { upload } from '@apidex/uploader';

await upload({
  apiKey: process.env.APIDEX_API_KEY!,
  projectId: '<PROJECT_ID>',
  filePath: './openapi.yaml', // or .json
  endpoint: process.env.APIDEX_ENDPOINT || 'https://api.apidex.dev',
});

PROJECT_ID is the ID of your API spec/project in Apidex (visible in the project URL or dashboard).

Usage (CLI)

npx @apidex/uploader push ./openapi.yaml   --project <PROJECT_ID>   --endpoint https://api.apidex.dev

Need help or access to API keys? Contact support.