InspectFast API Documentation

Embed the complete InspectFast recorder into your app. Voice recording, photo annotations, AI transcription, and PDF reports - all in one embeddable widget.

1

Get API Key

Sign in and create an API key from your dashboard

2

Add Widget Script

Include our JavaScript SDK in your HTML

3

Initialize & Go!

Call InspectFast.create() with your config

Embeddable Widget

Embed the InspectFast recorder directly in your application. Users can record inspections, take photos with annotations, and submit reports without leaving your app.

Features

  • Voice recording with live waveform visualization
  • Photo capture with annotation tools (draw, text, arrows)
  • AI-powered transcription and report generation
  • Professional PDF export
  • Works on mobile and desktop

Installation

Add the widget script to your HTML:

<script src="https://inspectfast.ai/widget.js"></script>

Basic Usage

<div id="inspectfast-widget"></div><script>  InspectFast.create({    apiKey: 'your_api_key',    container: '#inspectfast-widget',    projectName: 'My Project',    onComplete: function(inspection) {      console.log('Inspection completed!', inspection);      // Handle completion - show success message, redirect, etc.    },    onError: function(error) {      console.error('Widget error:', error);    }  });</script>

Configuration Options

apiKey

(Required) Your InspectFast API key

container

(Required) CSS selector or DOM element for the widget

projectId

(Optional) Existing project ID to create inspection under

projectName

(Optional) Name for new project (auto-creates if needed)

inspectionTitle

(Optional) Pre-fill inspection title

inspectionType

(Optional) Type: safety, quality, structural, etc.

onReady

(Optional) Callback when widget is ready

onComplete

(Optional) Callback when inspection is submitted

onError

(Optional) Callback for error handling

Complete Example

<!DOCTYPE html><html><head>  <title>My Inspection App</title>  <style>    #inspectfast-widget {      max-width: 500px;      margin: 0 auto;    }  </style></head><body>  <h1>Create Inspection</h1>  <div id="inspectfast-widget"></div>  <script src="https://inspectfast.ai/widget.js"></script>  <script>    const widget = InspectFast.create({      apiKey: 'sk_live_abc123xyz',      container: '#inspectfast-widget',      projectName: 'Construction Site A',      inspectionTitle: 'Daily Safety Check',      inspectionType: 'safety',      onReady: function() {        console.log('Widget ready!');      },      onComplete: function(inspection) {        alert('Inspection submitted: ' + inspection.inspection_number);        // Fetch PDF        fetch('https://inspectfast.ai/api/v1/inspections/' +              inspection.id + '/download_pdf', {          headers: { 'Authorization': 'Bearer sk_live_abc123xyz' }        }).then(response => response.blob())          .then(blob => {            // Download PDF            const url = window.URL.createObjectURL(blob);            const a = document.createElement('a');            a.href = url;            a.download = inspection.inspection_number + '.pdf';            a.click();          });      },      onError: function(error) {        alert('Error: ' + error.message);      }    });  </script></body></html>

Authentication

All API requests require authentication using an API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from your dashboard after signing in.

Base URL

https://inspectfast.ai/api/v1

REST API Endpoints

POST

/widget_sessions

Create a widget session for embedding the recorder in your app. Returns a token and embed URL.

Request

curl -X POST https://inspectfast.ai/api/v1/widget_sessions \  -H "Authorization: Bearer YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "project_name": "Construction Site A",    "inspection_title": "Daily Safety Check",    "inspection_type": "safety",    "expires_in_hours": 24  }'

Parameters

optional

project_id

Existing project ID to create inspection under

optional

project_name

Name for new project (auto-creates if needed)

optional

inspection_title

Pre-fill inspection title

optional

inspection_type

Type: safety, quality, structural, etc.

optional

expires_in_hours

Session expiration in hours (default: 24, max: 168)

optional

theme

Widget theme (default: 'default')

optional

language

Widget language (default: 'en')

Response (201 Created)

{  "token": "abc123def456",  "embed_url": "https://inspectfast.ai/embed/recorder/abc123def456",  "expires_at": "2025-10-14T10:30:00Z"}
POST

/inspections

Create a new inspection with audio recording and photos. Processing happens asynchronously.

Request

Content-Type: multipart/form-data

curl -X POST https://inspectfast.ai/api/v1/inspections \  -H "Authorization: Bearer YOUR_API_KEY" \  -F "audio_file=@recording.m4a" \  -F "photos[]=@photo1.jpg" \  -F "photos[]=@photo2.jpg" \  -F 'photo_timestamps={"0":10.5,"1":25.3}' \  -F "title=Foundation Inspection" \  -F "inspection_type=structural" \  -F "project_name=Building A" \  -F "project_external_id=ext_proj_123" \  -F "recording_started_at=2025-10-13T10:00:00Z" \  -F "user_id=ext_user_123" \  -F "user_email=john@example.com" \  -F "user_name=John Doe"

Parameters

required

audio_file

file

Audio recording file (m4a, mp3, wav, etc.)

optional

photos[]

array of files

Array of photo files (jpg, png, etc.)

optional

photo_timestamps

JSON string

JSON string mapping photo index to timestamp in seconds

Example: {"0": 10.5, "1": 25.3}

optional

project_id

string

Existing project ID (if not provided, auto-creates "API Inspections" project)

optional

project_name

string

Name for new project (auto-creates project)

optional

project_external_id

string

External project ID from your application. Finds existing project by external_id or creates new one if not found.

optional

title

string

Inspection title

optional

inspection_type

string

Type: safety, quality, progress, structural, electrical, plumbing, mechanical, general, daily_log

optional

recording_started_at

string (ISO 8601 datetime)

ISO 8601 timestamp when recording started

optional

user_id

string

External user ID from your application. When provided with user_email and user_name, creates or updates a user in InspectFast and sets them as the inspection creator.

optional

user_email

string

Email address of the external user. Required if user_id is provided.

optional

user_name

string

Full name of the external user. Required if user_id is provided.

Response (201 Created)

{  "id": "insp_abc123",  "status": "processing",  "progress": 50,  "inspection_number": "INSP-2025-0001",  "title": "Foundation Inspection",  "description": null,  "inspection_type": "structural",  "location": null,  "weather_conditions": null,  "temperature": null,  "transcription": "",  "findings": null,  "summary": null,  "passed": null,  "inspected_at": null,  "recording_started_at": "2025-10-13T10:00:00Z",  "photos": [    {      "id": 1,      "image_url": "https://example.com/rails/active_storage/blobs/.../photo1.jpg",      "gps_latitude": null,      "gps_longitude": null,      "timestamp": 10.5,      "annotations": [],      "uploaded_by": null,      "created_at": "2025-10-13T10:30:01Z"    },    {      "id": 2,      "image_url": "https://example.com/rails/active_storage/blobs/.../photo2.jpg",      "gps_latitude": null,      "gps_longitude": null,      "timestamp": 25.3,      "annotations": [],      "uploaded_by": null,      "created_at": "2025-10-13T10:30:01Z"    }  ],  "deficiencies": [],  "pdf_url": "https://inspectfast.ai/api/v1/inspections/eyJfcmFpbHMi...abc123/download_pdf",  "project_id": "proj_xyz",  "project": {    "id": "proj_xyz",    "external_id": "ext_proj_123",    "name": "Building A"  },  "created_by": {    "id": 123,    "name": "John Doe",    "email": "john@example.com"  },  "created_at": "2025-10-13T10:30:00Z",  "updated_at": "2025-10-13T10:30:01Z"}
PATCH

Update Inspection

Update an existing inspection. Useful for updating inspection details or uploading user signatures.

Request

Content-Type: multipart/form-data

curl -X PATCH https://inspectfast.ai/api/v1/inspections/insp_abc123 \  -H "Authorization: Bearer YOUR_API_KEY" \  -F "title=Updated Title" \  -F "signature=@signature.png" \  -F "user_id=ext_user_123" \  -F "user_email=john@example.com" \  -F "user_name=John Doe"

Parameters

Optional

title

string

Inspection title

Optional

description

string

Inspection description

Optional

findings

string

Inspection findings

Optional

summary

string

Inspection summary

Optional

passed

boolean

Whether the inspection passed

Optional

signature

file (image)

User signature image. When provided with user_id, user_email, and user_name, attaches the signature to the external user's profile.

Optional

user_id

string

External user ID. Required if signature is provided.

Optional

user_email

string

External user email. Required if signature is provided.

Optional

user_name

string

External user name. Required if signature is provided.

Response

{  "id": "insp_abc123",  "status": "pending_review",  "title": "Updated Title",  ...}
GET

/inspections/:id

Get inspection status and complete data including AI-generated content.

Request

curl https://inspectfast.ai/api/v1/inspections/insp_abc123 \  -H "Authorization: Bearer YOUR_API_KEY"

Response (200 OK)

{  "id": "insp_abc123",  "status": "pending_review",  "progress": 100,  "inspection_number": "INSP-2025-0001",  "title": "Foundation Inspection",  "description": "...",  "inspection_type": "structural",  "location": "123 Main St",  "weather_conditions": "Clear",  "transcription": "Full transcription...",  "findings": "Detailed findings...",  "summary": "Executive summary...",  "passed": true,  "inspected_at": "2025-10-13T10:00:00Z",  "recording_started_at": "2025-10-13T09:58:00Z",  "photos": [    {      "id": 1,      "image_url": "https://example.com/rails/active_storage/blobs/.../photo1.jpg",      "gps_latitude": 40.7128,      "gps_longitude": -74.0060,      "timestamp": 10.5,      "annotations": [],      "uploaded_by": {        "id": 123,        "name": "John Doe",        "email": "john@example.com"      },      "created_at": "2025-10-13T10:00:15Z"    }  ],  "deficiencies": [    {      "id": 1,      "title": "Crack in Foundation",      "description": "Horizontal crack found in north wall",      "severity": "high",      "category": "structural",      "status": "open",      "location": "North wall, 2m from corner",      "identified_by": {        "id": 123,        "name": "John Doe",        "email": "john@example.com"      },      "corrective_actions": [        {          "id": 1,          "action_required": "Structural engineer assessment needed",          "status": "pending",          "due_date": "2025-10-20T00:00:00Z",          "completed_at": null,          "assigned_to": {            "id": 456,            "name": "Jane Smith",            "email": "jane@example.com"          },          "completed_by": null,          "created_at": "2025-10-13T10:30:00Z",          "updated_at": "2025-10-13T10:30:00Z"        }      ],      "created_at": "2025-10-13T10:30:00Z",      "updated_at": "2025-10-13T10:30:00Z"    }  ],  "pdf_url": "https://inspectfast.ai/api/v1/inspections/eyJfcmFpbHMi...abc123/download_pdf",  "project_id": "proj_xyz",  "project": {    "id": "proj_xyz",    "external_id": "ext_proj_123",    "name": "Building A"  },  "created_by": {    "id": 123,    "name": "John Doe",    "email": "john@example.com"  },  "created_at": "2025-10-13T10:30:00Z",  "updated_at": "2025-10-13T10:35:00Z"}
GET

/inspections

List all inspections for your organization with pagination.

Request

curl "https://inspectfast.ai/api/v1/inspections?page=1&per_page=20" \  -H "Authorization: Bearer YOUR_API_KEY"

Query Parameters

page

Page number (default: 1)

per_page

Items per page (default: 20, max: 100)

Response (200 OK)

{  "inspections": [...],  "meta": {    "current_page": 1,    "per_page": 20,    "total_count": 100  }}
POST

/inspections/:id/approve

Approve an inspection and change status to submitted.

Request

curl -X POST https://inspectfast.ai/api/v1/inspections/insp_abc123/approve \  -H "Authorization: Bearer YOUR_API_KEY"

Response (200 OK)

{  "id": "insp_abc123",  "status": "submitted",  "progress": 100,  "inspection_number": "INSP-2025-0001",  "title": "Foundation Inspection",  "photos": [...],  "deficiencies": [...],  "pdf_url": "https://inspectfast.ai/api/v1/inspections/eyJfcmFpbHMi...abc123/download_pdf",  ...}
GET

/inspections/:id/download_pdf

Download inspection PDF using a signed, time-limited URL. No API key required.

Note: Thepdf_url field returned in inspection responses contains a cryptographically signed URL that expires in 24 hours. This URL can be opened directly in browsers, mobile apps, or shared via email without requiring API authentication.

Example

curl "https://inspectfast.ai/api/v1/inspections/eyJfcmFpbHMi...abc123/download_pdf" \  -o inspection.pdf

Response

Content-Type: application/pdfBinary PDF file

Status Codes

200 OK

Request successful

201 Created

Resource created successfully

400 Bad Request

Invalid request parameters

401 Unauthorized

Invalid or missing API key

404 Not Found

Resource not found

422 Unprocessable Entity

Validation errors

429 Too Many Requests

Rate limit exceeded

500 Server Error

Internal server error

Error Response Format

All errors follow a consistent JSON format:

{  "error": {    "type": "invalid_request",    "message": "Audio file is required",    "code": "missing_audio_file"  }}

Webhooks

Configure webhooks to receive notifications when inspections are processed:

POST https://your-app.com/webhooks/inspectfastContent-Type: application/jsonX-InspectFast-Signature: sha256_signature{  "event": "inspection.completed",  "inspection_id": "insp_abc123",  "status": "pending_review",  "organization_id": "org_xyz",  "timestamp": "2025-10-13T10:35:00Z"}

Manage webhook endpoints from your dashboard.