Skip to main content

Delivery Key example

This schema snippet shows how you can define a delivery key in your content form. This allows your delivery key to be added at the same time as the rest of your content.

Delivery keys are strings of up to 150 characters that can be used instead of the content id to retrieve content items and slots. You can find out more about how to use them on the delivery key page.

Pre-requisites
Link copied!

You must have our next generation Delivery API enabled on your hub to use delivery keys.

How to use
Link copied!

Change the name, title and description of the deliveryKey property to meet your use case. You can also add your own validation.

Delivery key example
Link copied!

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schema-examples.com/delivery-key",
"title": "Delivery key",
"description": "How to define a delivery key in your content form",
"$comment": "Docs: https://amplience.com/docs/development/schema-examples/core-concepts/delivery-key.html",
"allOf": [
{
"$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
}
],
"type": "object",
"properties": {
"_meta": {
"type": "object",
"properties": {
"deliveryKey": {
"type": "string",
"title": "URL",
"description": "Enter the URL"
}
}
}
},
"propertyOrder": []
}

Content form preview
Link copied!

An example of creating a content item using a content type registered from the delivery key schema is shown in the image below.

Content created from the delivery key content type