Damage API
The Damage API processes vehicle inspection media captured by customers using their own applications. Customers upload photos or videos to the API, which then analyzes the media and generates a structured JSON response. This response is automatically delivered to the customer through their configured webhook.
It supports two input methods:
- Direct file uploads via multipart/form-data.
- Remote media links via JSON URLs.
Once the media is uploaded, the system validates, stores, and queues it for processing. Clients may optionally provide a callback URL to receive the results asynchronously.
Method | Base URL | Endpoint |
POST | https://reports.inspektlabs.com | /api/upload |
Authentication
- Requires JWT token in
Authorization: Bearer <token>header. - The Bearer token and session ID are both generated via the Damage Authentication API.
Click the buttons below to download the Postman collections for the API one for file upload and another for URL upload.
Request Types
1. Form-data (File Upload)
Headers
Authorization: Bearer <jwt_token>
Content-Type: multipart/form-dataParameters
Field | Type | Required | Description |
type | string | Yes | Must be "file" |
session | string | Yes | Unique session/inspection ID |
case_id | string | Yes | Client inspection ID |
files | file[] | Yes | One or more image/video files |
email_id | string | Optional | Email to send report to |
callback_url | string | Optional | Dynamic URL to receive async results |
agent_id | string | Optional | Agent ID for tracking |
agent_name | string | Optional | Agent name |
Rules
- Max 99 images per request.
- Files must be
.jpg,.jpeg,.png,.jfif,.heic,.mp4,.webm,.mov,.mkv,.avi. - Videos must be larger than 1 MB and less than 100 MB.
- Cannot mix images and videos in one request.
2. JSON (URL Upload)
Headers
Authorization: Bearer <jwt_token>
Content-Type: application/jsonParameters
Field | Type | Required | Description |
session | string | Yes | Unique session/inspection ID |
case_id | string | Yes | Client inspection ID |
urls | string[] | Yes | List of image/video URLs |
type | string | Yes | Must be "urls" |
url_pairs | list[] | Optional | List of image URL pairs ( [url1, url2]) |
original_Id | string[] | Optional | Filenames for urls |
original_pair_Id | string[] | Optional | Combined Filenames for url_pairs |
auth | string | Optional | Authorization token for fetching URLs |
callback_url | string | Optional | Dynamic URL to receive async results |
inputMetaData | object | Optional | Custom metadata (phone, customerName, model, etc.) |
agent_id | string | Optional | Agent ID |
agent_name | string | Optional | Agent name |
email_id | string | Optional | Email to send report |
Rules
- Same limits as file upload.
- Videos must be > 1 MB.
- Cannot mix images and videos in the same batch.
- For
url_pairs, each pair must have exactly 2 images. - Payload may include
urls,url_pairs, or both.
Error message and status code
Status Code | Message | Description |
400 | Maximum 99 images upload possible | Too many images |
400 | Invalid file type, only image or video allowed | Wrong file type |
400 | Please upload video greater than 1 MB. | Video too small |
400 | please provide callback_url | Missing callback |
400 | please generate new token and session | Duplicate session |
415 | unsupported file type only images or videos | Wrong MIME type |
429 | API call limit exceeded | Client exceeded quota |
503 | ML servers are not available currently. | Service window restriction |
404 | Something Went Worng | Unexpected error |
File Upload
curl -X POST https://reports.inspektlabs.com/api/upload \
-H "Authorization: Bearer <token>" \
-F "type=file" \
-F "session=ins123" \
-F "case_id=case_001" \
-F "files=@image1.jpg" \
-F "files=@image2.png" \
-F "email_id=test@example.com"
URL Upload
curl -X POST https://reports.inspektlabs.com/api/upload \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"session": "ins123",
"case_id": "case_001",
"urls": [
"https://example.com/img1.jpg",
"https://example.com/img2.jpg"
],
"type":"urls",
"url_pairs": [
["https://example.com/img.jpg", "https://example.com/img2.jpg"],
["https://example.com/img1.jpg", "https://example.com/img2.jpg"]
],
"original_pair_Id": ["back","front"],
"original_Id": ["side","front_back"],
"callback_url": "https://client.com/callback",
"inputMetaData": {
"customerPhoneNumber": "9999999999",
"customerName": "John Doe",
"model": "Toyota Corolla"
}
}'
Replace the Fields with your actual values. Use only the appropriate keys and mandatory fields as per your use case.
Responses
{
"status": "success",
"id": "ins123",
"message": "",
"case_id": "case_001"
}←Web App Generator
Feedback API→
On this page
- Damage API
- Authentication
- Request Types
- 1. Form-data (File Upload)
- Parameters
- Rules
- 2. JSON (URL Upload)
- Parameters
- Rules
- Error message and status code
- File Upload
- URL Upload
- Responses