---
canonical: https://amplience.com/developers/docs/schema-reference/schema-examples/core-concepts/default/
title: Default keyword
description: The properties in this schema example demonstrate how to make use of the default keyword. The default keyword allows you to set the default value of an item.
  interactive: true
  - Schema examples
audience: Developer
date_published: 2022-07-01
date_modified: 2026-04-14
---

# Default keyword schema example

This schema example shows how to use the [default](https://amplience.com/developers/docs/schema-reference/json-schema) keyword to set initial values for items. You can use the `default` keyword with strings, numbers, booleans and lists, as well as content and image links.

## Pre-requisites

None. This is a self contained schema.

## How to use

Use the examples in this schema as a starting point for applying `default` values to your own properties.

> **Info:** To use the `example-image-link` and `example-content-link` properties, you will need to update these properties to use an image and a content item from your own hub.

In the `example-image-link` property, the default value includes all the properties returned by an `image-link` object, including the id, name, endpoint and default host. The easiest way to find all these values is to publish a content item containing the image and view the item in JSON format from a link in the "Content delivery" section of the content form. See [content item properties](https://amplience.com/developers/docs/user-guides/produce-content/create#content-item-properties) for more details.

For the `example-content-link` property you can also find the contentType and id fields from the content item properties window and use these values to define a default `content-link`.

## Defaults example

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema-examples.com/default",
  "title": "Default keyword",
  "description": "Examples of using the default keyword",
  "$comment": "Docs: https://amplience.com/docs/development/schema-examples/core-concepts/default.html",
  "allOf": [
    {
      "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
    }
  ],
  "type": "object",
  "properties": {
    "numberValue": {
      "title": "Number value",
      "description": "A number value between 0 and 100 with a default set",
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "default": 90
    },
    "stringProperty": {
      "title": "A string with a default value",
      "type": "string",
      "minLength": 0,
      "maxLength": 20,
      "default": "Some example text"
    },
    "rich-text-item": {
      "title": "Rich text",
      "type": "string",
      "format": "markdown",
      "default": "Lorem ipsum dolor sit amet\u2026"
    },
    "example-enum": {
      "type": "string",
      "enum": [
        "chair",
        "sofa",
        "bed",
        "table",
        "lamp"
      ],
      "default": "sofa"
    },
    "string-Array": {
      "title": "String array",
      "description": "An array of strings with default values",
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": [
        "string",
        "string1",
        "string2"
      ]
    },
    "color": {
      "title": "Color",
      "format": "color",
      "type": "string",
      "default": "rgb(255, 102, 102)"
    },
    "example-boolean": {
      "title": "Example boolean",
      "type": "boolean",
      "default": true
    },
    "example-image-link": {
      "allOf": [
        {
          "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
        }
      ],
      "default": {
        "_meta": {
          "schema": "http://bigcontent.io/cms/schema/v1/core#/definitions/image-link"
        },
        "id": "286e4760-1812-4e3a-81ab-d2e3bf32b9b5",
        "name": "blue-tie",
        "endpoint": "ampproduct",
        "defaultHost": "cdn.media.amplience.net"
      }
    },
    "example-content-link": {
      "allOf": [
        {
          "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
        },
        {
          "properties": {
            "contentType": {
              "enum": [
                "http://docexample.com/tutorialbanner.json"
              ]
            }
          }
        }
      ],
      "default": {
        "_meta": {
          "schema": "http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
        },
        "contentType": "http://docexample.com/tutorialbanner.json",
        "id": "12058184-97de-42e7-93b5-29b8705a871d"
      }
    }
  },
  "propertyOrder": []
}
```

## Related Pages

[Default keyword](https://amplience.com/developers/docs/schema-reference/json-schema#default-values)
