# Page creation

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

All the CRUD processes (Create, Read, Update and Delete) for pages can also be done through the API, parallel to the dedicated UI. You can check our [API Reference](https://docs.ubidots.com/reference/pages) for additional information.&#x20;

## Create

Make the below 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 be as follows:

```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": {}
}
```

Note that the name was used to create the Page label by lowercasing and replacing spaces with dashes.&#x20;

## List

List all your pages with the below HTTP request:

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

The response is:

```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 below 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": {}
}
```
