Skip to main content

Get All Forms

Retrieve all forms belonging to the authenticated user, including response counts.

Endpoint

Authentication

Requires Clerk authentication. Only returns forms owned by the authenticated user.

Response

boolean
Always true for successful requests
array
Array of form objects ordered by creation date (newest first)

Example Request

Example Response

Source: app/api/getAllForms/route.ts:5

Get Form

Retrieve a specific form by its ID or slug. This endpoint is public and does not require authentication.

Endpoint

Parameters

string
required
Form identifier - can be either the form’s UUID or its URL-friendly slug

Response

boolean
Always true for successful requests
object
Complete form object including all fields

Example Request

Example Response

Source: app/api/forms/[id]/route.ts:12

Delete Form

Permanently delete a form and all its associated responses.

Endpoint

Authentication

Requires Clerk authentication. You can only delete forms you own.

Parameters

string
required
The UUID of the form to delete

Response

boolean
Always true for successful deletions
object
The deleted form object

Example Request

Example Response

Error Responses

Source: app/api/forms/[id]/route.ts:57

Toggle Publish Status

Toggle a form’s isPublished status between true and false.

Endpoint

Authentication

Requires Clerk authentication. You can only update forms you own.

Parameters

string
required
The UUID of the form to update

Response

boolean
Always true for successful updates
object
The updated form object with the new isPublished value

Example Request

Example Response

Source: app/api/forms/[id]/route.ts:109