> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gobl.org/llms.txt
> Use this file to discover all available pages before exploring further.

# GOBL API

> Build, validate, sign, and query tax-aware business documents via REST

The [GOBL API](https://gobl.dev) provides a hosted REST service for working with GOBL documents without needing to install or run any libraries locally. It's ideal for integrations in any language.

Base URL:

```
https://gobl.dev/v0
```

## Endpoints

The API is organized into three groups:

* **Documents** — [Build](https://docs.gobl.org/api-reference/documents/build-a-gobl-document.md), [validate](https://docs.gobl.org/api-reference/documents/validate-a-gobl-document.md), [correct](https://docs.gobl.org/api-reference/documents/create-a-corrective-document.md), and [replicate](https://docs.gobl.org/api-reference/documents/replicate-a-document.md) GOBL documents.
* **Signing** — [Sign](https://docs.gobl.org/api-reference/signing/sign-a-gobl-document.md) and [verify](https://docs.gobl.org/api-reference/signing/verify-a-signed-envelope.md) envelopes, or [generate key pairs](https://docs.gobl.org/api-reference/signing/generate-a-signing-key-pair.md).
* **Reference** — Query available [JSON schemas](https://docs.gobl.org/api-reference/reference/list-available-json-schemas.md), [tax regimes](https://docs.gobl.org/api-reference/reference/list-tax-regimes.md), and [addons](https://docs.gobl.org/api-reference/reference/list-format-addons.md).

## Quick Example

Build and validate an invoice in a single request:

```bash theme={"system"}
curl -X POST https://gobl.dev/v0/build \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "$schema": "https://gobl.org/draft-0/bill/invoice",
      "series": "EXAMPLE",
      "currency": "USD",
      "issue_date": "2024-01-15",
      "supplier": {
        "name": "Seller Co.",
        "tax_id": { "country": "US" }
      },
      "customer": {
        "name": "Buyer Inc.",
        "tax_id": { "country": "US" }
      },
      "lines": [
        {
          "quantity": "1",
          "item": {
            "name": "Service",
            "price": "100.00"
          }
        }
      ]
    }
  }'
```

No authentication is required. The API is free to use.

Have your agent write a client for the GOBL API in your language.

Read [https://docs.gobl.org/api/introduction.md](https://docs.gobl.org/api/introduction.md), [https://docs.gobl.org/llms.md](https://docs.gobl.org/llms.md) and the OpenAPI description linked from [https://docs.gobl.org/llms.txt](https://docs.gobl.org/llms.txt). Write a small client for [https://gobl.dev/v0](https://gobl.dev/v0) in this project's language with functions for build, validate, correct, and fetching a regime and an addon definition. Every document request wraps the document in a data property; build accepts an envelop flag. Turn the error body into a typed error: it always has a key, validation errors add a faults array with code, paths and message so callers can branch on fault codes, and calculation or input errors carry a top-level message with no faults. Send a descriptive User-Agent header. Add a test that builds the example invoice from [https://docs.gobl.org/llms.md](https://docs.gobl.org/llms.md) and asserts its payable total, and one that sends an invalid tax identity and asserts the fault code.

## MCP Server

An [MCP (Model Context Protocol) server](https://docs.gobl.org/api/mcp.md) is also available for integrating GOBL with AI assistants like Claude. It exposes the same document operations plus tax reference data as MCP tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.