> For the complete documentation index, see [llms.txt](https://dev.ubidots.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ubidots.com/apps/pages/api/page-creation.md).

# Page creation

Step-by-step guide on how to create a Page

A Page is the entity in Ubidots that holds your custom code and provides a reference that can be loaded from a [Dashboard page](https://help.ubidots.com/en/articles/9769668-dashboard-pages-create-custom-application-frontends).

All CRUD operations for Pages — create, read, update, and delete — are also available through the API, in addition to the dedicated UI. See the [API Reference](https://docs.ubidots.com/reference/pages) for more details.

## Create

Make the following HTTP request:

```bash
curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/pages' \
-H 'X-Auth-Token: <YOUR_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{"name": "My First Page"}'
```

The response will look like this:

```json
{
  "id": "66fc141609164d000e1e0fab",
  "url": "https://industrial.api.ubidots.com/api/v2.0/pages/66fc141609164d000e1e0fab",
  "label": "my-first-page",
  "name": "My First Page",
  "isActive": true,
  "createdAt": "2024-10-01T15:24:06.863703Z",
  "settings": {}
}
```

The `name` value is used to create the Page label by converting it to lowercase and replacing spaces with dashes.

## List

List all your Pages with the following HTTP request:

```bash
curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/pages' \
-H 'X-Auth-Token: <YOUR_TOKEN>'
```

The response looks like this:

```json
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "66fc141609164d000e1e0fab",
      "url": "https://industrial.api.ubidots.com/api/v2.0/pages/66fc141609164d000e1e0fab",
      "label": "my-first-page",
      "name": "My First Page",
      "isActive": true,
     "createdAt": "2024-10-01T15:24:06.863703Z",
     "settings": {}
    }
  ]
}
```

## Get

Get a specific Page with the following HTTP request:

```bash
curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/pages/<pageId>' \
-H 'X-Auth-Token: <YOUR_TOKEN>'
```

The response is:

```json
{
  "id": "66fc141609164d000e1e0fab",
  "url": "https://industrial.api.ubidots.com/api/v2.0/pages/66fc141609164d000e1e0fab",
  "label": "my-first-page",
  "name": "My First Page",
  "isActive": true,
  "createdAt": "2024-10-01T15:24:06.863703Z",
  "settings": {}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.ubidots.com/apps/pages/api/page-creation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
