Errors and versioning
The API answers with standard HTTP status codes. An error's body is JSON with a
detail that says what went wrong in words.
{"detail": "this API key is not valid"}
| Status | Meaning | What to do |
|---|---|---|
202 | Job created; the takeoff has started. | Wait for the webhook. |
400 | The request is not right: a file that is not a PDF, or no drawings. | Fix the request. |
401 | No key, a made-up key, or a revoked one. | Check the Authorization header. |
402 | Your plan does not allow another job (for example, a finished trial). | Upgrade in the app. |
403 | The key's role may not do this (a viewer's key creating a job), or a key was sent
outside /v1. | Use a key made by an estimator or admin, on the API only. |
404 | No such job in your company. | Check the id. |
409 | Not ready yet, or a job with that name already exists. | Wait for the takeoff, or use another name. |
413 | The drawings are over 400 MB together. | Leave out sheets the bid does not need. |
422 | A field is missing or the wrong type. | detail names it. |
5xx | Something failed on our side. | Retry with the same request_id; tell us if it lasts. |
A 409 while the takeoff runs carries the job's status:
{"detail": {"reason": "no takeoff yet", "status": "analyzing"}}
Versioning
The version is in the path (/v1), and every answer carries api_version, the date of the
version it follows. Within v1, fields are only ever added, never renamed or removed, and new event types may be
added: ignore fields and events you do not know. A change that would break that comes as /v2, with
notice. What changed and when is on the changelog.
Help
Write to info@insulengine.com with the job's id and the time of the request.