API Reference
The Formstamper API provides programmatic access to all platform features. Use it to manage templates, trigger workflows, handle organizations, and generate documents — all from your own applications.
Base URL
https://api.formstamper.com
All API endpoints are relative to this base URL.
API Architecture
The API follows REST conventions:
- JSON request and response bodies.
- Standard HTTP methods —
GET,POST,PUT,PATCH,DELETE. - Standard HTTP status codes —
200,201,400,401,403,404,500. - Bearer token authentication via JWT.
Quick Start
1. Authenticate
curl -X POST https://api.formstamper.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com", "password": "your-password"}'
Response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"publicId": "usr_01j5abc123",
"email": "your@email.com",
"applicationRole": "MEMBER"
}
2. Use the Token
Include the access token in subsequent requests:
curl https://api.formstamper.com/api/templates \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
3. Refresh When Expired
Access tokens expire after 15 minutes. Use the refresh token (stored as an HTTP-only cookie) to get a new one:
curl -X POST https://api.formstamper.com/api/auth/refresh-token \
--cookie "refreshToken=..."
Rate Limiting
API requests are rate-limited per account:
- Standard plans: 100 requests/minute
- Enterprise plans: Custom limits
Exceeding the limit returns 429 Too Many Requests.
Content Types
| Content Type | Used For |
|---|---|
application/json | Most requests and responses |
multipart/form-data | File uploads (PDFs, spreadsheets) |
application/pdf | Generated document downloads |
Pagination
Endpoints that return lists support pagination:
GET /api/admin/users?page=0&size=20&search=john
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 0 | Zero-based page index |
size | integer | 20 | Items per page |
search | string | — | Full-text search query |
Paginated Response:
{
"content": [...],
"totalPages": 5,
"totalElements": 98,
"size": 20,
"number": 0
}