# Builder.io

The Builder.io Integration step allows you to connect your AirOps workflows with your Builder.io spaces. This native integration provides comprehensive content entry and model management capabilities directly from your workflows.

## Overview

Builder.io is a visual headless CMS and page builder that enables teams to create and manage structured content for any digital channel. By connecting Builder.io to AirOps, you can automate content creation, publishing, and model management across your Builder.io spaces.

## Authentication

Before using the Builder.io integration in your workflows, you must first connect your Builder.io account in the AirOps Settings:

1. Navigate to **Settings > Integrations**
2. Find the Builder.io section and click "Configure"
3. Enter your **Private API Key** — found in your Builder.io space under **Account Settings > Space**. Required for all write operations and reading unpublished content
4. Optionally enter your **Public API Key** — used for reading published content entries without authentication

{% hint style="info" %}
The Private API Key is required for creating, updating, and deleting content and models. The Public API Key is only needed if your workflows read publicly accessible content.
{% endhint %}

## Available Actions

### Content Management

* **Create Content** -- add a new content entry to a Builder.io model
* **Get Content** -- retrieve a single content entry by ID
* **List Content** -- fetch multiple content entries from a model with optional filters
* **Update Content** -- modify an existing content entry's fields or status
* **Delete Content** -- permanently remove a content entry

### Model Management

* **Create Model** -- define a new content model in your Builder.io space
* **Get Model** -- retrieve a single model by ID or name
* **List Models** -- fetch all models in your space
* **Update Model** -- modify an existing model's configuration or fields

## Action Parameters

### Create Content

1. **Model Name** (required) -- the API name of the Builder.io model to create the entry in (e.g. `blog-post`)
2. **Name** (required) -- the human-readable title of the content entry
3. **Data** -- a JSON object of custom field values (e.g. `{"title": "Hello", "body": "..."}`)
4. **Published** -- the entry's publication status: `draft`, `published`, or `archived`

### Get Content

1. **Model Name** (required) -- the API name of the Builder.io model
2. **Entry ID** (required) -- the ID of the content entry to retrieve

### List Content

1. **Model Name** (required) -- the API name of the Builder.io model
2. **Include Unpublished** -- whether to include draft entries: `true` or `false` (default: `false`)
3. **Fields** -- comma-separated field paths to include in the response (e.g. `id,name,data.title`)
4. **Omit** -- comma-separated field paths to exclude from the response (e.g. `data.blocks`)
5. **Sort** -- a JSON object specifying sort fields and direction, where `1` is ascending and `-1` is descending (e.g. `{"data.publishedDate": -1}`)
6. **Limit** -- the number of entries per page (default: `30`, max: `100`)
7. **Offset** -- the number of entries to skip for pagination (default: `0`)

### Update Content

1. **Model Name** (required) -- the API name of the Builder.io model
2. **Entry ID** (required) -- the ID of the content entry to update
3. **Name** -- the new human-readable title for the entry
4. **Data** -- a JSON object of fields to update. Only specified fields are modified
5. **Published** -- the new publication status: `draft`, `published`, or `archived`

### Delete Content

1. **Model Name** (required) -- the API name of the Builder.io model
2. **Entry ID** (required) -- the ID of the content entry to delete. This action cannot be undone

### Create Model

1. **Name** (required) -- the API name of the new model in kebab-case (e.g. `blog-post`)
2. **Kind** (required) -- the type of model: `data`, `page`, `component`, `section`, or `symbol`
3. **Helper Text** -- a description of the model shown in the Builder.io UI
4. **Singleton** -- whether only one entry can exist for this model: `true` or `false`
5. **Repeatable** -- whether multiple entries are allowed: `true` or `false`
6. **Public Readable** -- whether entries can be read without authentication: `true` or `false`
7. **Public Writable** -- whether entries can be written without authentication: `true` or `false`
8. **Fields** -- a JSON array of field definitions, each with a `name` and `type` (e.g. `[{"name": "title", "type": "string"}]`)

### Get Model

1. **Lookup By** -- how to identify the model: `id` (default) or `name`
2. **Lookup Value** (required) -- the model ID or name to search for

### List Models

1. **Limit** -- the number of models per page (default: `100`)
2. **Offset** -- the number of models to skip for pagination (default: `0`)

### Update Model

1. **Model ID** (required) -- the ID of the model to update
2. **Name** -- the new API name in kebab-case
3. **Kind** -- the new model type: `data`, `page`, `component`, `section`, or `symbol`
4. **Helper Text** -- the new description for the model
5. **Singleton** -- update the singleton setting: `true` or `false`
6. **Repeatable** -- update the repeatable setting: `true` or `false`
7. **Public Readable** -- update the public readable setting: `true` or `false`
8. **Public Writable** -- update the public writable setting: `true` or `false`
9. **Archived** -- set to `true` to archive the model
10. **Fields** -- a JSON array of field definitions to replace the model's existing fields

## Common Use Cases

* Automatically creating and publishing content entries from AI-generated copy
* Updating content entry statuses in bulk based on workflow conditions
* Fetching entries by model to enrich or rewrite existing content
* Building content pipelines that create entries in draft and publish after review
* Creating new Builder.io models programmatically as part of a site setup workflow
* Listing entries across a model to run audits or apply bulk transformations

{% hint style="info" %}
Note: Builder.io integration requires a Private API Key with access to the target space. Ensure your key has the necessary permissions for the operations your workflows perform.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.airops.com/context/overview/integrations/builder-io.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
