Pages API
Sites are made up of pages that can be rearranged as needed. Each page has a title and a layout. Site owners can hide pages and can also make pages restricted to members of the site.
The Pages API provides methods for reading and updating information about the pages for a site.
The Pages API provides methods for reading and updating information about the pages for a site.
Note: To authenticate with the Weebly API, you need to use OAuth. This will allow you to access resources based on a particular user and site.
In this topic:
Fields
The following table shows all fields that exist for this API, those that are returned when you retrieve a list, and those that are changeable using PATCH. All fields are returned when you retrieve a single item.
Name |
Description |
Type |
List |
Change-able |
page_id |
The unique ID of a page |
string |
X |
|
title |
The title of a given page |
string |
X |
X |
page_order |
Where this page appears in its of pages, as configured on the Pages tab of the editor. For example: Home - page_order 1 HomeSubPage - page_order 1 HomeSubPage - page_order 2 About - page_order 2 AboutSubPage - page_order 1 Contact - page_order 3 ContactSubPage - page_order 1 You can determine the hierarchy using the parent_id for the page. |
integer |
X |
|
page_url |
Relative URL for the page. You can get the domain from GET /user/sites/SITEID |
string |
X |
|
parent_id |
The page_id of the page one level up in the navigation hierarchy. If there is no parent, nothing is returned. |
string |
X |
|
layout |
The layout header used for the page. Valid values are:
|
string |
X |
|
hidden |
Whether or not the page is hidden from the site's navigation. Valid values are:
|
boolean |
||
membership_ required |
boolean |
|||
updated_date |
When the page was last updated. |
Unix timestamp in GMT |
Note: Any fields returned that are not documented are currently unsupported and can be safely ignored.
Retrieve a List of Pages for a Given Site
Endpoint URL
Returns all pages for the given site. Only list fields are returned.
Scope: read:site
Query Parameters
Parameter |
Description |
Type |
page |
Which page of results to return. Start is 1. Note: Only the first 25 results are returned by default. If the result set is expected to be over 25, you must implement pagination. |
integer |
limit |
Number of results per page to return. Default is 25. Max is 200. |
integer |
query |
Use to retrieve only pages that have a full-text match with the query string. |
string |
filterby |
Field name to set a filter on. Valid values are:
|
string |
filterfor |
Value to search the filterby field for. |
string |
sortby |
Field name to sort by |
string |
sortdir |
Sort direction. Valid values are:
|
string |
Request
Example returning all pages:
Example of filtered request for pages
Response
Response
Retrieve Details for a Page
Enpoint URL
Returns all fields for a given page.
Scope: read:site
Scope: read:site
Request
Example Request
Response
See Fields table. All fields for the page are returned.
Example Response
Update a Page
Endpoint URL
Updates the given page.
Scope: write:site
Scope: write:site
Updateable Fields
These fields can be updated.
Name |
Description |
Type |
title |
The page's title |
string |
Request
Example request
Response
Example response