# Websites

Manage TrustPager-hosted websites, pages, and page sections.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### GET /websites

List all websites.

**Scopes:** `websites:read` — [full detail](./websites/get-websites.md)

### GET /websites/:id

Retrieve a website.

**Scopes:** `websites:read` — [full detail](./websites/get-websites-id.md)

### POST /websites

Create a website. name is required.

**Scopes:** `websites:write` — [full detail](./websites/post-websites.md)

### PATCH /websites/:id

Update a website.

**Scopes:** `websites:write` — [full detail](./websites/patch-websites-id.md)

### DELETE /websites/:id

Delete a website.

**Scopes:** `websites:write` — [full detail](./websites/delete-websites-id.md)

### GET /websites/:id/pages

List pages for a website.

**Scopes:** `websites:read` — [full detail](./websites/get-websites-id-pages.md)

### POST /websites/:id/pages

Create a page for a website. title and slug are required.

**Scopes:** `websites:write` — [full detail](./websites/post-websites-id-pages.md)

### GET /websites/:id/pages/:pageId

Retrieve a page with its sections.

**Scopes:** `websites:read` — [full detail](./websites/get-websites-id-pages-pageId.md)

### PATCH /websites/:id/pages/:pageId

Update a website page.

**Scopes:** `websites:write` — [full detail](./websites/patch-websites-id-pages-pageId.md)

### DELETE /websites/:id/pages/:pageId

Delete a website page.

**Scopes:** `websites:write` — [full detail](./websites/delete-websites-id-pages-pageId.md)

### GET /websites/:id/pages/:pageId/sections

List sections for a page.

**Scopes:** `websites:read` — [full detail](./websites/get-websites-id-pages-pageId-sections.md)

### POST /websites/:id/pages/:pageId/sections

Create a section on a page. type is required.

**Scopes:** `websites:write` — [full detail](./websites/post-websites-id-pages-pageId-sections.md)

### PATCH /websites/:id/pages/:pageId/sections/:sectionId

Update a page section.

**Scopes:** `websites:write` — [full detail](./websites/patch-websites-id-pages-pageId-sections-sectionId.md)

### DELETE /websites/:id/pages/:pageId/sections/:sectionId

Delete a page section.

**Scopes:** `websites:write` — [full detail](./websites/delete-websites-id-pages-pageId-sections-sectionId.md)

### POST /websites/:id/pages/:pageId/sections/reorder

Reorder sections on a page.

**Scopes:** `websites:write` — [full detail](./websites/post-websites-id-pages-pageId-sections-reorder.md)
