API Documentation
Integrate WorkForm with your applications using our RESTful API. Perfect for automation tools like Zapier, Make, and custom integrations.
Base URL
https://app.getworkform.com/api/v1Authentication
All API requests must include your API key in the request headers:
X-API-Key: workform_your_api_key_hereGetting Your API Key
- Navigate to Workspace Settings
- Go to API Keys section
- Click "Create New API Key"
- Select required permissions
- Copy and securely store the key
/api/v1/formsList all forms in your workspace
Query Parameters
pagePage number (default: 1)limitResults per page (default: 20, max: 100)statusFilter by status (draft, published, archived)Required Permission
Example Response
{
"success": true,
"data": [
{
"id": "507f1f77bcf86cd799439011",
"publicId": "abc123",
"title": "Contact Form",
"description": "Main contact form",
"type": "standard-form",
"formStatus": {
"status": "published",
"isPublic": true
},
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-02T00:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
}
}/api/v1/responsesSubmit a new form response programmatically
Required Permission
Request Body
{
"formId": "abc123",
"responses": {
"email": "user@example.com",
"name": "John Doe",
"message": "Hello from API!"
}
}Example Response
{
"success": true,
"message": "Response created successfully.",
"data": {
"id": "507f1f77bcf86cd799439011",
"responseId": "resp_abc123",
"formId": "abc123",
"status": "completed",
"createdAt": "2024-01-01T00:00:00.000Z"
}
}/api/v1/forms/{formId}Get details of a specific form
Path Parameters
formIdThe form's public ID or MongoDB _idRequired Permission
Example Response
{
"success": true,
"data": {
"_id": "507f1f77bcf86cd799439011",
"publicId": "abc123",
"title": "Contact Form",
"description": "Main contact form",
"formType": "standard",
"formStatus": { "status": "published" },
"design": { ... },
"settings": { ... },
"createdAt": "2024-01-01T00:00:00.000Z"
}
}/api/v1/formsCreate a new form
Required Permission
Request Body
{
"title": "Contact Form",
"description": "Main contact form",
"formType": "standard"
}Example Response
{
"success": true,
"data": {
"_id": "507f1f77bcf86cd799439011",
"publicId": "abc123",
"title": "Contact Form",
"formType": "standard",
"createdAt": "2024-01-01T00:00:00.000Z"
}
}/api/v1/forms/{formId}Update an existing form
Required Permission
Allowed Update Fields
titleForm titledescriptionForm descriptionformStatusForm status objectsettingsForm settingsRequest Body
{
"title": "Updated Contact Form",
"description": "Updated description",
"formStatus": {
"status": "published",
"isPublic": true
}
}Example Response
{
"success": true,
"message": "Form updated successfully.",
"data": {
"publicId": "abc123",
"title": "Updated Contact Form",
"description": "Updated description",
"formStatus": {
"status": "published",
"isPublic": true
},
"updatedAt": "2024-01-02T00:00:00.000Z"
}
}/api/v1/forms/{formId}Delete a form
Required Permission
Example Response
{
"success": true,
"message": "Form deleted successfully"
}Historical Accuracy with Question Metadata
All response endpoints return question details (title, description, type) as they were at the time of submission. This is stored in the questionMetadata field and ensures data accuracy even if you later modify or delete questions from your form.
/api/v1/responsesList all form responses
Query Parameters
formIdFilter by form ID or public IDpagePage number (default: 1)limitResults per page (default: 50, max: 100)statusFilter by status (completed, partial)startDateFilter by start date (ISO 8601)endDateFilter by end date (ISO 8601)Required Permission
Example Response
{
"success": true,
"data": [
{
"id": "507f1f77bcf86cd799439011",
"responseId": "resp_abc123",
"form": {
"id": "abc123",
"title": "Contact Form"
},
"responses": [
{
"questionId": "q1_email",
"question": {
"id": "q1_email",
"title": "Email Address",
"description": "Please provide your email",
"type": "email"
},
"answer": "user@example.com"
},
{
"questionId": "q2_name",
"question": {
"id": "q2_name",
"title": "Full Name",
"description": "",
"type": "short-text"
},
"answer": "John Doe"
}
],
"status": "completed",
"submittedAt": "2024-01-01T00:00:00.000Z",
"ipAddress": "192.168.1.1",
"deviceType": "Desktop",
"completionTime": 120,
"createdAt": "2024-01-01T00:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 156,
"totalPages": 4
}
}/api/v1/forms/{ formId}/responsesGet all responses for a specific form with enriched question details
Question Metadata
Responses include question metadata as it was at submission time. This ensures you see the correct question titles and descriptions even if the form was later modified or questions were deleted.
Path Parameters
formIdThe form's MongoDB _id or publicIdQuery Parameters
pagePage number (default: 1)limitResults per page (default: 50, max: 100)statusFilter by status (completed, incomplete)startDateFilter by start date (ISO 8601)endDateFilter by end date (ISO 8601)Required Permission
Example Response
{
"success": true,
"data": {
"form": {
"id": "abc123",
"title": "Contact Form",
"description": "Get in touch with us",
"type": "standard-form"
},
"responses": [
{
"id": "507f1f77bcf86cd799439011",
"responseId": "resp_abc123",
"formId": "abc123",
"formTitle": "Contact Form",
"responses": [
{
"questionId": "q1_email",
"question": {
"id": "q1_email",
"title": "Email Address",
"description": "Please provide your email",
"type": "email"
},
"answer": "user@example.com"
},
{
"questionId": "q2_name",
"question": {
"id": "q2_name",
"title": "Full Name",
"description": "",
"type": "short-text"
},
"answer": "John Doe"
},
{
"questionId": "q3_message",
"question": {
"id": "q3_message",
"title": "Your Message",
"description": "Tell us how we can help",
"type": "long-text"
},
"answer": "I'd like to discuss a project"
}
],
"status": "completed",
"submittedAt": "2024-01-01T00:00:00.000Z",
"ipAddress": "192.168.1.1",
"deviceType": "Desktop",
"completionTime": 120,
"createdAt": "2024-01-01T00:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 42,
"totalPages": 1
}
}
}Path Parameters
responseIdThe response's MongoDB _id or responseIdRequired Permission
Example Response
{
"success": true,
"data": {
"id": "507f1f77bcf86cd799439011",
"responseId": "resp_abc123",
"form": {
"id": "507f1f77bcf86cd799439012",
"publicId": "abc123",
"title": "Contact Form"
},
"responses": [
{
"questionId": "q1_email",
"question": {
"id": "q1_email",
"title": "Email Address",
"description": "Please provide your email",
"type": "email"
},
"answer": "user@example.com"
},
{
"questionId": "q2_name",
"question": {
"id": "q2_name",
"title": "Full Name",
"description": "",
"type": "short-text"
},
"answer": "John Doe"
},
{
"questionId": "q3_message",
"question": {
"id": "q3_message",
"title": "Your Message",
"description": "Tell us how we can help",
"type": "long-text"
},
"answer": "Hello!"
}
],
"status": "completed",
"startedAt": "2023-12-31T23:55:00.000Z",
"submittedAt": "2024-01-01T00:00:00.000Z",
"ipAddress": "192.168.1.1",
"userAgent": "Mozilla/5.0...",
"browser": { "name": "Chrome", "version": "120.0", "os": "macOS" },
"deviceType": "Desktop",
"language": "en-US",
"completionTime": 120,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}
}/api/v1/responses/{responseId}Delete a response
Required Permission
Complete Webhooks Guide
For detailed webhook documentation including payload structure, security, retry logic, and troubleshooting, see the Webhooks Documentation.
/api/v1/webhooksList all webhooks
Query Parameters
formIdFilter by form IDRequired Permission
/api/v1/webhooksCreate a new webhook
Required Permission
Request Body
{
"formId": "abc123",
"url": "https://your-app.com/webhook",
"events": ["form.submitted"],
"active": true
}/api/v1/webhooks/{webhookId}Update a webhook
Required Permission
/api/v1/webhooks/{webhookId}Delete a webhook
Required Permission
The API uses standard HTTP status codes and returns errors in a consistent format:
Error Response Format
{
"success": false,
"error": "Error message here",
"code": "ERROR_CODE"
}Common Status Codes
API requests are rate-limited to ensure fair usage:
- 100 requests per minute per API key
- 1000 requests per hour per API key
Rate limit headers are included in all responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200When creating an API key, you can grant specific permissions:
Forms Permissions
forms:readforms:writeforms:deleteResponses Permissions
responses:readresponses:deleteWebhooks Permissions
webhooks:readwebhooks:writewebhooks:deleteAnalytics Permissions
analytics:read// Fetch all forms
const response = await fetch('https://app.getworkform.com/api/v1/forms', {
headers: {
'X-API-Key': 'workform_your_api_key_here',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);