Skip to main content
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

MethodEndpointDescription
POST/organizations/{orgId}/formsCreate a new form
GET/organizations/{orgId}/formsList 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}/duplicateDuplicate a form

Form Responses

MethodEndpointDescription
POST/organizations/{orgId}/forms/{formId}/responsesSubmit a response
GET/organizations/{orgId}/forms/{formId}/responsesList all responses
GET/organizations/{orgId}/forms/{formId}/responses/exportExport responses (CSV)

Form Assignments

MethodEndpointDescription
POST/organizations/{orgId}/forms/{formId}/assignmentsCreate assignments
GET/organizations/{orgId}/forms/{formId}/assignmentsList 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-linksGet shareable links

Form Analytics

MethodEndpointDescription
GET/organizations/{orgId}/forms/{formId}/analyticsGet form analytics

Attachments

MethodEndpointDescription
GET/organizations/{orgId}/forms/{formId}/responses/{responseId}/attachmentsList attachments
GET/organizations/{orgId}/forms/{formId}/attachments/{attachmentId}/downloadDownload 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

TypeDescription
InspectionRegular inspection checklists
WorkOrderSOPStandard Operating Procedures for work orders
SurveyFeedback and survey forms
ChecklistGeneral purpose checklists

Field Types

Forms support the following field types:

TypeDescription
textSingle-line text input
textareaMulti-line text input
numberNumeric input
checkboxYes/No checkbox
radioSingle selection from options
selectDropdown selection
dateDate picker
timeTime picker
datetimeDate and time picker
photoPhoto upload
signatureDigital signature
locationGPS location capture

Assignment Types

TypeDescription
locationAssign to a specific location
assetAssign to a specific asset
teamAssign 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

StatusErrorCause
401UnauthenticatedInvalid or missing API key
403ForbiddenInsufficient permissions
404ResourceNotFoundForm or assignment not found
422ValidationErrorInvalid 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?