DocsCI for API docs testing

Automated API Documentation Testing

Your API docs are the first thing developers see. DocsCI makes sure every curl example runs, every SDK snippet works, and every response schema matches your OpenAPI spec.

<5min

Time to first result

100%

Snippet coverage

6+

SDK languages

SARIF

GitHub Code Scanning

API docs break quietly — until developers hit your support queue

API documentation is updated after the API, not before. Every release cycle, some code example stops working, some parameter gets renamed, and some response field disappears. Your docs say one thing; the API does another.

  • curl examples with outdated auth headers silently return 401 — developers don't know why
  • SDK snippets that worked in v1 break in v2 without a clear error in docs
  • Response schemas in docs drift from actual API responses — developers write code that breaks
  • Copy-pasting broken examples is the #1 cause of first-hour developer drop-off
  • No automated test suite catches doc-level regressions before they ship

DocsCI: the automated test suite for your API docs

DocsCI runs in your CI pipeline on every PR. It executes curl commands, SDK snippets, and code examples from your docs against your staging API. It diffs every documented endpoint and schema against your OpenAPI spec. Broken examples and drifted schemas are caught before merge — with AI-generated patches.

Everything you need

🌐

Execute HTTP examples

curl, HTTPie, fetch, axios — DocsCI runs every HTTP code example from your docs against your staging API. Configure the allowlist to permit your staging domain.

📐

OpenAPI schema validation

Import your OpenAPI spec. DocsCI validates every documented request body, query param, header, and response schema against the spec on each PR.

🔄

SDK snippet execution

Node.js, Python, Go, Ruby SDK examples all run in isolated sandboxes. Import errors, undefined method calls, and type errors are caught before users see them.

📌

Inline PR comments

DocsCI posts a comment on the exact line where the broken example lives — file, line number, error, and an AI-generated fix in one comment.

📈

Drift trending

Track schema drift over time. See which endpoints are most frequently documented incorrectly and catch patterns before they cause support tickets.

🔐

Credential safety

40+ regex patterns scan every snippet for API keys, tokens, and connection strings before execution. Sensitive snippets are flagged — not run.

How it works

1

Connect your docs repository

Add the DocsCI GitHub Action. It runs on every PR that touches documentation files.

curl -X POST https://snippetci.com/api/runs/queue \
  -H "Authorization: Bearer $DOCSCI_TOKEN" \
  -F "docs_archive=@docs.tar.gz" \
  -F "openapi_url=https://api.example.com/openapi.json"
2

Configure your staging endpoint

Add your staging API domain to the docsci.yml allowlist so HTTP examples can run against your real API.

security:
  allowlist:
    - api-staging.example.com
    - "*.example-staging.com"
3

Get actionable results

Every broken example, mismatched schema, and drift finding appears as a PR comment with line number and fix suggestion. Merge only verified docs.

Frequently asked questions

Can DocsCI run examples against my live API?

Yes. Configure the network allowlist in docsci.yml to permit your staging or production API domain. DocsCI will execute HTTP examples against those endpoints. All other outbound network access is blocked.

Does DocsCI replace Postman/Newman?

DocsCI tests documentation code examples — what your developers actually copy-paste. Postman tests API contracts. Use both: Postman for API testing, DocsCI for docs testing.

What happens when an API key is found in a code example?

DocsCI's secret scanner detects API keys, tokens, and credentials in snippets before execution. The snippet is flagged as a finding with severity 'error' — it is not executed.

Can I test docs for a private API?

Yes. Use the customer-hosted runner option to run DocsCI on your own infrastructure with access to your internal API. The runner connects to DocsCI's control plane but executes in your network.

Ready to stop shipping broken docs?

Join API and platform teams who use DocsCI to ship verified documentation.