REST API
Forms API
Create digital forms, assign them to locations or assets, and collect responses programmatically.
Overview
The Forms API allows you to:
- Create and manage digital inspection forms
- Assign forms to locations, assets, or teams
- Collect and export form responses
- Track form analytics and completion rates
Endpoints
Forms Management
| Method | Endpoint | Description |
|---|---|---|
POST | /organizations/{orgId}/forms | Create a new form |
GET | /organizations/{orgId}/forms | List all forms |
GET | /organizations/{orgId}/forms/{formId} | Get form details |
PUT | /organizations/{orgId}/forms/{formId} | Update a form |
DELETE | /organizations/{orgId}/forms/{formId} | Delete a form |
POST | /organizations/{orgId}/forms/{formId}/duplicate | Duplicate a form |
Form Responses
| Method | Endpoint | Description |
|---|---|---|
POST | /organizations/{orgId}/forms/{formId}/responses | Submit a response |
GET | /organizations/{orgId}/forms/{formId}/responses | List all responses |
GET | /organizations/{orgId}/forms/{formId}/responses/export | Export responses (CSV) |
Form Assignments
| Method | Endpoint | Description |
|---|---|---|
POST | /organizations/{orgId}/forms/{formId}/assignments | Create assignments |
GET | /organizations/{orgId}/forms/{formId}/assignments | List assignments |
PATCH | /organizations/{orgId}/forms/{formId}/assignments/{assignmentId} | Update assignment status |
DELETE | /organizations/{orgId}/forms/{formId}/assignments/{assignmentId} | Delete assignment |
GET | /organizations/{orgId}/forms/{formId}/shareable-links | Get shareable links |
Form Analytics
| Method | Endpoint | Description |
|---|---|---|
GET | /organizations/{orgId}/forms/{formId}/analytics | Get form analytics |
Attachments
| Method | Endpoint | Description |
|---|---|---|
GET | /organizations/{orgId}/forms/{formId}/responses/{responseId}/attachments | List attachments |
GET | /organizations/{orgId}/forms/{formId}/attachments/{attachmentId}/download | Download attachment |
DELETE | /organizations/{orgId}/forms/{formId}/attachments/{attachmentId} | Delete attachment |
Examples
List Forms
curl https://app.infodeck.io/api/organizations/{orgId}/forms \
-H "X-API-Key: idt_live_your_api_key_here"
const API_KEY = 'idt_live_your_api_key_here';
const ORG_ID = 'your-organization-id';
const response = await fetch(
`https://app.infodeck.io/api/organizations/${ORG_ID}/forms`,
{
headers: { 'X-API-Key': API_KEY }
}
);
const { data } = await response.json();
import requests
API_KEY = 'idt_live_your_api_key_here'
ORG_ID = 'your-organization-id'
response = requests.get(
f'https://app.infodeck.io/api/organizations/{ORG_ID}/forms',
headers={'X-API-Key': API_KEY}
)
forms = response.json()['data']
Create a Form
curl -X POST https://app.infodeck.io/api/organizations/{orgId}/forms \
-H "X-API-Key: idt_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily Safety Inspection",
"description": "Daily checklist for facility safety",
"type": "Inspection",
"fields": [
{
"type": "checkbox",
"label": "Fire extinguisher checked",
"required": true
},
{
"type": "checkbox",
"label": "Emergency exits clear",
"required": true
},
{
"type": "text",
"label": "Notes",
"required": false
}
]
}'
const response = await fetch(
`https://app.infodeck.io/api/organizations/${ORG_ID}/forms`,
{
method: 'POST',
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Daily Safety Inspection',
description: 'Daily checklist for facility safety',
type: 'Inspection',
fields: [
{ type: 'checkbox', label: 'Fire extinguisher checked', required: true },
{ type: 'checkbox', label: 'Emergency exits clear', required: true },
{ type: 'text', label: 'Notes', required: false }
]
})
}
);
response = requests.post(
f'https://app.infodeck.io/api/organizations/{ORG_ID}/forms',
headers={
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
},
json={
'name': 'Daily Safety Inspection',
'description': 'Daily checklist for facility safety',
'type': 'Inspection',
'fields': [
{'type': 'checkbox', 'label': 'Fire extinguisher checked', 'required': True},
{'type': 'checkbox', 'label': 'Emergency exits clear', 'required': True},
{'type': 'text', 'label': 'Notes', 'required': False}
]
}
)
Assign Form to Location
curl -X POST https://app.infodeck.io/api/organizations/{orgId}/forms/{formId}/assignments \
-H "X-API-Key: idt_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"type": "location",
"targetId": "l-location-id",
"schedule": {
"frequency": "daily",
"time": "09:00"
}
}'
Export Form Responses
curl "https://app.infodeck.io/api/organizations/{orgId}/forms/{formId}/responses/export?format=csv" \
-H "X-API-Key: idt_live_your_api_key_here" \
-o responses.csv
Form Types
| Type | Description |
|---|---|
Inspection | Regular inspection checklists |
WorkOrderSOP | Standard Operating Procedures for work orders |
Survey | Feedback and survey forms |
Checklist | General purpose checklists |
Field Types
Forms support the following field types:
| Type | Description |
|---|---|
text | Single-line text input |
textarea | Multi-line text input |
number | Numeric input |
checkbox | Yes/No checkbox |
radio | Single selection from options |
select | Dropdown selection |
date | Date picker |
time | Time picker |
datetime | Date and time picker |
photo | Photo upload |
signature | Digital signature |
location | GPS location capture |
Assignment Types
| Type | Description |
|---|---|
location | Assign to a specific location |
asset | Assign to a specific asset |
team | Assign to a team for completion |
Response Object
{
"data": {
"id": "f-form-id",
"organizationId": "o-org-id",
"name": "Daily Safety Inspection",
"description": "Daily checklist for facility safety",
"type": "Inspection",
"fields": [...],
"status": "active",
"responseCount": 45,
"createdAt": 1704067200000,
"updatedAt": 1704153600000
}
}
Error Responses
| Status | Error | Cause |
|---|---|---|
401 | Unauthenticated | Invalid or missing API key |
403 | Forbidden | Insufficient permissions |
404 | ResourceNotFound | Form or assignment not found |
422 | ValidationError | Invalid form data |
Related
Forms can be attached to Work Orders. See the Create Work Order endpoint for the formId parameter.
Need help? Contact Support
Was this page helpful?