# Framer

> Work with a Framer site: manage CMS collections, fields and items, publish and deploy the site, set custom code, and create pages and color styles.

App · 27 actions. Web page: https://docs.lodol.com/docs/integrations/framer

## Actions

### Add collection field

Add one field to a collection.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.
- Field name (`name`, text, required): The field's name, such as Title.
- Type (`type`, text, required): What the field holds. One of: `string` (Text), `formattedText` (Rich text), `number`, `boolean` (Toggle), `date`, `color`, `link`, `image`, `enum` (Option (choose one of a list)), `collectionReference` (Reference to an item in another collection), `multiCollectionReference` (References to items in another collection).
- Choices (`options`, text): For an option field: its choices, separated by commas, such as Draft, Live. Only when Type is Option (choose one of a list).
- Collection to point at (`reference_collection_id`, text): For a reference field: the collection its items come from. Only when Type is Reference to an item in another collection or References to items in another collection.
- Include the time (`include_time`, true/false): For a date field: ask for a time as well as a date. Only when Type is Date.
- Required (`required`, true/false): Whether an item must have a value. Not offered by every type.

**Outputs**

- `collection_id` (text): The collection
- `field` (object): The new field

**Example output**

```json
{
  "collection_id": "ZmJ56GrmH",
  "field": {
    "cases": [],
    "collection_id": "",
    "id": "Q3cza0XBs",
    "include_time": false,
    "name": "Title",
    "required": false,
    "type": "string"
  }
}
```

### Clear custom code

Remove the custom HTML from one place on every page.

**Inputs**

- Where on the page (`location`, text, required): Where the code goes on every page of the site. One of: `headStart` (Start of the head), `headEnd` (End of the head), `bodyStart` (Start of the body), `bodyEnd` (End of the body).

**Outputs**

- `cleared` (true/false): Always true once cleared
- `location` (text): The place cleared

**Example output**

```json
{
  "cleared": true,
  "location": "headEnd"
}
```

### Create collection

Create an empty CMS collection. Add its fields with 'Add collection field'. Framer's API cannot delete a collection, so remove it in Framer if you no longer want it.

**Inputs**

- Name (`name`, text, required): The collection's name, such as Blog posts.

**Outputs**

- `collection` (object): The new collection

**Example output**

```json
{
  "collection": {
    "id": "ZmJ56GrmH",
    "managed_by": "user",
    "name": "Blog posts",
    "read_only": false,
    "slug_field_name": "Slug"
  }
}
```

### Create collection item

Add an item to a collection. Publish the site afterwards to show it on the live site.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.
- Slug (`slug`, text, required): The item's address, unique in the collection, such as my-first-post.
- Field values (`field_values`, object): The value for each field. Leave a field empty to leave it as it is. A reference field takes the slug (or id) of an item in the other collection.
- Draft (`draft`, true/false): Keep the item as a draft: it is not published with the site.

**Outputs**

- `collection_id` (text): The collection
- `item` (object): The new item

**Example output**

```json
{
  "collection_id": "ZmJ56GrmH",
  "item": {
    "created_at": "2026-11-18T19:58:22.903Z",
    "draft": false,
    "fields": {
      "Title": "Hello world",
      "Views": 5
    },
    "id": "JxOb3NRs2",
    "slug": "hello-world",
    "updated_at": "2026-11-18T19:58:22.982Z"
  }
}
```

### Create color style

Create a color style for the project.

**Inputs**

- Name (`name`, text, required): The style's name, such as Brand blue.
- Color (`light`, text, required): The color, as #0000ff or rgb(0, 0, 255).
- Dark mode color (`dark`, text): A different color for dark mode. Leave empty to use the same.

**Outputs**

- `color_style` (object): The new color style

**Example output**

```json
{
  "color_style": {
    "dark": "",
    "id": "8b0ea04b-efee-4ccf-aa31-9ec9b415dfcc",
    "light": "rgb(0, 0, 255)",
    "name": "Brand blue",
    "path": "/Brand blue"
  }
}
```

### Create page

Create an empty web page at an address such as /pricing. Design it in Framer, then publish.

**Inputs**

- Page address (`path`, text, required): The page's path on the site, such as /pricing.

**Outputs**

- `page` (object): The new page

**Example output**

```json
{
  "page": {
    "collection_id": "",
    "draft": false,
    "id": "WHOBp_7sx",
    "name": "Pricing",
    "path": "/pricing"
  }
}
```

### Delete collection item

Delete an item from a collection. This cannot be undone.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.
- Item (`item_id`, text, required): The item. Pick one, or give its id from an earlier step.

**Outputs**

- `collection_id` (text): The collection
- `deleted` (true/false): Always true once deleted
- `item_id` (text): The item deleted

**Example output**

```json
{
  "collection_id": "ZmJ56GrmH",
  "deleted": true,
  "item_id": "JxOb3NRs2"
}
```

### Delete color style

Delete a color style.

**Inputs**

- Color style (`color_style_id`, text, required): The color style. Pick one, or give its id from an earlier step.

**Outputs**

- `color_style_id` (text): The style deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "color_style_id": "8b0ea04b-efee-4ccf-aa31-9ec9b415dfcc",
  "deleted": true
}
```

### Delete page

Delete a web page. The home page cannot be deleted.

**Inputs**

- Page (`page_id`, text, required): The page. Pick one, or give its id from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `page_id` (text): The page deleted
- `path` (text): Where the page was

**Example output**

```json
{
  "deleted": true,
  "page_id": "WHOBp_7sx",
  "path": "/pricing"
}
```

### Deploy to live domains

Make a deployment, such as one from 'Publish', the live version of the site. Leave Domains empty for every domain.

**Inputs**

- Deployment (`deployment_id`, text, required): The deployment. Pick one, or give its id from 'Publish' or 'List deployments'.
- Domains (`domains`, text): Only these domains, separated by commas, such as www.example.com. Leave empty to deploy to all of them.

**Outputs**

- `deployment_id` (text): The deployment
- `hostnames` (list): The domains now serving it

**Example output**

```json
{
  "deployment_id": "198f247d3",
  "hostnames": [
    {
      "deployment_id": "198f247d3",
      "hostname": "my-site.framer.app",
      "is_primary": true,
      "is_published": true,
      "type": "default"
    }
  ]
}
```

### Get collection item

Get one item of a collection by its id or its slug.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.
- Item (`item_id`, text, required): The item. Pick one, or give its id or slug.

**Outputs**

- `item` (object): The item

**Example output**

```json
{
  "item": {
    "created_at": "2026-11-18T19:58:22.903Z",
    "draft": false,
    "fields": {
      "Title": "Hello world",
      "Views": 5
    },
    "id": "JxOb3NRs2",
    "slug": "hello-world",
    "updated_at": "2026-11-18T19:58:22.982Z"
  }
}
```

### Get custom code

Read the custom HTML added to every page, in each of the four places Framer allows it.

**Inputs**: None.

**Outputs**

- `bodyEnd` (object): Custom code at the end of the body
- `bodyStart` (object): Custom code at the start of the body
- `headEnd` (object): Custom code at the end of the head
- `headStart` (object): Custom code at the start of the head

**Example output**

```json
{
  "bodyEnd": {
    "disabled": false,
    "html": ""
  },
  "bodyStart": {
    "disabled": false,
    "html": ""
  },
  "headEnd": {
    "disabled": false,
    "html": "<script>/* analytics */</script>"
  },
  "headStart": {
    "disabled": false,
    "html": ""
  }
}
```

### Get deployment

Get one deployment: whether it is still being optimized or ready, who deployed it and its preview address.

**Inputs**

- Deployment (`deployment_id`, text, required): The deployment. Pick one, or give its id from 'Publish' or 'List deployments'.

**Outputs**

- `deployment` (object): The deployment

**Example output**

```json
{
  "deployment": {
    "created_at": "2026-11-18T19:59:41.203Z",
    "deployed_by": "Alex Smith",
    "id": "198f247d3",
    "status": "ready",
    "updated_at": "2026-11-18T19:59:41.203Z",
    "version_url": "https://my-site-198f247d3.framer.app"
  }
}
```

### Get project

Get the connected Framer project's name and id, and the name of the person the API key acts as.

**Inputs**: None.

**Outputs**

- `project` (object): The project
- `user` (object): The person the API key acts as

**Example output**

```json
{
  "project": {
    "id": "3ec18a853edb",
    "name": "My site"
  },
  "user": {
    "avatar_url": "",
    "id": "2d43366cc86f",
    "initials": "AS",
    "name": "Alex Smith"
  }
}
```

### Get publish status

See where the site is published, when, and which pages have changed since. Use it to decide whether to publish.

**Inputs**: None.

**Outputs**

- `production` (object): The live site, if it is published
- `staging` (object): The preview site, if it is published
- `unpublished_changes` (list): Pages added, changed or removed since the last publish
- `unpublished_count` (number): How many

**Example output**

```json
{
  "production": {
    "optimization_status": "complete",
    "published": true,
    "published_at": "2026-11-18T19:59:41+00:00",
    "url": "https://my-site.framer.app"
  },
  "staging": {
    "optimization_status": "complete",
    "published": true,
    "published_at": "2026-11-18T19:59:41+00:00",
    "url": "https://my-site.framer.app"
  },
  "unpublished_changes": [
    {
      "node_id": "augiA20Il",
      "path": "/",
      "status": "added"
    }
  ],
  "unpublished_count": 1
}
```

### List collection fields

List a collection's fields with their types and, for option fields, their choices.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.

**Outputs**

- `collection_id` (text): The collection
- `count` (number): How many
- `fields` (list): The fields

**Example output**

```json
{
  "collection_id": "ZmJ56GrmH",
  "count": 1,
  "fields": [
    {
      "cases": [],
      "collection_id": "",
      "id": "Q3cza0XBs",
      "include_time": false,
      "name": "Title",
      "required": false,
      "type": "string"
    }
  ]
}
```

### List collection items

List every item in a collection, drafts included, with each field's value under the field's name.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.

**Outputs**

- `collection_id` (text): The collection
- `count` (number): How many
- `items` (list): The items

**Example output**

```json
{
  "collection_id": "ZmJ56GrmH",
  "count": 1,
  "items": [
    {
      "created_at": "2026-11-18T19:58:22.903Z",
      "draft": false,
      "fields": {
        "Title": "Hello world",
        "Views": 5
      },
      "id": "JxOb3NRs2",
      "slug": "hello-world",
      "updated_at": "2026-11-18T19:58:22.982Z"
    }
  ]
}
```

### List collections

List the project's CMS collections.

**Inputs**: None.

**Outputs**

- `collections` (list): The collections
- `count` (number): How many

**Example output**

```json
{
  "collections": [
    {
      "id": "ZmJ56GrmH",
      "managed_by": "user",
      "name": "Blog posts",
      "read_only": false,
      "slug_field_name": "Slug"
    }
  ],
  "count": 1
}
```

### List color styles

List the project's color styles.

**Inputs**: None.

**Outputs**

- `color_styles` (list): The color styles
- `count` (number): How many

**Example output**

```json
{
  "color_styles": [
    {
      "dark": "",
      "id": "8b0ea04b-efee-4ccf-aa31-9ec9b415dfcc",
      "light": "rgb(0, 0, 255)",
      "name": "Brand blue",
      "path": "/Brand blue"
    }
  ],
  "count": 1
}
```

### List deployments

List the project's most recent deployments, newest first, with their status and preview address.

**Inputs**

- How many (`limit`, number): How many deployments, 1 to 100. Defaults to 20. From 1 to 100.

**Outputs**

- `count` (number): How many
- `deployments` (list): The deployments

**Example output**

```json
{
  "count": 1,
  "deployments": [
    {
      "created_at": "2026-11-18T19:59:41.203Z",
      "deployed_by": "Alex Smith",
      "id": "198f247d3",
      "status": "ready",
      "updated_at": "2026-11-18T19:59:41.203Z",
      "version_url": "https://my-site-198f247d3.framer.app"
    }
  ]
}
```

### List languages

List the languages the site is translated into.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `locales` (list): The languages

**Example output**

```json
{
  "count": 1,
  "locales": [
    {
      "code": "fr",
      "id": "fr",
      "name": "French",
      "slug": "fr"
    }
  ]
}
```

### List pages

List the project's web pages with their addresses.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `pages` (list): The pages

**Example output**

```json
{
  "count": 1,
  "pages": [
    {
      "collection_id": "",
      "draft": false,
      "id": "WHOBp_7sx",
      "name": "Pricing",
      "path": "/pricing"
    }
  ]
}
```

### List text styles

List the project's text styles with their font and tag.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `text_styles` (list): The text styles

**Example output**

```json
{
  "count": 1,
  "text_styles": [
    {
      "color": "#111",
      "font_family": "Inter",
      "id": "cE2L9Rg2k",
      "name": "Heading",
      "path": "/Heading",
      "tag": "h1"
    }
  ]
}
```

### Publish

Publish the project's current state as a new deployment on its preview address. To put it on your live domains, follow it with 'Deploy to live domains'.

**Inputs**: None.

**Outputs**

- `deployment` (object): The new deployment
- `hostnames` (list): The addresses the deployment is on

**Example output**

```json
{
  "deployment": {
    "created_at": "2026-11-18T19:59:41.203Z",
    "deployed_by": "Alex Smith",
    "id": "198f247d3",
    "status": "ready",
    "updated_at": "2026-11-18T19:59:41.203Z",
    "version_url": "https://my-site-198f247d3.framer.app"
  },
  "hostnames": [
    {
      "deployment_id": "198f247d3",
      "hostname": "my-site.framer.app",
      "is_primary": true,
      "is_published": true,
      "type": "default"
    }
  ]
}
```

### Remove collection field

Remove a field from a collection. Its values are removed from every item.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.
- Field (`field`, text, required): The field to remove. Pick one, or give its name or id.

**Outputs**

- `collection_id` (text): The collection
- `field_id` (text): The field removed
- `name` (text): The field's name
- `removed` (true/false): Always true once removed

**Example output**

```json
{
  "collection_id": "ZmJ56GrmH",
  "field_id": "Q3cza0XBs",
  "name": "Title",
  "removed": true
}
```

### Set custom code

Put custom HTML, such as an analytics script, on every page of the site. It replaces what was in that place. The site shows it after the next publish.

**Inputs**

- Where on the page (`location`, text, required): Where the code goes on every page of the site. One of: `headStart` (Start of the head), `headEnd` (End of the head), `bodyStart` (Start of the body), `bodyEnd` (End of the body).
- HTML (`html`, text, required): The HTML or script tag to add.

**Outputs**

- `html` (text): The code that was set
- `location` (text): Where it was put

**Example output**

```json
{
  "html": "<script>/* analytics */</script>",
  "location": "headEnd"
}
```

### Update collection item

Change an item's slug, draft state or field values. Fields you leave empty keep their values.

**Inputs**

- Collection (`collection_id`, text, required): The CMS collection. Pick one, or give its id from an earlier step.
- Item (`item_id`, text, required): The item. Pick one, or give its id from an earlier step.
- New slug (`slug`, text): A new address for the item. Leave empty to keep it.
- Field values (`field_values`, object): The value for each field. Leave a field empty to leave it as it is. A reference field takes the slug (or id) of an item in the other collection.
- Draft state (`draft_state`, text): Whether the item is a draft. Defaults to leaving it as it is. One of: `keep` (Leave as it is), `draft` (Make it a draft), `published` (Publish it). Default: `keep`.

**Outputs**

- `collection_id` (text): The collection
- `item` (object): The item as it is now

**Example output**

```json
{
  "collection_id": "ZmJ56GrmH",
  "item": {
    "created_at": "2026-11-18T19:58:22.903Z",
    "draft": false,
    "fields": {
      "Title": "Hello world",
      "Views": 5
    },
    "id": "JxOb3NRs2",
    "slug": "hello-world",
    "updated_at": "2026-11-18T19:58:22.982Z"
  }
}
```
