POST
/
ott
/
pages
/
v1
cURL
curl --request POST \
  --url https://api.mottostreaming.com/ott/pages/v1 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "<string>",
  "project_id": "<string>",
  "name": "<string>",
  "title": {},
  "description": {},
  "page_type": "PAGE_TYPE_UNSPECIFIED",
  "parameters": [
    "<string>"
  ],
  "page_component_ids": [
    "<string>"
  ],
  "css": "<string>",
  "platform_id": "<string>",
  "visibility": "VISIBILITY_UNSPECIFIED",
  "metadata_tags": {},
  "overrides": {},
  "page_components": [
    {
      "project_id": "<string>",
      "name": "<string>",
      "type": "<string>",
      "data": {},
      "props": {},
      "environments": [
        "<string>"
      ],
      "visibility": "VISIBILITY_UNSPECIFIED",
      "group_id": "<string>"
    }
  ]
}'
{
  "page": {
    "id": "<string>",
    "project_id": "<string>",
    "name": "<string>",
    "title": {},
    "description": {},
    "page_type": "PAGE_TYPE_UNSPECIFIED",
    "parameters": [
      "<string>"
    ],
    "page_component_ids": [
      "<string>"
    ],
    "css": "<string>",
    "platform_id": "<string>",
    "visibility": "VISIBILITY_UNSPECIFIED",
    "metadata_tags": {},
    "overrides": {},
    "page_components": [
      {
        "id": "<string>",
        "project_id": "<string>",
        "name": "<string>",
        "type": "<string>",
        "data": {},
        "props": {},
        "environments": [
          "<string>"
        ],
        "visibility": "VISIBILITY_UNSPECIFIED",
        "group_id": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Page is a configuration object that defines the structure of a page, of which there can be arbitrarily many instances.

id
string
required

User generated identifier for the page. It is unique in the context of a single page_type. This id is used to construct the non-slug version URL of this page. If this is a page that represents a single content type in the CMS (event/creative_work/entity), then this id should be the same as the type_id of that content type (e.g. "team")

project_id
string
required
page_type
enum<string>
required
Available options:
PAGE_TYPE_UNSPECIFIED,
PAGE_TYPE_DEFAULT,
PAGE_TYPE_HOME,
PAGE_TYPE_EVENT,
PAGE_TYPE_CREATIVE_WORK,
PAGE_TYPE_ENTITY
name
string

The name of this page entry. Not shown to end users.

title
object

A map of localized titles for this page, for end users to see. The key is the language code (ISO 639 - set 1), e.g. "en", "de", "fr", etc. If you want to localize the text for different regions of the same language, you can add the country code (ISO 3166-1 alpha-2), e.g. "en-US", "en-GB", etc. For PAGE_TYPE_EVENT, PAGE_TYPE_CREATIVE_WORK, and PAGE_TYPE_ENTITY, you can include reference properties of the resource you are loading dynamically, e.g. {event.title}, {creative_work.description} or {entity.name}. Important: this is also used in the page's HTML <metadata> and <title> tags. If this map is left empty, a best effort title will be generated (e.g. based on page_type + parameter data).

Note: this overwrites the platform-level title configuration.

description
object

A map of localized descriptions for this page. This description will be included in the page metadata and can be important for search-engine optimization.

parameters
string[]

The list of parameters that a page instance should collect in order to work. For example ["competition_id"]. The order of this list is important, as it will be used to parse the URL of a page. For example, if the page_type is PAGE_TYPE_ENTITY, the id is "competition", and the parameter list is ["id", "year"], then this page will listen to e.g. https://example.com/en-US/entity/competition/HiKTtRZYdyGU/2024. Important: the page will also listen to URLs that do not contain all the parameters. In that case, it will not render any component that is dependent on this parameter.

page_component_ids
string[]

A list of page component IDs that together define the structure of the page. The order of this list determines the order in which the components are displayed towards end users.

css
string

Web only. CSS rules that should be included in the page. Can be used to override default page/component styling.

platform_id
string

The platform ID that this page is associated with.

visibility
enum<string>
Available options:
VISIBILITY_UNSPECIFIED,
VISIBILITY_PUBLISHED,
VISIBILITY_UNLISTED,
VISIBILITY_HIDDEN
metadata_tags
object

A map of metadata tags that should be included in the page. These tags can be used for search-engine optimization. Note that some default tags will already be set based on other fields on this object, like title and description.

overrides
object

A map of overrides for the page. This is useful for scenarios where some subset of Page instantiations should have different properties. The key is a filter, which can target any URL parameter or event/entity property. It supports AND and OR clauses, but not both at the same time. It does not support negation, or nesting. The value is a PageOverride, that will be applied to the page when the filter matches. For example:

  • if the regular page is for a "team" entity, but you want a special page for FC Barcelona, the key would be team.id:fc_barca_123 (or whatever the ID of the FC Barcelona entity is).
  • if the regular page is for a "player" entity, but you want a special page for all players in the the national team, the key would be player.fields.team.id:national_team_123 (or whatever the ID of the national team entity is), provided the player entity has a team field that references the team entity.
  • If the regular page is a "default" page like the "Search results" page, but you want a special page for the "FC Barcelona" search query, then you can use the key q:FC Barcelona (if "q" is your URL parameter name).

Note that a hit on a page override will entirely replace the page components and other properties; it will not merge with the base page.

page_components
object[]

A list of page components that together define the structure of the page. The order of this list determines the order in which the components are displayed towards end users. This field can be set during creation for convenience, but for updating, use page_component_ids after creating individual components first. This field is not populated on List responses.

Response

OK

page
object

Page is a configuration object that defines the structure of a page, of which there can be arbitrarily many instances.