Formester API v1 Documentation

Introduction

Formester is a powerful platform for managing and analyzing form submissions. The v1 API provides read access to your forms and submissions, allowing you to retrieve, filter, and delete submission data programmatically.

Base URL

All API requests should be made to:

https://app.formester.com/api/v1

Quick Reference

MethodEndpointDescription
GET/formsList all forms
GET/submissionsList all submissions
GET/submissions/:idGet a specific submission
DELETE/submissions/:idDelete a submission

Authentication

All API requests require authentication using the X-FORMESTER-TOKEN header.

Request Header

X-FORMESTER-TOKEN: your-access-token

Obtaining a Token

To obtain an API access token for your forms, please contact our support team at [email protected].

Token Characteristics:

  • Tokens are issued per form
  • Each token has specific scopes that determine what operations it can perform
  • Tokens can be revoked at any time

Rate Limiting

To ensure fair usage and platform stability, the API enforces rate limits:

LimitValue
Maximum requests10 per 60 seconds
PerToken

Rate Limit Response

When you exceed the rate limit, you will receive:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{
  "message": "You have exceeded api rate limit"
}

Best Practices:

  • Implement exponential backoff when receiving 429 responses
  • Cache responses when possible
  • Batch operations where applicable

Endpoints

1. List Forms

Retrieve a list of all forms accessible with your token.

Endpoint

GET /api/v1/forms

Required Scope: form.view

Query Parameters

ParameterTypeRequiredDefaultDescription
pageintegerNo1Page number for pagination

cURL Example

curl -X GET "https://app.formester.com/api/v1/forms" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
  "count": 2,
  "total_count": 2,
  "per_page": 20,
  "page": 1,
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Contact Form",
      "created_at": "2024-01-15T10:30:00.000Z",
      "updated_at": "2024-01-20T14:45:00.000Z",
      "preview_image_url": "https://cdn.formester.com/previews/form-123.png",
      "slug": "contact-form",
      "is_live": true
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "name": "Feedback Survey",
      "created_at": "2024-02-01T09:00:00.000Z",
      "updated_at": "2024-02-05T11:30:00.000Z",
      "preview_image_url": "https://cdn.formester.com/previews/form-456.png",
      "slug": "feedback-survey",
      "is_live": true
    }
  ]
}

Response Fields

FieldTypeDescription
countintegerNumber of forms in current page
total_countintegerTotal number of forms
per_pageintegerItems per page (fixed at 20)
pageintegerCurrent page number
resultsarrayArray of form objects
results[].idstringUnique form identifier (UUID)
results[].namestringForm name
results[].created_atstringISO 8601 creation timestamp
results[].updated_atstringISO 8601 last update timestamp
results[].preview_image_urlstringURL to form preview image
results[].slugstringURL-friendly form identifier
results[].is_livebooleanWhether the form is published

2. List Submissions

Retrieve a list of all submissions with optional filtering and sorting.

Endpoint

GET /api/v1/submissions

Required Scope: submission.view

Query Parameters

ParameterTypeRequiredDefaultDescription
pageintegerNo1Page number for pagination
sortstringNo-Field name to sort by
orderstringNoascSort order: asc or desc
{field}stringNo-Filter by exact match
{field}__gtestringNo-Filter: greater than or equal
{field}__gtstringNo-Filter: greater than
{field}__ltestringNo-Filter: less than or equal
{field}__ltstringNo-Filter: less than

cURL Example

# Basic request
curl -X GET "https://app.formester.com/api/v1/submissions" \
  -H "X-FORMESTER-TOKEN: your-access-token"

# With pagination
curl -X GET "https://app.formester.com/api/v1/submissions?page=2" \
  -H "X-FORMESTER-TOKEN: your-access-token"

# With filtering
curl -X GET "https://app.formester.com/api/v1/submissions?Rating__gte=3&Rating__lt=5" \
  -H "X-FORMESTER-TOKEN: your-access-token"

# With sorting
curl -X GET "https://app.formester.com/api/v1/submissions?sort=created_at&order=desc" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
  "count": 2,
  "total_count": 150,
  "per_page": 20,
  "page": 1,
  "results": [
    {
      "id": "770e8400-e29b-41d4-a716-446655440002",
      "spam": false,
      "data": {
        "email": "[email protected]",
        "name": "John Doe",
        "message": "Hello, I have a question about your product.",
        "Rating": 5
      },
      "created_at": "2024-01-20T10:00:00.000Z"
    },
    {
      "id": "880e8400-e29b-41d4-a716-446655440003",
      "spam": false,
      "data": {
        "email": "[email protected]",
        "name": "Jane Smith",
        "message": "Great service!",
        "Rating": 4
      },
      "created_at": "2024-01-19T15:30:00.000Z"
    }
  ]
}

Response Fields

FieldTypeDescription
countintegerNumber of submissions in current page
total_countintegerTotal number of submissions
per_pageintegerItems per page (fixed at 20)
pageintegerCurrent page number
resultsarrayArray of submission objects
results[].idstringUnique submission identifier (UUID)
results[].spambooleanWhether submission is marked as spam
results[].dataobjectSubmitted form data (field names as keys)
results[].created_atstringISO 8601 submission timestamp

3. Get Submission

Retrieve a specific submission by its unique identifier.

Endpoint

GET /api/v1/submissions/:id

Required Scope: submission.view

Path Parameters

ParameterTypeRequiredDescription
idstringYesSubmission UUID

cURL Example

curl -X GET "https://app.formester.com/api/v1/submissions/770e8400-e29b-41d4-a716-446655440002" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
  "id": "770e8400-e29b-41d4-a716-446655440002",
  "spam": false,
  "data": {
    "email": "[email protected]",
    "name": "John Doe",
    "message": "Hello, I have a question about your product.",
    "Rating": 5
  },
  "created_at": "2024-01-20T10:00:00.000Z"
}

Response Fields

FieldTypeDescription
idstringUnique submission identifier (UUID)
spambooleanWhether submission is marked as spam
dataobjectSubmitted form data
created_atstringISO 8601 submission timestamp

4. Delete Submission

Delete a specific submission by its unique identifier.

Endpoint

DELETE /api/v1/submissions/:id

Required Scope: submission.delete

Path Parameters

ParameterTypeRequiredDescription
idstringYesSubmission UUID

cURL Example

curl -X DELETE "https://app.formester.com/api/v1/submissions/770e8400-e29b-41d4-a716-446655440002" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
  "message": "Submission deleted"
}

Filtering Submissions

The API supports powerful filtering capabilities for submissions using field-based operators.

Filter Operators

OperatorSyntaxDescriptionExample
Equals/Like{field}=valueExact match or substring[email protected]
Greater than or equal{field}__gte=value>= comparisonRating__gte=3
Greater than{field}__gt=value> comparisonRating__gt=3
Less than or equal{field}__lte=value<= comparisonRating__lte=5
Less than{field}__lt=value< comparisonRating__lt=5

Filter Examples

Filter by rating range:

curl -X GET "https://app.formester.com/api/v1/submissions?Rating__gte=3&Rating__lte=5" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Filter by email and sort by date:

curl -X GET "https://app.formester.com/api/v1/submissions?email=example.com&sort=created_at&order=desc" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Combine multiple filters:

curl -X GET "https://app.formester.com/api/v1/submissions?Rating__gte=4&email=company.com&sort=Rating&order=desc" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Pagination

All list endpoints return paginated results.

Pagination Parameters

ParameterDefaultDescription
page1Page number (1-indexed)

Pagination Response Fields

FieldDescription
countNumber of items in the current page
total_countTotal number of items across all pages
per_pageItems per page (fixed at 20)
pageCurrent page number

Calculating Total Pages

total_pages = ceil(total_count / per_page)

Example: Paginating Through Results

# First page
curl -X GET "https://app.formester.com/api/v1/submissions?page=1" \
  -H "X-FORMESTER-TOKEN: your-access-token"

# Second page
curl -X GET "https://app.formester.com/api/v1/submissions?page=2" \
  -H "X-FORMESTER-TOKEN: your-access-token"

Error Codes

HTTP Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid token format or missing header
401Unauthorized - Invalid or inactive token
403Forbidden - Token lacks required scope
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Error Response Format

All errors return a JSON object with a message field:

{
  "message": "Error description"
}

Common Error Responses

Missing Token:

HTTP/1.1 400 Bad Request

{
  "message": "Access Token not found"
}

Invalid Token Format:

HTTP/1.1 400 Bad Request

{
  "message": "Invalid token provided"
}

Inactive or Revoked Token:

HTTP/1.1 401 Unauthorized

{
  "message": "Invalid access token"
}

Missing Required Scope:

HTTP/1.1 403 Forbidden

{
  "message": "You do not have permission to view submissions"
}

Submission Not Found:

HTTP/1.1 400 Bad Request

{
  "message": "Error while fetching the submission"
}

Rate Limit Exceeded:

HTTP/1.1 429 Too Many Requests

{
  "message": "You have exceeded api rate limit"
}

Best Practices

  1. Store tokens securely - Never expose your API token in client-side code or public repositories.

  2. Handle rate limits gracefully - Implement exponential backoff when receiving 429 responses.

  3. Use pagination - For large datasets, iterate through pages rather than attempting to fetch all data at once.

  4. Cache responses - Cache API responses where appropriate to reduce unnecessary requests.

  5. Filter server-side - Use the filtering parameters to reduce data transfer rather than filtering client-side.


Sample Postman Collection

Import our Postman collection to quickly get started:

Run in Postmanopen in new window


Support

If you encounter any issues or have questions:

  • Email: [email protected]
  • For rate limit increases or custom requirements, contact our support team.
Last Updated:
Contributors: abhay2133