Sites

Site Object

{
  "account_name": "owner@example.com",
  "external_uid": "an-external-reference",
  "site_domain": "example.com",
  "google_tracking_id": "string",
  "lang": "en",
  "additionalLanguages":["de"],
  "site_business_info": {
    "business_name": "Example Business",
    "address": {
      "street": "1240 Main ST.",
      "city": "San Francisco",
      "state": "CA",
      "country": "United States",
      "zip_code": "94122"
    },
    "phone_number": "(123) 456-7890",
    "email": "business@example.com",
    "opentable_info": []
  },
  "site_alternate_domains": {
    "domains": [
      "example.org",
      "example.net"
    ],
    "is_redirect": true
  },
  "site_seo": {
    "og_image": "https://example.com/link/to/image",
    "title": "Example Title",
    "description": "A description of the website.", 
    "no_index": false
  },
  "schemas": {
    "local_business": {
      "enabled": true,
      "status": "MISSING_REQUIRED_FIELDS",
      "missing_required_fields": [
        "Business Name",
        "Geo Coordinates",
        "Physical Address"
      ],
      "missing_recommended_fields": [
        "Phone Number",
        "Image"
      ]
    }
  },
  "site_name": "6c56394c",
  "template_id": 1027437,
  "site_default_domain": "example.multiscreensite.com",
  "preview_site_url": "https://exmaple.com/link/to/preview",
  "overview_site_url": "https://exmaple.com/home/dashboard/overview/6c56394c",
  "editor_site_url":"https://example.com/home/site/6c56394c",
  "last_published_date": "2016-11-15T22:55:53",
  "first_published_date": "2016-04-03T04:36:54",
  "force_https": false,
  "last_reset_by": "developer@example.com",
  "certificate_status": "COMPLETE",
  "modification_date": "2016-11-15T22:55:53",
  "creation_date": "2016-04-01T04:36:54",
  "publish_status": "PUBLISHED",
  "thumbnail_url": "https://example.com/link/to/image",
  "canonical_url":"https://www.example.com/",
  "store_status": "active",
  "store_type": "native",
  "labels": [
      {
          "name": "QA team"
      },
      {
          "name": "priority client"
      }
  ]
}
Property
Type
Description

google_tracking_id

string

The Google Tag ID set for this site. This value is empty by default, until set in the UI or via API.

site_domain

string

The primary domain currently assigned to the Site.

site_name

string

Duda's unique identifier for the Site.

canonical_url

string

The URL Duda generates as the canonical and where SEO/Search traffic gets directed to. This handles all the different logic of https vs. http vs www. or no-www for the website.

account_name

string

The name, usually an email, of the account that owns the Site.

preview_site_url

string

A direct URL to the white-labeled multi-device preview.

overview_site_url

string

A URL of the overview page of the site.

editor_site_url

string

A direct URL to the site editor.

force_https

bool

Defaults to true. If set to true, the site will be available for both secure and insecure connections.

last_published_date

datetime

The most recent publication date for the Site.

first_published_date

datetime

The first publication date for the Site.

publish_status

string

The current status of the Site: "PUBLISHED", "UNPUBLISHED", "NOT_PUBLISHED_YET".

site_business_info

object

external_uid

string

A unique identifier from an external system such as a database. Optional.

last_reset_by

string

The account that last reset the Site.

certification_status

string

The status of SSL for the Site: "COMPLETE", "IN_PROGRESS", "FAILED".

modification_date

datetime

The date of the most recent change to the website, including API calls.

creation_date

datetime

The created date for the Site.

thumbnail_url

string

A direct URL to view the Site's thumbnail image which Duda generates for the site.

store_status

enum

The current state of the store for the site: "NONE", "ACTIVE", "SUSPENDED".

store_type

enum

The type of store installed on the site: "NATIVE", "THIRDPARTY"

site_alternative_domains

object

fav_icon

string

A direct URL to download the Site's favicon. Supports: gif, jpg, jpeg, png, ico, png, and bmp.

lang

string

The primary language set on the website, as a two character string in (ISO_3166-1_alpha-2)format.

site_business_info

Provides structured data about a website or business. Duda will use this information to help populate the website with this data and fill the content library with data. All data fields are optional.

Property
Type
Description

business_name

string

The name of the business that owns the Site.

phone_number

string

The phone number of the business.

opentable_info

object

An object containing arrays of possible Open Table IDs.

address

Providing an address helps the site creation process by giving Duda more information about the location of the business. For example, if you provide an address, we will automatically populate a maps element and potentially find other resources online to assist in site creation.

Property
Type
Description

street

string

The street name of the business.

state

string

The state where the business is located.

country

string

The country where the business is located.

zip_code

string

The zip code or postal code of the business.

site_alternate_domains

Allows you to define alternate or secondary domains associated with this site. By default, these domains will be 301 redirected to the primary domain. If you change the is_redirect value to false, the alternate domains will resolve the website instead of performing the redirect. Each alternate domain will need to have its DNS settings configured the same way as the primary domain, read here for how to set these up.

Property
Type
Description

domains

string[]

An array of fully qualified domain names for the Site.

is_redirect

bool

Defaults to true. If set as true, all alternate domains will be set to 301 redirects to the primary domain.

site_seo

Set the default site SEO settings for all pages of this website. Any SEO settings on a page level will override the global setting on the site.

Please follow see best practices for Open Graph Images.

Property
Type
Description

og_image

string

The image displayed in URL previews such as social media posts or SMS texts.

title

string

The default title for the Site that's displayed in tabs. (<60 characters)

description

string

The meta description of the site. (<155 characters)

no_index

bool

Defaults to false. If set as true, the entire site will be set to not index.

schemas

The schema's object allows you to enable schema for the website for specific schema objects that exist at the site level. Today, the only schema object supported is LocalBusiness schema.

Read our guide on implementing Local Business Schema.

The location grabbed from the content library is only from the first/primary location in the content library. We do not support multiple locations, yet.

LocalBusiness schema takes core business information from the content library and translates that into the required LocalBusiness schema. This API exists as a validation engine to verify that the data added to the content library passes the minimum data requirement for Local Business.

The schemas object includes a local_business field with the following possible values:

Property
Type
Description

enabled

bool

Whether or not a specific local business schema is enabled.

status

string

The most recent status returned after attempting to enable a specific local business schema.

missing_required_fields

string[]

An array of required fields that have no value. "Address", "Business Name", "Geo Coordinates", "Image".

missing_recommended_fields

string[]

An array of recommended fields that have no value. "Phone Number", "Email", "Hours of Operation", "Social", "Description", "Logo".

labels

Allows you to define site labels for a site. These labels will appear in the sites dashboard.

Property
Type
Description

name

string

The value of labels applied to your site either through the dashboard or API.

Get Site

Get Site

GET https://api.duda.co/api/sites/multiscreen/{site_name}

Get the details of a site by name.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier for the target Site.

curl --request GET \
     --url https://api.duda.co/api/sites/multiscreen/site_name \
     --header 'accept: application/json'

Get Site by External ID

Get Site by External ID

GET https://api.duda.co/api/sites/multiscreen/byexternalid/{external_uid}

Get the names of Sites that have a specific external id.

Path Parameters

Name
Type
Description

external_uid*

string

The external ID associated with a single or group of Sites.

curl --request GET \
     --url https://api.duda.co/api/sites/multiscreen/byexternalid/external_uid \
     --header 'accept: application/json'

Create Site

Create Site

POST https://api.duda.co/api/sites/multiscreen/create

Create a new Site from a Template.

Request Body

Name
Type
Description

template_id*

string

The ID of template to apply to the Site.

default_domain_prefix

string

Must be between 4-44 characters long.

lang

string

site_data

object

labels

array of objects

Good to Know: We recommend storing the site_name in your database

The site_name is a unique string across all Duda websites and will be needed to later access other resources, such as updating the site, getting analytics or granting access.

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/create \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Update Site

Update Site

POST https://api.duda.co/api/sites/multiscreen/update/{site_name}

Update properties of an existing Site.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target site.

Request Body

Name
Type
Description

default_domain_prefix

string

Must be betwee 4-44 characters long.

site_domain

string

external_uid

string

lang

string

fav_icon

string

force_https

bool

site_seo

object

schemas

object

site_alternate_domains

object

google_tracking_id

string

additionalLanguages

array of strings

labels

array of objects

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/update/site_name \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Duplicate Site

Duplicate Site

POST https://api.duda.co/api/sites/multiscreen/duplicate/{site_name}

Creates a new Site based on an existing one.

Path Parameters

Name
Type
Description

site_name

string

The unique identifier of the target Site.

Request Body

Name
Type
Description

new_default_domain_prefix

string

The domain prefix for the newly created Site (ex. a value of 'bobspizza' would create a site with a domain of bobspizza.multiscreensite.com.) This must be a unique value across the system.

new_external_uid

string

The external ID for the newly created Site.

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/duplicate/site_name \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Publish Site

Publish Site

POST https://api.duda.co/api/sites/multiscreen/publish/{site_name}

Takes a Site live and purchases a subscription.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target Site.

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/publish/site_name \
     --header 'accept: application/json'

Unpublish Site

Unpublish Site

POST https://api.duda.co/api/sites/multiscreen/unpublish/{site_name}

Takes down a Site and suspends it's subscription

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target Site.

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/unpublish/site_name \
     --header 'accept: application/json'

Reset Site

Rest Site

POST https://api.duda.co/api/sites/multiscreen/reset/{site_name}

Resets a Site to initial state or based on a new template and data.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target Site.

Request Body

Name
Type
Description

template_id*

string

The template ID to use when resetting the Site.

site_data

object

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/reset/site_name \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Switch Template

Switch Template

POST https://api.duda.co/api/sites/multiscreen/switchTemplate/{site_name}

Applies a new template to an existing Site.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target Site.

Request Body

Name
Type
Description

template_id

string

The template ID to apply to the existing Site.

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/switchTemplate/site_name \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Delete Site

Delete Site

DELETE https://api.duda.co/api/sites/multiscreen/{site_name}

Permanently deletes a Site and cancels all subscriptions.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target Site.

curl --request DELETE \
     --url https://api.duda.co/api/sites/multiscreen/site_name \
     --header 'accept: application/json'

Get Site Theme

Get Site Theme

GET https://api.duda.co/api/sites/multiscreen/{site_name}/theme

Get the theme of a site by name.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target Site.

curl --request GET \
     --url https://api.duda.co/api/sites/multiscreen/site_name/theme \
     --header 'accept: application/json'

Update Site Theme

Update Site Theme

POST https://api.duda.co/api/sites/multiscreen/{site_name}/theme

Update the theme of a site by name.

The request JSON must provide the id of the color.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target Site.

Request Body

Name
Type
Description

colors

object

The request JSON must provide the id of the color.

{
  "colors": [
    {
      "id": "string",
      "value": "string",
      "label": "string"
    }
  ]
}
Data
Type
Description

id

string

Needs to follow the pattern: "color_". (color_1, color_2, etc). This property cannot be changed.

value

string

RGB/RGBA/HEX color value. This will be converted to RGBA by Duda.

label

string

50 chars max. HTML-safe string

curl --request PUT \
     --url https://api.duda.co/api/sites/multiscreen/site_name/theme \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "colors": {
    "colors": [
      {
        "id": "string",
        "value": "string",
        "label": "string"
      }
    ]
  }
}
'

Last updated

Was this helpful?