---
agentTools:
  projectIndex: https://notice-api.readme.io/llms.txt
---

# Get a page

This endpoint is the main entrypoint to get blocks

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Notice API - Block Distribution Network",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://bdn.notice.studio"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/document/{blockIdOrSlug}": {
      "get": {
        "summary": "Get a page",
        "description": "",
        "operationId": "get-published-block",
        "parameters": [
          {
            "name": "blockIdOrSlug",
            "in": "path",
            "description": "Block ID or Slug",
            "schema": {
              "type": "string",
              "default": "ef9b80d1-0e28-4e5a-9a66-449ea6293cbd"
            },
            "required": true
          },
          {
            "name": "format",
            "in": "query",
            "description": "The format of the response. Fragmented is a custom Notice format to inject in your website.",
            "schema": {
              "type": "string",
              "enum": [
                "html",
                "markdown",
                "fragmented"
              ],
              "default": "html"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Specify the response language.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "navigationType",
            "in": "query",
            "description": "Specify the navigation type. Configure your routing if you want to use slash '/' navigation.",
            "schema": {
              "type": "string",
              "enum": [
                "query",
                "slash"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"_id\": \"\",\n  \"type\": \"\",\n  \"createdAt\": \"2021-06-29T12:16:10.654Z\",\n  \"updatedAt\": \"2022-07-27T13:42:31.256Z\",\n  \"isProject\": true,\n  \"workspaceId\": \"\",\n  \"data\": {\n    \"text\": \"\",\n    \"html\": \"\",\n    \"raw\": \"\",\n    \"code\": \"\",\n    \"items\": [\"\"],\n    \"style\": \"ordered|unordered\",\n    \"level\": 1,\n    \"service\": \"youtube|vimeo\",\n    \"source\": \"\",\n    \"embed\": \"\",\n    \"width\": 100,\n    \"height\": 100,\n    \"file\": {\n      \"id\": \"\",\n      \"url\": \"\",\n      \"name\": \"\",\n      \"size\": 100,\n      \"title\": \"\",\n      \"fileId\": \"\",\n      \"mimetype\": \"\",\n      \"resourceId\": \"\",\n      \"originalname\": \"\"\n    },\n    \"title\": \"\",\n    \"caption\": \"\",\n    \"stretched\": true,\n    \"withBackground\": true,\n    \"withBorder\": true,\n    \"content\": [[\"\"], [\"\"]],\n    \"withHeadings\": true,\n    \"importedTweet\": \"\",\n    \"selectedDate\": \"\",\n    \"rating\": 0,\n    \"author\": {\n      \"name\": \"\",\n      \"job\": \"\"\n    }\n  },\n  \"metadata\": {\n    \"jsonLd\": {},\n    \"timeToRead\": 1,\n    \"slug\": \"\",\n    \"usedLanguages\": [\"en\"],\n    \"selectedLanguage\": \"en\",\n    \"logo\": \"<URL>\",\n    \"thumbUrl\": \"<URL>\",\n    \"avatarIndex\": 0,\n    \"options\": {\n      \"displayTweet\": true,\n      \"displayRatings\": true,\n      \"displayDate\": true\n    }\n  },\n  \"preferences\": {\n    \"autoDetectDarkMode\": true,\n    \"contactForm\": true,\n    \"contactFormEmail\": true,\n    \"defaultToDarkMode\": true,\n    \"displayDarkMode\": true,\n    \"displayLogo\": true,\n    \"displaySearchBar\": true,\n    \"displaySections\": true,\n    \"displayTitle\": true,\n    \"fontFamilyName\": \"\",\n    \"shortListAccordeon\": true,\n    \"defaultLanguage\": \"\",\n    \"displayLanguageSelector\": true\n  },\n  \"colors\": {\n    \"fontColor\": \"#ffffff\",\n    \"mainBgColor\": \"#ffffff\",\n    \"darkModeBgColor\": \"#ffffff\",\n    \"darkModeFontColor\": \"#ffffff\",\n    \"secondaryFontColor\": \"#ffffff\",\n    \"cardColor\": \"#ffffff\"\n  },\n  \"projectIds\": [\"\"],\n  \"blocks\": [\n    {\n    \t\"blocks\": [\n        {\n          \"blocks\": []\n        }\n      ]\n    }\n  ]\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string",
                      "example": ""
                    },
                    "type": {
                      "type": "string",
                      "example": ""
                    },
                    "createdAt": {
                      "type": "string",
                      "example": "2021-06-29T12:16:10.654Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "example": "2022-07-27T13:42:31.256Z"
                    },
                    "isProject": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "workspaceId": {
                      "type": "string",
                      "example": ""
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "example": ""
                        },
                        "html": {
                          "type": "string",
                          "example": ""
                        },
                        "raw": {
                          "type": "string",
                          "example": ""
                        },
                        "code": {
                          "type": "string",
                          "example": ""
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": ""
                          }
                        },
                        "style": {
                          "type": "string",
                          "example": "ordered|unordered"
                        },
                        "level": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "service": {
                          "type": "string",
                          "example": "youtube|vimeo"
                        },
                        "source": {
                          "type": "string",
                          "example": ""
                        },
                        "embed": {
                          "type": "string",
                          "example": ""
                        },
                        "width": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "height": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": ""
                            },
                            "url": {
                              "type": "string",
                              "example": ""
                            },
                            "name": {
                              "type": "string",
                              "example": ""
                            },
                            "size": {
                              "type": "integer",
                              "example": 100,
                              "default": 0
                            },
                            "title": {
                              "type": "string",
                              "example": ""
                            },
                            "fileId": {
                              "type": "string",
                              "example": ""
                            },
                            "mimetype": {
                              "type": "string",
                              "example": ""
                            },
                            "resourceId": {
                              "type": "string",
                              "example": ""
                            },
                            "originalname": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        },
                        "title": {
                          "type": "string",
                          "example": ""
                        },
                        "caption": {
                          "type": "string",
                          "example": ""
                        },
                        "stretched": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "withBackground": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "withBorder": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        },
                        "withHeadings": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "importedTweet": {
                          "type": "string",
                          "example": ""
                        },
                        "selectedDate": {
                          "type": "string",
                          "example": ""
                        },
                        "rating": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "author": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": ""
                            },
                            "job": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        }
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "jsonLd": {
                          "type": "object",
                          "properties": {}
                        },
                        "timeToRead": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "slug": {
                          "type": "string",
                          "example": ""
                        },
                        "usedLanguages": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "en"
                          }
                        },
                        "selectedLanguage": {
                          "type": "string",
                          "example": "en"
                        },
                        "logo": {
                          "type": "string",
                          "example": "<URL>"
                        },
                        "thumbUrl": {
                          "type": "string",
                          "example": "<URL>"
                        },
                        "avatarIndex": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "options": {
                          "type": "object",
                          "properties": {
                            "displayTweet": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "displayRatings": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "displayDate": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            }
                          }
                        }
                      }
                    },
                    "preferences": {
                      "type": "object",
                      "properties": {
                        "autoDetectDarkMode": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "contactForm": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "contactFormEmail": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "defaultToDarkMode": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "displayDarkMode": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "displayLogo": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "displaySearchBar": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "displaySections": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "displayTitle": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "fontFamilyName": {
                          "type": "string",
                          "example": ""
                        },
                        "shortListAccordeon": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "defaultLanguage": {
                          "type": "string",
                          "example": ""
                        },
                        "displayLanguageSelector": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        }
                      }
                    },
                    "colors": {
                      "type": "object",
                      "properties": {
                        "fontColor": {
                          "type": "string",
                          "example": "#ffffff"
                        },
                        "mainBgColor": {
                          "type": "string",
                          "example": "#ffffff"
                        },
                        "darkModeBgColor": {
                          "type": "string",
                          "example": "#ffffff"
                        },
                        "darkModeFontColor": {
                          "type": "string",
                          "example": "#ffffff"
                        },
                        "secondaryFontColor": {
                          "type": "string",
                          "example": "#ffffff"
                        },
                        "cardColor": {
                          "type": "string",
                          "example": "#ffffff"
                        }
                      }
                    },
                    "projectIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": ""
                      }
                    },
                    "blocks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "blocks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "blocks": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {}
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"valid\": false,\n  \"error\": {\n    \"type\": \"block_not_found\",\n    \"message\": \"The provided block was not found\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "block_not_found"
                        },
                        "message": {
                          "type": "string",
                          "example": "The provided block was not found"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "638099d7f216dc057342a604:6380927d2bc104064a607161"
}
```