List Forms

API endpoint to retrieve a list of your forms

List Forms

This endpoint retrieves a paginated list of all your forms.

Endpoint

GET /forms/list

Authentication

Requires an API key.

Query Parameters

ParameterTypeDescription
limitintegerMaximum number of forms to return (1-100, default: 50)
cursorstringPagination cursor for fetching the next page

Response

200: OK

Returns an object containing an array of forms and a pagination cursor.

Response Fields:

FieldTypeDescription
formsarrayList of form objects
forms[].idstringUnique identifier for the form
forms[].namestringName of the form
forms[].descriptionstringDescription of the form
forms[].submissionCountintegerNumber of submissions received
forms[].createdAtstringISO 8601 timestamp when the form was created
forms[].updatedAtstringISO 8601 timestamp when the form was last updated
nextCursorstringCursor to use for fetching the next page (null if no more forms)

Example Response:

{
  "forms": [
    {
      "id": "form_123abc",
      "name": "Customer Feedback",
      "description": "Collect feedback from customers",
      "submissionCount": 42,
      "createdAt": "2023-01-15T12:00:00Z",
      "updatedAt": "2023-01-16T09:30:00Z"
    },
    {
      "id": "form_456def",
      "name": "Product Waitlist",
      "description": "Join our product waitlist",
      "submissionCount": 128,
      "createdAt": "2023-01-10T08:15:00Z",
      "updatedAt": "2023-01-16T10:45:00Z"
    }
  ],
  "nextCursor": "form_789ghi"
}

400: Bad Request

Returned when the request parameters are invalid.

401: Unauthorized

Returned when the API key is missing or invalid.

429: Too Many Requests

Returned when the rate limit is exceeded.

Pagination

To fetch the next page of results, include the nextCursor value from the previous response as the cursor parameter in your next request.

For example:

# Initial request
curl -X GET "https://app.mantlz.com/api/v1/forms/list?limit=10" \
  -H "X-API-Key: mk_your_api_key_here"

# Subsequent request using the nextCursor
curl -X GET "https://app.mantlz.com/api/v1/forms/list?limit=10&cursor=form_789ghi" \
  -H "X-API-Key: mk_your_api_key_here"

When there are no more results to fetch, the nextCursor field will be null.

Example Request

curl -X GET "https://app.mantlz.com/api/v1/forms/list?limit=10" \
  -H "X-API-Key: mk_your_api_key_here"

Example in JavaScript

async function listForms() {
  try {
    const response = await fetch('https://app.mantlz.com/api/v1/forms/list?limit=10', {
      method: 'GET',
      headers: {
        'X-API-Key': 'mk_your_api_key_here'
      }
    });
    
    if (!response.ok) {
      throw new Error(`API error: ${response.status}`);
    }
    
    const data = await response.json();
    return data;
  } catch (error) {
    console.error('Error listing forms:', error);
    throw error;
  }
}