Fabric
You're on the list! We'll be in touch when we launch.
Please enter a valid email address.
Something went wrong. Please try again.
Back to Developers

API Reference

February 18, 2026 ยท 4 min read

Fabric exposes a REST API at /v1 for third-party integrations. All endpoints use JSON and require API key authentication.

Authentication

Include your API key as a Bearer token in the Authorization header:

Authorization: Bearer sk_live_your_api_key_here

API keys are scoped to an organization. Generate keys from Settings > API Keys in the Fabric dashboard.

Rate Limits

All API endpoints are rate-limited to 100 requests per minute per API key. Exceeding this limit returns a 429 status code.

Error Responses

All errors return JSON with error and message fields:

{
  "error": "not_found",
  "message": "Code query not found"
}

Common error codes: invalid_id, validation_error, not_found, forbidden, rate_limit_exceeded, internal_error.


Code Queries

Submit natural-language building-code questions and receive an answer with citations to the relevant code sections.

Create Code Query

POST /v1/code-queries

Request Body:

FieldTypeRequiredDescription
questionstringYesNatural-language building-code question
jurisdictionstringNoApplicable code, e.g. Ontario Building Code 2024
code_bookstringNoSpecific code book to scope the search

Example:

{
  "question": "What is the minimum width for an exit stair serving an assembly occupancy?",
  "jurisdiction": "Ontario Building Code 2024",
  "code_book": "Division B"
}

Response:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "question": "What is the minimum width for an exit stair serving an assembly occupancy?",
  "jurisdiction": "Ontario Building Code 2024",
  "code_book": "Division B",
  "answer": "Exit stairs serving an assembly occupancy must provide a minimum clear width of 1100 mm, increased in proportion to the occupant load served.",
  "citations": [
    {
      "code_section": "3.4.3.2",
      "title": "Width of Exits",
      "url": "https://codes.fabric.dev/obc-2024/div-b/3.4.3.2"
    },
    {
      "code_section": "3.4.2.1",
      "title": "Exit Width Based on Occupant Load",
      "url": "https://codes.fabric.dev/obc-2024/div-b/3.4.2.1"
    }
  ],
  "created_at": "2026-02-18T14:30:00Z"
}

Returns the created code query with a 201 status code.


Get Code Query

GET /v1/code-queries/:id

Returns a single code query by ID, including its answer and citations.


List Code Queries

GET /v1/code-queries

Returns a paginated list of past code queries.

Query Parameters:

ParameterTypeDescription
searchstringSearch by question text
limitintegerResults per page (default 50, max 100)
offsetintegerPagination offset (default 0)

Response:

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "question": "What is the minimum width for an exit stair serving an assembly occupancy?",
      "jurisdiction": "Ontario Building Code 2024",
      "code_book": "Division B",
      "answer": "Exit stairs serving an assembly occupancy must provide a minimum clear width of 1100 mm, increased in proportion to the occupant load served.",
      "citations": [
        {
          "code_section": "3.4.3.2",
          "title": "Width of Exits",
          "url": "https://codes.fabric.dev/obc-2024/div-b/3.4.3.2"
        }
      ],
      "created_at": "2026-02-18T14:30:00Z"
    }
  ],
  "total_count": 42,
  "limit": 50,
  "offset": 0
}

Model Checks

Submit a Revit/IFC/BIM model for automated code-compliance scanning. Checks run asynchronously; poll the check until its status is completed to retrieve the list of issues.

Create Model Check

POST /v1/model-checks

Request Body:

FieldTypeRequiredDescription
model_urlstringNo*URL of the model file (Revit/IFC) to scan
model_idstringNo*UUID of a model already uploaded to Fabric
jurisdictionstringYesApplicable code, e.g. Ontario Building Code 2024
disciplinestringNoScope the scan: architectural, structural, mechanical

* Provide exactly one of model_url or model_id.

Example:

{
  "model_url": "https://files.example.com/models/tower-a.ifc",
  "jurisdiction": "Ontario Building Code 2024",
  "discipline": "architectural"
}

Response:

{
  "id": "770e8400-e29b-41d4-a716-446655440002",
  "model_id": "880e8400-e29b-41d4-a716-446655440003",
  "jurisdiction": "Ontario Building Code 2024",
  "discipline": "architectural",
  "status": "queued",
  "issues": [],
  "created_at": "2026-02-18T14:30:00Z"
}

Returns the created model check with a 201 status code. The status field is one of queued, running, or completed.

When the check is completed, each entry in the issues array has the following fields:

FieldTypeDescription
idstringUUID of the issue
severitystringerror, warning, or info
code_sectionstringThe code section the issue relates to
titlestringShort summary of the violation
descriptionstringDetailed explanation of the issue
element_idstringThe Revit/IFC element the issue was found on
locationstringHuman-readable location within the model

Completed Check Example:

{
  "id": "770e8400-e29b-41d4-a716-446655440002",
  "model_id": "880e8400-e29b-41d4-a716-446655440003",
  "jurisdiction": "Ontario Building Code 2024",
  "discipline": "architectural",
  "status": "completed",
  "issues": [
    {
      "id": "990e8400-e29b-41d4-a716-446655440004",
      "severity": "error",
      "code_section": "3.4.3.2",
      "title": "Exit stair below minimum width",
      "description": "Stair S-02 has a clear width of 900 mm, below the required minimum of 1100 mm for the served occupant load.",
      "element_id": "IfcStair:2hT9k1f0z3Q",
      "location": "Level 2, Core B"
    },
    {
      "id": "aa0e8400-e29b-41d4-a716-446655440005",
      "severity": "warning",
      "code_section": "3.3.1.7",
      "title": "Corridor width may be insufficient",
      "description": "Corridor C-14 measures 1050 mm; verify occupant load does not require a wider path of travel.",
      "element_id": "IfcSpace:0pL4m9c8w1R",
      "location": "Level 2, East Wing"
    }
  ],
  "created_at": "2026-02-18T14:30:00Z",
  "updated_at": "2026-02-18T14:34:00Z"
}

Get Model Check

GET /v1/model-checks/:id

Returns a single model check by ID, including its current status and any issues found.


List Model Checks

GET /v1/model-checks

Returns a paginated list of model checks.

Query Parameters:

ParameterTypeDescription
statusstringFilter by status: queued, running, completed
severitystringFilter by highest issue severity: error, warning, info
limitintegerResults per page (default 50, max 100)
offsetintegerPagination offset (default 0)

Response:

{
  "data": [
    {
      "id": "770e8400-e29b-41d4-a716-446655440002",
      "model_id": "880e8400-e29b-41d4-a716-446655440003",
      "jurisdiction": "Ontario Building Code 2024",
      "discipline": "architectural",
      "status": "completed",
      "issues": [
        {
          "id": "990e8400-e29b-41d4-a716-446655440004",
          "severity": "error",
          "code_section": "3.4.3.2",
          "title": "Exit stair below minimum width",
          "description": "Stair S-02 has a clear width of 900 mm, below the required minimum of 1100 mm for the served occupant load.",
          "element_id": "IfcStair:2hT9k1f0z3Q",
          "location": "Level 2, Core B"
        }
      ],
      "created_at": "2026-02-18T14:30:00Z",
      "updated_at": "2026-02-18T14:34:00Z"
    }
  ],
  "total_count": 17,
  "limit": 50,
  "offset": 0
}