Forms API
Site owners can add forms to pages that allow their visitors to leave information, like their name and address, or to create surveys or polls.
Use the Form API to retrieve all forms for a site. Use the Form Entries API to view the actual entries from a given form
Use the Form API to retrieve all forms for a site. Use the Form Entries API to view the actual entries from a given form
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 and those that are returned when you retrieve a list. All fields are returned when you retrieve a single item.
Name |
Description |
Type |
List |
site_id |
Unique ID for a user's site. |
string |
X |
form_id |
Unique ID for a form |
string |
X |
form_name |
The name given to a form when created |
string |
X |
last_submitted |
Timestamp for the date of the last form submission. |
Unix timestamp in GMT |
X |
submission_count |
The number of form submissions. |
string |
X |
page_id |
A unique ID that represents the page containing the form. |
string |
X |
site_title |
Title of the site that contains the form. |
string |
X |
deleted |
Whether or not the form has been deleted. Valid values are:
|
string |
X |
Note: Any fields returned that are not documented are currently unsupported and can be safely ignored.
Retrieve a List of Forms for a Site
Endpoint URL
Returns all forms for a given site.
Scope: read:site
Note: Forms will return an empty array if they don't have entries associated with them
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 forms that have a full-text match with the query string. |
string |
filterby |
Field name to set a filter on. |
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 forms:
Filtered example
Response
Response
Retrieve Details for a Form
Enpoint URL
Returns all fields for a given form.
Scope: read:site
Scope: read:site
Request
Example Request
Response
See Fields table. All fields for the form are returned.
Example Response