Forms API Documentation
GET: Retrieve Forms
Description
This route is used to retrieve a list of forms for a specific project.
Method
GET
Query Parameters
sort
(string): The field by which to sort the forms.page
(number): The page number of the results.limit
(number): The number of items per page.searchTerm
(string): Optional search term to filter forms.
Response
- Returns a JSON response with the list of forms or an error message.
Status Codes
200 OK
: Forms retrieved successfully.500 Internal Server Error
: Error listing forms.
Throws
- An error if request validation or forms retrieval fails.
Example cURL
curl --location 'https://app.ai12z.net/api/projects/{projectId}/forms' \
--header 'Authorization: Bearer <YOUR_KEY>'
--data-urlencode 'sort=name' \
--data-urlencode 'page=1' \
--data-urlencode 'limit=10'
GET: Retrieve Forms by ID
Description
This route is used to retrieve details of a specific forms by its ID.
Method
GET
URL Parameters
id
(string): The ID of the forms to retrieve.
Response
- Returns a JSON response with forms details such as
id
,name
,keyName
, anddescription
.
Status Codes
200 OK
: Forms retrieved successfully.500 Internal Server Error
: Error retrieving the Forms.
Throws
- An error if the Forms is not found or any other error occurs.
Example cURL
curl --location 'https://app.ai12z.net/api/projects/{projectId}/forms' \
--header 'Authorization: Bearer <YOUR_KEY>'
POST: Create a Forms
Description
This route is used to create a new Forms for a project.
Method
POST
Request Body
Example request body:
{
"name": "Forms Name",
"description": "About Forms"
}
Response
- Returns the newly created forms.
Status Codes
200 OK
: Forms created successfully.500 Internal Server Error
: Error creating the Forms.
Throws
- An error if request validation or Forms creation fails.
Example cURL
curl --location 'https://app.ai12z.net/api/projects/{projectId}/forms' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Forms Name",
"description": "About Forms"
}'
PUT: Update a Forms
Description
This route is used to update an existing forms.
Method
PUT
Request Body
Example request body:
{
"id": "Forms ID",
"name": "Forms Name",
"description": "About Forms"
}
Response
- Returns the updated forms.
Status Codes
200 OK
: Forms updated successfully.500 Internal Server Error
: Error updating the Forms.
Throws
- An error if request validation or forms update fails.
Example cURL
curl --location --request PUT 'https://app.ai12z.net/api/projects/{projectId}/forms' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "Forms ID",
"name": "Forms Name",
"description": "About Forms"
}'
DELETE: Delete a Forms
Description
This route is used to delete an existing forms.
Method
DELETE
Request Body
Example request body:
{
"id": "Forms ID"
}
Response
- Returns a confirmation message indicating successful deletion.
Status Codes
200 OK
: Forms deleted successfully.500 Internal Server Error
: Error deleting the Forms.
Throws
- An error if request validation or Forms deletion fails.
Example cURL
curl --location --request DELETE 'https://app.ai12z.net/api/projects/{projectId}/forms' \
--header 'Authorization: Bearer <YOUR_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "Forms ID"
}'