# Duda

> Build and run your clients' websites on Duda: make sites from templates, publish them, set up client accounts with access and sign-in links, and keep content libraries and collections up to date. Start a workflow when a form is sent, a site is made or published, or a collection gets a row.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/duda

## Actions

### Add collection row

Add a row to a site's collection.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Collection (`collection`, text, required): The collection, or its name.
- Fields (`data`, object, required): The row's values, by field. Choose the site and collection to fill them in one by one, or give an object from an earlier step.
- Shows (`status`, text): Where the row shows up. Leave blank for live on a new row, or to keep it as it is on an existing one. One of: `ACTIVE` (Live (on the site and in the editor)), `PREVIEW` (Editor only), `DRAFT` (Draft (in the collection only)).
- Publish to the live site (`publish`, true/false): Also publish the collection, so a published site shows the change at once. Off, it waits for the next publish. Default: `false`.

**Outputs**

- `collection` (text): The collection's name
- `published` (true/false): True if the collection was published to the live site
- `row_id` (text): The row's ID
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "collection": "events",
  "published": false,
  "row_id": "144",
  "site_name": "6c56394c"
}
```

### Back up site

Save a restore point of a site, such as before changes are made. A site keeps up to 50 backups made this way; restore one in Duda.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Name (`name`, text): A name for the backup, such as before-redesign. Spaces become hyphens.

**Outputs**

- `backup_name` (text): The backup's name, to restore it from in Duda
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "backup_name": "QA-Complete",
  "site_name": "6c56394c"
}
```

### Create account

Add a client or team member account. Duda doesn't email them: give them a site with 'Grant site access', then a link from 'Create sign-in link'.

**Inputs**

- Account name (`account_name`, text, required): A name for the account that no other account has, usually their email. Up to 150 characters.
- First name (`first_name`, text, required): Their first name.
- Last name (`last_name`, text, required): Their last name.
- Email (`email`, text): Their email.
- Company (`company_name`, text): Their company.
- Type (`account_type`, text): A client, or a member of your team. Defaults to a client. One of: `CUSTOMER` (Client), `STAFF` (Team member). Default: `CUSTOMER`.
- Language (`language`, text): The language Duda's screens show them. One of: `en` (English), `en_gb` (English (UK)), `ar` (Arabic), `nl` (Dutch), `fr` (French), `de` (German), `id` (Indonesian), `it` (Italian), `ja` (Japanese), `pl` (Polish), and 4 more.

**Outputs**

- `account_name` (text): The account's name in Duda, which the other Duda steps take
- `account_type` (text): CUSTOMER for a client, STAFF for a team member
- `company_name` (text): The account holder's company
- `email` (text): The account holder's email
- `first_name` (text): The account holder's first name
- `language` (text): The language Duda's screens show them, such as en
- `last_name` (text): The account holder's last name

**Example output**

```json
{
  "account_name": "uniqueAcctReference",
  "account_type": "CUSTOMER",
  "company_name": "Joann's Agency",
  "email": "example@domain.com",
  "first_name": "Joann",
  "language": "en",
  "last_name": "Smith"
}
```

### Create collection

Add a collection (a table of content a site's pages can show) to a site, with its fields. Name fields with letters, numbers, hyphens and underscores.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Name (`name`, text, required): What the collection is called.
- Text fields (`text_fields`, list): Fields of plain text.
- Rich text fields (`rich_text_fields`, list): Fields of formatted text.
- Number fields (`number_fields`, list): Fields of numbers.
- Date fields (`date_fields`, list): Fields of dates and times.
- Image fields (`image_fields`, list): Fields holding a link to an image.
- Link fields (`link_fields`, list): Fields of links.
- Email fields (`email_fields`, list): Fields of emails.
- Phone fields (`phone_fields`, list): Fields of phone numbers.

**Outputs**

- `fields` (list): Its fields
- `name` (text): The new collection's name
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "fields": [
    {
      "name": "location",
      "type": "plain_text"
    },
    {
      "name": "date",
      "type": "date_time"
    }
  ],
  "name": "events",
  "site_name": "6c56394c"
}
```

### Create sign-in link

Make a link that signs an account in to Duda without a password and opens its dashboard, a site's editor or another page. It works once, within two minutes, so make it just before it's used.

**Inputs**

- Account name (`account_name`, text, required): The client account's name in Duda, usually the email it was made with.
- Opens (`destination`, text): Where the link takes them. Defaults to the dashboard. One of: `DASHBOARD`, `EDITOR` (Site editor), `SITE_OVERVIEW` (Site overview), `STATS` (Site stats), `SITE_SEO_OVERVIEW` (SEO overview), `STORE_MANAGEMENT` (Store management), `SWITCH_TEMPLATE` (Choose a new template, keeping the content), `RESET_SITE` (Start over from a new template), `RESET_BASIC` (Simple editor), `SWITCH_TEMPLATE_WITH_AI` (AI site builder), `SWITCH_GENERATE_TEMPLATE_CONTENT` (Fill the template with AI content), `VIBE`. Default: `DASHBOARD`.
- Site (`site`, text): The site it opens. Needed for everything but the dashboard and Vibe.

**Outputs**

- `account_name` (text): The account's name in Duda, which the other Duda steps take
- `destination` (text): Where it opens, such as DASHBOARD or EDITOR
- `site_name` (text): The site it opens; empty for the dashboard
- `url` (text): The sign-in link; it works once, within two minutes

**Example output**

```json
{
  "account_name": "uniqueAcctReference",
  "destination": "EDITOR",
  "site_name": "6c56394c",
  "url": "https://example.com/home/site/6c56394c?sso=token"
}
```

### Create site

Make a new site from a template, with the business's details. It isn't live until it's published.

**Inputs**

- Template (`template`, text, required): The template to build it from.
- Business name (`business_name`, text): The business the site is for.
- Address prefix (`default_domain_prefix`, text): The first part of the site's default address, such as joes-pizza. Letters, numbers and hyphens. Leave blank for Duda to choose.
- External ID (`external_id`, text): Your own reference for the site, such as its ID in your CRM.
- Labels (`labels`, list): Labels to file the site under in Duda.
- Business email (`business_email`, text): The business's email.
- Business phone (`business_phone`, text): The business's phone number.
- Street (`street`, text): The business's street address.
- City (`city`, text): The business's city.
- State (`state`, text): The business's state or region.
- ZIP code (`zip_code`, text): The business's ZIP or postcode.
- Country (`country`, text): The business's country.
- SEO title (`seo_title`, text): The site's title for search engines.
- SEO description (`seo_description`, text): The site's description for search engines.

**Outputs**

- `account_name` (text): The account that owns the site, usually an email
- `business_email` (text): The business's email
- `business_name` (text): The business the site is for
- `business_phone` (text): The business's phone number
- `canonical_url` (text): The address search engines are sent to
- `city` (text): The business's city
- `country` (text): The business's country
- `created_at` (text): When the site was made (ISO 8601, UTC)
- `default_domain` (text): The site's default address on your Duda domain
- `editor` (text): The editor it's built in: SIMPLE, ADVANCED, ADVANCED-2.0 or VIBE
- `editor_url` (text): A link to open the site in the editor
- `external_id` (text): Your own reference for the site; empty if none
- `first_published_at` (text): When it was first published (ISO 8601, UTC); empty if never
- `labels` (list): The site's labels
- `language` (text): The site's main language, such as en
- `last_published_at` (text): When it was last published (ISO 8601, UTC); empty if never
- `modified_at` (text): When the site last changed (ISO 8601, UTC)
- `overview_url` (text): A link to the site's overview in the dashboard
- `preview_url` (text): A link to preview the site
- `publish_status` (text): PUBLISHED, UNPUBLISHED or NOT_PUBLISHED_YET
- `seo_description` (text): The site's description for search engines
- `seo_title` (text): The site's title for search engines
- `site_domain` (text): The site's own domain, such as example.com; empty if none
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `state` (text): The business's state or region
- `street` (text): The business's street address
- `template_id` (number): The ID of the template it was made from
- `thumbnail_url` (text): A picture of the site
- `zip_code` (text): The business's ZIP or postcode

**Example output**

```json
{
  "account_name": "owner@example.com",
  "business_email": "business@example.com",
  "business_name": "Example Business",
  "business_phone": "(123) 456-7890",
  "canonical_url": "https://www.example.com/",
  "city": "San Francisco",
  "country": "United States",
  "created_at": "2016-04-01T04:36:54Z",
  "default_domain": "example.multiscreensite.com",
  "editor": "ADVANCED",
  "editor_url": "https://example.com/home/site/6c56394c",
  "external_id": "an-external-reference",
  "first_published_at": "2016-04-03T04:36:54Z",
  "labels": [
    "QA team",
    "priority client"
  ],
  "language": "en",
  "last_published_at": "2016-11-15T22:55:53Z",
  "modified_at": "2016-11-15T22:55:53Z",
  "overview_url": "https://example.com/home/dashboard/overview/6c56394c",
  "preview_url": "https://example.com/link/to/preview",
  "publish_status": "PUBLISHED",
  "seo_description": "A description of the website.",
  "seo_title": "Example Title",
  "site_domain": "example.com",
  "site_name": "6c56394c",
  "state": "CA",
  "street": "1240 Main ST.",
  "template_id": 1027437,
  "thumbnail_url": "https://example.com/link/to/image",
  "zip_code": "94122"
}
```

### Delete account

Delete a client or team member account for good. Its sites stay.

**Inputs**

- Account name (`account_name`, text, required): The client account's name in Duda, usually the email it was made with.

**Outputs**

- `account_name` (text): The account's name in Duda, which the other Duda steps take
- `deleted` (true/false): True once it's deleted

**Example output**

```json
{
  "account_name": "uniqueAcctReference",
  "deleted": true
}
```

### Delete collection rows

Delete rows from a site's collection.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Collection (`collection`, text, required): The collection, or its name.
- Row IDs (`rows`, list, required): The IDs of the rows to delete.
- Publish to the live site (`publish`, true/false): Also publish the collection, so a published site shows the change at once. Off, it waits for the next publish. Default: `false`.

**Outputs**

- `collection` (text): The collection's name
- `count` (number): How many rows were deleted
- `deleted_row_ids` (list): The IDs of the rows deleted
- `published` (true/false): True if the collection was published to the live site
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "collection": "events",
  "count": 2,
  "deleted_row_ids": [
    "144",
    "145"
  ],
  "published": false,
  "site_name": "6c56394c"
}
```

### Delete site

Delete a site for good and cancel its plan. This can't be undone.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.

**Outputs**

- `deleted` (true/false): True once it's deleted
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "deleted": true,
  "site_name": "6c56394c"
}
```

### Duplicate site

Make a copy of a site, unpublished, with its own default address.

**Inputs**

- Site (`site`, text, required): The site to copy.
- Address prefix (`new_domain_prefix`, text, required): The first part of the copy's default address, such as joes-pizza-2. Letters, numbers and hyphens.
- External ID (`external_id`, text): Your own reference for the copy.

**Outputs**

- `account_name` (text): The account that owns the site, usually an email
- `business_email` (text): The business's email
- `business_name` (text): The business the site is for
- `business_phone` (text): The business's phone number
- `canonical_url` (text): The address search engines are sent to
- `city` (text): The business's city
- `country` (text): The business's country
- `created_at` (text): When the site was made (ISO 8601, UTC)
- `default_domain` (text): The site's default address on your Duda domain
- `editor` (text): The editor it's built in: SIMPLE, ADVANCED, ADVANCED-2.0 or VIBE
- `editor_url` (text): A link to open the site in the editor
- `external_id` (text): Your own reference for the site; empty if none
- `first_published_at` (text): When it was first published (ISO 8601, UTC); empty if never
- `labels` (list): The site's labels
- `language` (text): The site's main language, such as en
- `last_published_at` (text): When it was last published (ISO 8601, UTC); empty if never
- `modified_at` (text): When the site last changed (ISO 8601, UTC)
- `overview_url` (text): A link to the site's overview in the dashboard
- `preview_url` (text): A link to preview the site
- `publish_status` (text): PUBLISHED, UNPUBLISHED or NOT_PUBLISHED_YET
- `seo_description` (text): The site's description for search engines
- `seo_title` (text): The site's title for search engines
- `site_domain` (text): The site's own domain, such as example.com; empty if none
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `state` (text): The business's state or region
- `street` (text): The business's street address
- `template_id` (number): The ID of the template it was made from
- `thumbnail_url` (text): A picture of the site
- `zip_code` (text): The business's ZIP or postcode

**Example output**

```json
{
  "account_name": "owner@example.com",
  "business_email": "business@example.com",
  "business_name": "Example Business",
  "business_phone": "(123) 456-7890",
  "canonical_url": "https://www.example.com/",
  "city": "San Francisco",
  "country": "United States",
  "created_at": "2016-04-01T04:36:54Z",
  "default_domain": "example.multiscreensite.com",
  "editor": "ADVANCED",
  "editor_url": "https://example.com/home/site/6c56394c",
  "external_id": "an-external-reference",
  "first_published_at": "2016-04-03T04:36:54Z",
  "labels": [
    "QA team",
    "priority client"
  ],
  "language": "en",
  "last_published_at": "2016-11-15T22:55:53Z",
  "modified_at": "2016-11-15T22:55:53Z",
  "overview_url": "https://example.com/home/dashboard/overview/6c56394c",
  "preview_url": "https://example.com/link/to/preview",
  "publish_status": "PUBLISHED",
  "seo_description": "A description of the website.",
  "seo_title": "Example Title",
  "site_domain": "example.com",
  "site_name": "6c56394c",
  "state": "CA",
  "street": "1240 Main ST.",
  "template_id": 1027437,
  "thumbnail_url": "https://example.com/link/to/image",
  "zip_code": "94122"
}
```

### Get account

Get a client or team member account's details.

**Inputs**

- Account name (`account_name`, text, required): The client account's name in Duda, usually the email it was made with.

**Outputs**

- `account_name` (text): The account's name in Duda, which the other Duda steps take
- `account_type` (text): CUSTOMER for a client, STAFF for a team member
- `company_name` (text): The account holder's company
- `email` (text): The account holder's email
- `first_name` (text): The account holder's first name
- `language` (text): The language Duda's screens show them, such as en
- `last_name` (text): The account holder's last name

**Example output**

```json
{
  "account_name": "uniqueAcctReference",
  "account_type": "CUSTOMER",
  "company_name": "Joann's Agency",
  "email": "example@domain.com",
  "first_name": "Joann",
  "language": "en",
  "last_name": "Smith"
}
```

### Get content library

Get a site's content library: the business's name, logo, phones, emails, address, opening hours, social profiles, texts and images.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.

**Outputs**

- `about_us` (text): The site's about-us text
- `additional_location_count` (number): How many more locations the business has
- `business_hours` (list): When the main location is open
- `business_name` (text): The business's name
- `category` (text): The kind of business, for Duda's AI assistant
- `city` (text): The main location's city
- `country` (text): The main location's country
- `custom_texts` (object): The site's own texts, by label
- `description` (text): What the business does, for Duda's AI assistant
- `email` (text): The main location's first email
- `emails` (list): Every email of the main location
- `images` (list): The site's images
- `logo_url` (text): A link to the business's logo
- `overview` (text): The site's overview text
- `phone` (text): The main location's first phone number
- `phones` (list): Every phone number of the main location
- `postal_code` (text): The main location's postcode
- `region` (text): The main location's state or region
- `services` (text): The site's services text
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `social_accounts` (object): The location's social profiles, by network, such as facebook
- `street` (text): The main location's street address

**Example output**

```json
{
  "about_us": "Three generations of bakers.",
  "additional_location_count": 0,
  "business_hours": [
    {
      "close": "17:00",
      "days": [
        "MON",
        "TUE",
        "WED",
        "THU",
        "FRI"
      ],
      "open": "07:30"
    }
  ],
  "business_name": "Example Business",
  "category": "Bakery",
  "city": "San Francisco",
  "country": "US",
  "custom_texts": {
    "tagline": "Baked today"
  },
  "description": "A family bakery making bread and cakes since 1990.",
  "email": "business@example.com",
  "emails": [
    {
      "address": "business@example.com",
      "label": "Orders"
    }
  ],
  "images": [
    {
      "alt": "The bakery from the street",
      "label": "Storefront",
      "url": "https://example.com/path/to/storefront.png"
    }
  ],
  "logo_url": "https://example.com/path/to/logo.png",
  "overview": "Fresh bread every morning.",
  "phone": "(123) 456-7890",
  "phones": [
    {
      "label": "Main",
      "number": "(123) 456-7890"
    }
  ],
  "postal_code": "94122",
  "region": "CA",
  "services": "Bread, cakes and catering.",
  "site_name": "6c56394c",
  "social_accounts": {
    "facebook": "duda"
  },
  "street": "1240 Main ST."
}
```

### Get site

Get a site's details: its business, domain, publish status and dates, and links to edit and preview it.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.

**Outputs**

- `account_name` (text): The account that owns the site, usually an email
- `business_email` (text): The business's email
- `business_name` (text): The business the site is for
- `business_phone` (text): The business's phone number
- `canonical_url` (text): The address search engines are sent to
- `city` (text): The business's city
- `country` (text): The business's country
- `created_at` (text): When the site was made (ISO 8601, UTC)
- `default_domain` (text): The site's default address on your Duda domain
- `editor` (text): The editor it's built in: SIMPLE, ADVANCED, ADVANCED-2.0 or VIBE
- `editor_url` (text): A link to open the site in the editor
- `external_id` (text): Your own reference for the site; empty if none
- `first_published_at` (text): When it was first published (ISO 8601, UTC); empty if never
- `labels` (list): The site's labels
- `language` (text): The site's main language, such as en
- `last_published_at` (text): When it was last published (ISO 8601, UTC); empty if never
- `modified_at` (text): When the site last changed (ISO 8601, UTC)
- `overview_url` (text): A link to the site's overview in the dashboard
- `preview_url` (text): A link to preview the site
- `publish_status` (text): PUBLISHED, UNPUBLISHED or NOT_PUBLISHED_YET
- `seo_description` (text): The site's description for search engines
- `seo_title` (text): The site's title for search engines
- `site_domain` (text): The site's own domain, such as example.com; empty if none
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `state` (text): The business's state or region
- `street` (text): The business's street address
- `template_id` (number): The ID of the template it was made from
- `thumbnail_url` (text): A picture of the site
- `zip_code` (text): The business's ZIP or postcode

**Example output**

```json
{
  "account_name": "owner@example.com",
  "business_email": "business@example.com",
  "business_name": "Example Business",
  "business_phone": "(123) 456-7890",
  "canonical_url": "https://www.example.com/",
  "city": "San Francisco",
  "country": "United States",
  "created_at": "2016-04-01T04:36:54Z",
  "default_domain": "example.multiscreensite.com",
  "editor": "ADVANCED",
  "editor_url": "https://example.com/home/site/6c56394c",
  "external_id": "an-external-reference",
  "first_published_at": "2016-04-03T04:36:54Z",
  "labels": [
    "QA team",
    "priority client"
  ],
  "language": "en",
  "last_published_at": "2016-11-15T22:55:53Z",
  "modified_at": "2016-11-15T22:55:53Z",
  "overview_url": "https://example.com/home/dashboard/overview/6c56394c",
  "preview_url": "https://example.com/link/to/preview",
  "publish_status": "PUBLISHED",
  "seo_description": "A description of the website.",
  "seo_title": "Example Title",
  "site_domain": "example.com",
  "site_name": "6c56394c",
  "state": "CA",
  "street": "1240 Main ST.",
  "template_id": 1027437,
  "thumbnail_url": "https://example.com/link/to/image",
  "zip_code": "94122"
}
```

### Get site analytics

Get a site's visits, visitors and page views, or its calls, map clicks, email clicks and form submissions, over a period. Leave the dates blank for the last 30 days.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- From (`start_date`, date): The first day to count.
- To (`end_date`, date): The last day to count. Defaults to today.
- What to count (`metrics`, text): Visits, or what visitors did. One of: `traffic` (Visits, visitors and page views), `activities` (Calls, map clicks, email clicks and form submissions). Default: `traffic`.
- Break down (`breakdown`, text): Split visits by where visitors were or what they used. Leave blank for totals. Only when What to count is Visits, visitors and page views. One of: `geo` (By country and region), `system` (By browser and OS).

**Outputs**

- `breakdown` (text): geo, system, or empty for totals only
- `click_to_calls` (number): Taps on a call button (activities only)
- `click_to_emails` (number): Taps on an email button (activities only)
- `click_to_maps` (number): Taps on a map button (activities only)
- `end_date` (text): The last day counted; empty for today
- `form_submits` (number): Forms sent (activities only)
- `metrics` (text): traffic or activities
- `page_views` (number): Page views; with a breakdown, the rows added up
- `rows` (list): With a breakdown, one row per country and region or browser and OS
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `start_date` (text): The first day counted; empty for Duda's default, the last 30 days
- `visitors` (number): Unique visitors; with a breakdown, the rows added up
- `visits` (number): Visits in the period; with a breakdown, the rows added up

**Example output**

```json
{
  "breakdown": "geo",
  "click_to_calls": 0,
  "click_to_emails": 0,
  "click_to_maps": 0,
  "end_date": "2016-03-31",
  "form_submits": 0,
  "metrics": "traffic",
  "page_views": 300,
  "rows": [
    {
      "browser": "",
      "country": "US",
      "os": "",
      "page_views": 150,
      "region": "CA",
      "visitors": 50,
      "visits": 100
    },
    {
      "browser": "",
      "country": "Canada",
      "os": "",
      "page_views": 150,
      "region": "Ontario",
      "visitors": 50,
      "visits": 100
    }
  ],
  "site_name": "6c56394c",
  "start_date": "2016-03-01",
  "visitors": 100,
  "visits": 200
}
```

### Grant site access

Let an account work on a site, with what it may do there, such as edit or see stats. It replaces what the account could do on that site.

**Inputs**

- Account name (`account_name`, text, required): The client account's name in Duda, usually the email it was made with.
- Site (`site`, text, required): The site, or its site name from another Duda step.
- Permissions (`permissions`, list, required): What the account may do on the site. Some need others: SEO needs Edit the site.

**Outputs**

- `account_name` (text): The account's name in Duda, which the other Duda steps take
- `permissions` (list): What the account may now do on the site, as Duda's codes
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "account_name": "uniqueAcctReference",
  "permissions": [
    "EDIT",
    "STATS_TAB"
  ],
  "site_name": "6c56394c"
}
```

### List collections

List a site's collections with their fields and rows, or get one collection.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Collection (`collection`, text): Only this collection. Leave blank for all of them.

**Outputs**

- `collections` (list): The site's collections
- `count` (number): How many collections
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "collections": [
    {
      "external": false,
      "fields": [
        {
          "name": "date",
          "type": "date_time"
        },
        {
          "name": "entry-price",
          "type": "plain_text"
        },
        {
          "name": "location",
          "type": "plain_text"
        }
      ],
      "name": "events",
      "row_count": 1,
      "rows": [
        {
          "data": {
            "date": "01/10/2019",
            "entry-price": "$50",
            "location": "San Francisco"
          },
          "id": "144",
          "page_item_url": "san-francisco",
          "status": "ACTIVE"
        }
      ]
    }
  ],
  "count": 1,
  "site_name": "6c56394c"
}
```

### List form submissions

List what visitors sent through a site's contact forms, newest first, with every field filled in.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Since (`since`, date and time): Only submissions sent from this time on. Leave blank for all of them.
- Until (`until`, date and time): Only submissions sent before this time.
- Campaign (`utm_campaign`, text): Only submissions from this campaign (utm_campaign).

**Outputs**

- `count` (number): How many
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `submissions` (list): The submissions, newest first

**Example output**

```json
{
  "count": 1,
  "site_name": "6c56394c",
  "submissions": [
    {
      "fields": {
        "Email": "test@test.com",
        "Message": "test message",
        "Name": "test3",
        "Phone": "123-123-1234"
      },
      "form_title": "Contact Us",
      "site_name": "6c56394c",
      "submitted_at": "2014-05-08T23:12:06Z",
      "text": "Name: test3\nPhone: 123-123-1234\nEmail: test@test.com\nMessage: test message",
      "utm_campaign": ""
    }
  ]
}
```

### List sites

List your Duda sites, newest first, by publish status or the day they were made. Gets one page; to see more, run it again with a higher 'Skip'.

**Inputs**

- Publish status (`publish_status`, list): Only sites in these states. Leave blank for all. One or more of: `PUBLISHED`, `UNPUBLISHED`, `NOT_PUBLISHED_YET` (Not published yet).
- Made on or after (`created_after`, date): Only sites made on or after this day.
- Made before (`created_before`, date): Only sites made before this day.
- Order (`sort`, text): Which sites come first. One of: `newest` (Newest first), `oldest` (Oldest first), `recently_published` (Last published first). Default: `newest`.
- How many (`limit`, number): The most to list. Defaults to 50. From 1 to 200.
- Skip (`offset`, number): How many sites to skip first, for the next page. At least 0.

**Outputs**

- `count` (number): How many are listed
- `has_more` (true/false): True if there may be more on the next page
- `offset` (number): How many sites were skipped before these
- `sites` (list): The sites listed

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "offset": 0,
  "sites": [
    {
      "account_name": "owner@example.com",
      "business_email": "business@example.com",
      "business_name": "Example Business",
      "business_phone": "(123) 456-7890",
      "canonical_url": "https://www.example.com/",
      "city": "San Francisco",
      "country": "United States",
      "created_at": "2016-04-01T04:36:54Z",
      "default_domain": "example.multiscreensite.com",
      "editor": "ADVANCED",
      "editor_url": "https://example.com/home/site/6c56394c",
      "external_id": "an-external-reference",
      "first_published_at": "2016-04-03T04:36:54Z",
      "labels": [
        "QA team",
        "priority client"
      ],
      "language": "en",
      "last_published_at": "2016-11-15T22:55:53Z",
      "modified_at": "2016-11-15T22:55:53Z",
      "overview_url": "https://example.com/home/dashboard/overview/6c56394c",
      "preview_url": "https://example.com/link/to/preview",
      "publish_status": "PUBLISHED",
      "seo_description": "A description of the website.",
      "seo_title": "Example Title",
      "site_domain": "example.com",
      "site_name": "6c56394c",
      "state": "CA",
      "street": "1240 Main ST.",
      "template_id": 1027437,
      "thumbnail_url": "https://example.com/link/to/image",
      "zip_code": "94122"
    }
  ]
}
```

### List templates

List the templates a site can be made from: Duda's and your own.

**Inputs**

- Name contains (`name_contains`, text): Only templates whose name has these words.
- Whose (`template_type`, text): Only Duda's templates or only your own. Leave blank for both. One of: `DUDA` (Duda's templates), `CUSTOM` (Your own templates).
- Editor (`editor`, text): Only templates for this editor. Leave blank for all. One of: `ADVANCED-2.0` (Editor 2.0), `ADVANCED` (Classic editor), `VIBE`.
- How many (`limit`, number): The most to list. Defaults to 100. From 1 to 500.

**Outputs**

- `count` (number): How many are listed
- `templates` (list): The templates listed
- `total` (number): How many templates matched in all

**Example output**

```json
{
  "count": 1,
  "templates": [
    {
      "categories": [
        "Business",
        "Events"
      ],
      "editor": "ADVANCED-2.0",
      "has_blog": false,
      "has_store": false,
      "page_count": 1,
      "preview_url": "http://dashboard.russjeffery.com/preview/dm-theme-1026287-en-343",
      "template_alias": "967f2fd827924dd69db4042e708aee6b",
      "template_id": 1005442,
      "template_name": "Consultant Landing Page",
      "template_type": "custom",
      "thumbnail_url": "https://irp-cdn.multiscreensite.com/c1e7738d32ae46538527c1fd4e95a9b9/siteTemplateIcons/4CXbg61CTvKDPTEyC7EQ_Consultant_landing_page_3%20screens.png"
    }
  ],
  "total": 1
}
```

### Publish content library

Put a site's content library changes on its live site.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.

**Outputs**

- `published` (true/false): True once the live site has the changes
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "published": true,
  "site_name": "6c56394c"
}
```

### Publish site

Put a site live, or put changes made since the last publish live. Publishing starts the site's paid plan on your Duda account.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.

**Outputs**

- `published` (true/false): True once it's live
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "published": true,
  "site_name": "6c56394c"
}
```

### Unpublish site

Take a site offline. Duda suspends its paid plan; publishing it again brings it back.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.

**Outputs**

- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `unpublished` (true/false): True once it's offline

**Example output**

```json
{
  "site_name": "6c56394c",
  "unpublished": true
}
```

### Update collection row

Change some fields of a row in a site's collection. Fields left out keep their values.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Collection (`collection`, text, required): The collection, or its name.
- Row ID (`row`, text, required): The row's ID, from 'Add collection row', 'List collections' or the trigger.
- Fields (`data`, object, required): The row's values, by field. Choose the site and collection to fill them in one by one, or give an object from an earlier step.
- Shows (`status`, text): Where the row shows up. Leave blank for live on a new row, or to keep it as it is on an existing one. One of: `ACTIVE` (Live (on the site and in the editor)), `PREVIEW` (Editor only), `DRAFT` (Draft (in the collection only)).
- Publish to the live site (`publish`, true/false): Also publish the collection, so a published site shows the change at once. Off, it waits for the next publish. Default: `false`.

**Outputs**

- `collection` (text): The collection's name
- `published` (true/false): True if the collection was published to the live site
- `row_id` (text): The row's ID
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take

**Example output**

```json
{
  "collection": "events",
  "published": false,
  "row_id": "144",
  "site_name": "6c56394c"
}
```

### Update content library

Change a site's business details, address and texts in its content library. The editor shows them at once; 'Publish content library' puts them live. Fields left blank keep what they have.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Business name (`business_name`, text): The business's name.
- Logo (`logo_url`, text): A link to the business's logo.
- Description (`description`, text): What the business does, which Duda's AI assistant writes from.
- Phone (`phone`, text): The main phone number. It replaces the first number; any others stay.
- Email (`email`, text): The main email. It replaces the first email; any others stay.
- Street (`street`, text): The street address.
- City (`city`, text): The city.
- Region (`region`, text): The state or region.
- Postcode (`postal_code`, text): The postcode or ZIP code.
- Country (`country`, text): The country.
- Overview (`overview`, text): The overview text.
- Services (`services`, text): The services text.
- About us (`about_us`, text): The about-us text.
- Custom texts (`custom_texts`, object): Texts of your own by label, such as {"tagline": "Baked today"}. A label the site already has is replaced.

**Outputs**

- `about_us` (text): The site's about-us text
- `additional_location_count` (number): How many more locations the business has
- `business_hours` (list): When the main location is open
- `business_name` (text): The business's name
- `category` (text): The kind of business, for Duda's AI assistant
- `city` (text): The main location's city
- `country` (text): The main location's country
- `custom_texts` (object): The site's own texts, by label
- `description` (text): What the business does, for Duda's AI assistant
- `email` (text): The main location's first email
- `emails` (list): Every email of the main location
- `images` (list): The site's images
- `logo_url` (text): A link to the business's logo
- `overview` (text): The site's overview text
- `phone` (text): The main location's first phone number
- `phones` (list): Every phone number of the main location
- `postal_code` (text): The main location's postcode
- `region` (text): The main location's state or region
- `services` (text): The site's services text
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `social_accounts` (object): The location's social profiles, by network, such as facebook
- `street` (text): The main location's street address

**Example output**

```json
{
  "about_us": "Three generations of bakers.",
  "additional_location_count": 0,
  "business_hours": [
    {
      "close": "17:00",
      "days": [
        "MON",
        "TUE",
        "WED",
        "THU",
        "FRI"
      ],
      "open": "07:30"
    }
  ],
  "business_name": "Example Business",
  "category": "Bakery",
  "city": "San Francisco",
  "country": "US",
  "custom_texts": {
    "tagline": "Baked today"
  },
  "description": "A family bakery making bread and cakes since 1990.",
  "email": "business@example.com",
  "emails": [
    {
      "address": "business@example.com",
      "label": "Orders"
    }
  ],
  "images": [
    {
      "alt": "The bakery from the street",
      "label": "Storefront",
      "url": "https://example.com/path/to/storefront.png"
    }
  ],
  "logo_url": "https://example.com/path/to/logo.png",
  "overview": "Fresh bread every morning.",
  "phone": "(123) 456-7890",
  "phones": [
    {
      "label": "Main",
      "number": "(123) 456-7890"
    }
  ],
  "postal_code": "94122",
  "region": "CA",
  "services": "Bread, cakes and catering.",
  "site_name": "6c56394c",
  "social_accounts": {
    "facebook": "duda"
  },
  "street": "1240 Main ST."
}
```

### Update site

Change a site's domain, address, references, SEO settings, favicon or Google tags. Fields left blank keep what the site has.

**Inputs**

- Site (`site`, text, required): The site, or its site name from another Duda step.
- Domain (`site_domain`, text): The site's own domain, such as www.example.com.
- Address prefix (`default_domain_prefix`, text): A new first part for its default address. Letters, numbers and hyphens.
- External ID (`external_id`, text): Your own reference for it.
- SEO title (`seo_title`, text): Its title for search engines.
- SEO description (`seo_description`, text): Its description for search engines.
- Search engines (`search_engines`, text): Whether search engines may list it. Leave blank to keep it as it is. One of: `index` (Let search engines list it), `noindex` (Hide it from search engines).
- Favicon (`favicon_url`, text): A link to its new favicon.
- Google tag IDs (`google_tag_ids`, list): Up to 10 Google tag IDs, such as G-XXXXXXX or GTM-XXXXXX. They replace the ones it has.

**Outputs**

- `account_name` (text): The account that owns the site, usually an email
- `business_email` (text): The business's email
- `business_name` (text): The business the site is for
- `business_phone` (text): The business's phone number
- `canonical_url` (text): The address search engines are sent to
- `city` (text): The business's city
- `country` (text): The business's country
- `created_at` (text): When the site was made (ISO 8601, UTC)
- `default_domain` (text): The site's default address on your Duda domain
- `editor` (text): The editor it's built in: SIMPLE, ADVANCED, ADVANCED-2.0 or VIBE
- `editor_url` (text): A link to open the site in the editor
- `external_id` (text): Your own reference for the site; empty if none
- `first_published_at` (text): When it was first published (ISO 8601, UTC); empty if never
- `labels` (list): The site's labels
- `language` (text): The site's main language, such as en
- `last_published_at` (text): When it was last published (ISO 8601, UTC); empty if never
- `modified_at` (text): When the site last changed (ISO 8601, UTC)
- `overview_url` (text): A link to the site's overview in the dashboard
- `preview_url` (text): A link to preview the site
- `publish_status` (text): PUBLISHED, UNPUBLISHED or NOT_PUBLISHED_YET
- `seo_description` (text): The site's description for search engines
- `seo_title` (text): The site's title for search engines
- `site_domain` (text): The site's own domain, such as example.com; empty if none
- `site_name` (text): The site's name in Duda (its ID), which the other Duda steps take
- `state` (text): The business's state or region
- `street` (text): The business's street address
- `template_id` (number): The ID of the template it was made from
- `thumbnail_url` (text): A picture of the site
- `zip_code` (text): The business's ZIP or postcode

**Example output**

```json
{
  "account_name": "owner@example.com",
  "business_email": "business@example.com",
  "business_name": "Example Business",
  "business_phone": "(123) 456-7890",
  "canonical_url": "https://www.example.com/",
  "city": "San Francisco",
  "country": "United States",
  "created_at": "2016-04-01T04:36:54Z",
  "default_domain": "example.multiscreensite.com",
  "editor": "ADVANCED",
  "editor_url": "https://example.com/home/site/6c56394c",
  "external_id": "an-external-reference",
  "first_published_at": "2016-04-03T04:36:54Z",
  "labels": [
    "QA team",
    "priority client"
  ],
  "language": "en",
  "last_published_at": "2016-11-15T22:55:53Z",
  "modified_at": "2016-11-15T22:55:53Z",
  "overview_url": "https://example.com/home/dashboard/overview/6c56394c",
  "preview_url": "https://example.com/link/to/preview",
  "publish_status": "PUBLISHED",
  "seo_description": "A description of the website.",
  "seo_title": "Example Title",
  "site_domain": "example.com",
  "site_name": "6c56394c",
  "state": "CA",
  "street": "1240 Main ST.",
  "template_id": 1027437,
  "thumbnail_url": "https://example.com/link/to/image",
  "zip_code": "94122"
}
```
