> 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

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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
