Sites API
Every web site is given a title. It normally displays at the top of pages, however the site owner can choose to not display it, or display a logo in its place.
Sites are associated with a Weebly plan that determines the level of functionality available to the site. For example, only sites on the Performance plan can use the Real Time Shipping feature.
The Sites API returns information about Weebly sites owned by the currently authenticated user. You can use the API to update a site's title.
Sites are associated with a Weebly plan that determines the level of functionality available to the site. For example, only sites on the Performance plan can use the Real Time Shipping feature.
The Sites API returns information about Weebly sites owned by the currently authenticated user. You can use the API to update a site's title.
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 |
user_id |
The unique ID of the user authenticated during the OAuth process. |
string |
X |
|
site_id |
ID of a Weebly site, unique to the currently authenticated user. (For a globally unique ID, use the {user_id, site_id} tuple.) |
string |
X |
|
site_title |
Title of the Weebly site |
string |
X |
X |
domain |
The fully qualified domain name of the site, if it is published (ex: "www.samplesite.com") |
string |
||
is_published |
Whether or not the site has been published. Valid values are:
|
boolean |
||
plan_level |
The current Weebly plan assigned to this site. Valid values are:
|
string |
||
date_format |
Format used for dates on this site. Valid values are:
|
string |
||
time_format |
Format used for time on this site. Valid values are:
|
string |
||
time_zone |
Timezone used on this site. Valid values can be found here |
string |
||
language |
Two letter language code representing the default language of this site. Valid values are:
|
string |
Note: Any fields returned that are not documented are currently unsupported and can be safely ignored.
Retrieve a List of Sites Owned by This User
Endpoint URL
Returns all sites currently owned by the user currently authenticated by OAuth.
Scope: read:site
Query Parameters
Returned values are paginated. You can further filter results using these 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 |
sortby |
Field name to sort by. Valid value for this API: site_id. |
string |
sortdir |
Sort direction. Valid values are:
|
string |
Request
Example returning all sites:
Example of sorted request
Response
A list of sites owned by the authenticated user.
Response
Retrieve Details for a Site
Enpoint URL
Returns all fields for the given site.
Scope: read:site
Scope: read:site
Request
Example Request
Response
See Fields table. All fields for the site are returned.
Example Response
Update a Site
Endpoint URL
Updates the given site with the values provided in the request body.
Scope: write:site
Scope: write:site
Updateable Fields
These fields can be updated:
Name |
Description |
Type |
site_title |
The title of the given site. |
String |
Request
Example request
Response
Example response