Developers · Test free on every plan

RoofStruct API

Order roof reports from your own system (Enterprise), read your measurements and report orders, and get a signed webhook when a report is delivered, can't be completed, or someone sends a measurement.

The RoofStruct API is a REST API at https://roofstruct.com/api (every path starts with /v1). Authenticate with a Bearer API key (rs_live_…); each key can make 120 requests per minute.

Not a developer? Our Zapier app is coming soon and needs no code.

Base URL
roofstruct.com/api
Auth
Bearer rs_live_…
Rate limit
120 / min per key
Format
JSON over HTTPS

Step 1

Getting started

1. In RoofStruct, open Settings › Integrations and create an API key. Only account owners and admins see this tab. Copy the key right away: it is shown only once.

2. Call GET /v1/me to check the key. You get back the account it belongs to.

3. Every request is scoped to that account. A key never sees another company’s data.

Request
curl https://roofstruct.com/api/v1/me \
  -H "Authorization: Bearer rs_live_YOUR_KEY"
Response · 200
{
  "data": {
    "account": { "id": "8f0c…", "reference": "a7k2pz", "name": "Summit Roofing" },
    "key": { "name": "Office server", "prefix": "rs_live_a1b2" }
  }
}

Keys

Authentication

Create a key in Settings › Integrations › API & Webhooks. On the Free plan, keys and webhooks work with test orders only; Pro and Enterprise unlock the full API. Send the key in the Authorization header as a Bearer token, or in X-API-Key. Keys start with rs_live_.

On Free, a key can call GET /v1/me, place test orders (POST /v1/reports with "test": true) and read them back; anything else answers 403 plan_required. Its webhooks receive test events and the measurements you send to your apps.

Treat a key like a password. Keep it on your server, never in a web page or an app people download. Revoke a key in Settings › Integrations and it stops working at once.

If the person who made a key leaves your account, creating projects and ordering reports (test orders too) with that key stops working (key_owner_missing). Make a new key.

Headers
Authorization: Bearer rs_live_YOUR_KEY

# or
X-API-Key: rs_live_YOUR_KEY

Limits

Rate limit

Each key can make 120 requests per minute. Past that, you get 429 rate_limited with a Retry-After header saying how many seconds to wait.

Lists return at most 100 items per call, so a nightly sync of a few thousand items fits well inside the limit.

Response · 429
HTTP/1.1 429 Too Many Requests
Retry-After: 23

{ "error": { "code": "rate_limited",
  "message": "Limit is 120 requests per minute per key." } }

Errors

Errors

Errors use normal HTTP status codes and always have the same JSON shape. Branch on code; the message is for people and may change.

StatusCodeMeaning
400invalid_parameter · invalid_jsonA parameter or the body is wrong. The message says which.
400cc_not_supportedCC recipients were sent. Deliver the report from your own system.
400address_not_foundThe address couldn’t be found precisely enough to measure. Check it, or send latitude and longitude. Nothing is charged.
401unauthorizedThe key is missing, malformed or revoked.
402project_limit_reachedYour plan’s project limit is reached.
402insufficient_balanceYour prepaid balance doesn’t cover this report. The error carries balance_cents and price_cents.
403account_unavailableThe RoofStruct account is not active.
403plan_required · ordering_not_enabled · report_type_not_enabledYour plan doesn’t include this (on Free, keys work with test orders only), or ordering isn’t enabled for this account or report type.
404not_foundNo such item in your account, or an unknown route.
409not_deliveredThe request can’t be done in the current state.
409duplicate_addressThis address was ordered in the last 30 days. Send allow_duplicate to order it again.
409key_owner_missingThe person who made this API key has left the account. Make a new key.
429rate_limitedToo many requests. Wait for Retry-After.
429order_limit_reachedYour daily or monthly API order limit is reached, or the 25 test orders a day.
500server_errorSomething went wrong on our side. Try again.
503ordering_disabledOrdering through the API is paused. Try again later.
503geocoding_unavailableAddress lookup is down. Try again, or send latitude and longitude. Nothing is charged.
Error shape
{
  "error": {
    "code": "not_found",
    "message": "No report with this id in your account."
  }
}

Lists

Pagination

List calls take limit (1 to 100, default 25) and return next_cursor. Pass it back as cursor to get the next page. When next_cursor is null, you have everything.

Next page
curl "https://roofstruct.com/api/v1/reports?limit=100&cursor=eyJj…" \
  -H "Authorization: Bearer rs_live_YOUR_KEY"

{ "data": [ … ], "next_cursor": "eyJj…" }

Endpoints

Projects

A project is a property you measure yourself in the RoofStruct builder.

GET /v1/projects

List your projects.

Query: address (part of the address) · limit · cursor

POST /v1/projects

Create a project from an address, ready to measure in the builder. Counts toward your plan’s project limit.

Body: address (required) · name · latitude and longitude (together)

GET /v1/projects/{id}

One project.

GET /v1/projects/{id}/measurements

The project and its measurements, as they are in the builder right now. See Measurements.

Project
{
  "data": {
    "id": "3b7e…",
    "reference": "MSR-4K8P2C",
    "name": "Palmetto Bend",
    "address": "4820 Palmetto Bend Dr, Tampa, FL",
    "latitude": 27.9506,
    "longitude": -82.4572,
    "created_at": "2026-11-02T14:05:11Z",
    "updated_at": "2026-11-02T16:12:40Z",
    "app_url": "https://roofstruct.com/a7k2pz/projects/3b7e…",
    "editor_url": "https://roofstruct.com/a7k2pz/projects/3b7e…/editor"
  }
}

Endpoints

Reports

A report is a measurement report you ordered. Only paid orders are listed: orders placed in the app and orders placed through the API from your prepaid balance.

GET /v1/reports

List your report orders.

Query: status · address · updated_since (ISO 8601) · limit · cursor

GET /v1/reports/{id}

One report. pdf_url is set once it is delivered. On request, reports you order through the API also carry pdf_url_roofstruct (the same report with RoofStruct's branding) and background_image_url (the property's aerial image, when our team cleared its quality); otherwise both are null.

GET /v1/reports/{id}/measurements

The report and its measurements, once it is delivered. Before that you get 409 not_delivered.

Statuses: new · in_progress · needs_info · delivered · closed · cancelled · rejected · refunded

rejected means we could not complete the report, for example when no usable aerial imagery exists for the address. reject_reason gives the code (no_imagery, poor_imagery, roof_obscured, address_issue, outside_coverage, other) and reject_message a sentence you can show your users. Reports ordered through the API are credited back to your balance.

pdf_url, pdf_url_roofstruct and background_image_url are private links that work for 1 hour. Fetch the report again for fresh ones.

Report
{
  "data": {
    "id": "c41d…",
    "reference": "ORD-04217",
    "status": "delivered",
    "delivered": true,
    "report_type": "roof_residential",
    "address": "Austin Way, Cedar Falls, IA 50613",
    "latitude": 42.4894,
    "longitude": -92.4593,
    "project_name": "Austin Way re-roof",
    "your_reference": "JOB-2231",
    "created_at": "2026-11-01T09:30:00Z",
    "updated_at": "2026-11-01T13:02:18Z",
    "delivered_at": "2026-11-01T13:02:18Z",
    "app_url": "https://roofstruct.com/a7k2pz/orders/c41d…",
    "pdf_url": "https://…/report.pdf?token=…",
    "pdf_url_roofstruct": null,
    "background_image_url": null,
    "reject_reason": null,
    "reject_message": null,
    "test": false
  }
}

Endpoints

Order a report

Place a roof measurement report order from your own system. It is measured and delivered like an order placed in the app, and the report.status_changed and report.delivered webhooks fire as it moves.

Ordering through the API is part of the Enterprise plan. Each report is paid from your prepaid balance at the price agreed with you: an order is placed only when the balance covers it. Top up by card in Settings › Integrations › Report Ordering, and see your balance, prices and recent activity there.

Each account has a daily and a monthly limit on API orders, shown on the same page. Past it, orders are refused with 429 order_limit_reached until the next day or month (UTC). Contact us to raise your limits.

Send an Idempotency-Key header (any unique string up to 128 characters, no spaces, e.g. your job id). Retrying with the same key returns the first order instead of placing a second one, so a timeout never charges you twice.

Send "test": true to build and test your integration for free. A test order is checked like a real one but never measured or charged, sends no email, and reads as delivered 4 seconds later. Up to 25 test orders a day. Then it behaves like a delivered report: a signed report.delivered webhook goes, within about a minute, to the endpoints you had when you placed it (add your webhook first) (report.status_changed is not sent for test orders), and it returns a sample white-label PDF (pdf_url), the same sample with RoofStruct’s branding (pdf_url_roofstruct, if your account receives that copy) and that sample’s measurements — the same sample for every test order, whatever the address. Test orders carry "test": true (real reports carry "test": false), are kept for 7 days and are not listed by GET /v1/reports.

POST /v1/reports

Order a report. Returns 201 with the new report, or 200 with the first one when the Idempotency-Key was already used.

Body: address (required) · latitude + longitude · place_id · report_type (roof_residential default, or roof_commercial) · reference (your job id) · project_name · notes · include_secondary_structures · requested_pitch (the known pitch, like 6/12) · detached_structures (any of detached_garage, pool_house, shed_workshop, barn_ag) · allow_duplicate · test

Without latitude and longitude, we look the address up (US and Canada, street address with a house number). If it can’t be found precisely, the order is refused and nothing is charged. Sending coordinates of the roof skips the lookup.

Unknown fields are refused, not ignored. CC recipients are not supported: deliver the report to your customer from your own system.

A second order for the same address within 30 days is refused with 409 duplicate_address (the error carries existing_report_id). Send "allow_duplicate": true to order it anyway.

The response carries balance_cents, your prepaid balance after this order.

Reusing an Idempotency-Key returns the first order as it is now, even if the new request's body differs. Use a new key for a new order.

If we can’t complete a report (for example no usable aerial imagery, the roof hidden by trees, or an address problem), the full price goes back to your prepaid balance and its status becomes rejected, with reject_reason and a readable reject_message. The report.rejected webhook fires. A report cancelled before delivery (contact us) is credited back too.

To run your balance from your own system, listen for the balance.low, balance.empty and balance.topped_up webhooks.

API orders are paid from your prepaid balance, so they don’t appear in Purchase history in the app.

Request
curl https://roofstruct.com/api/v1/reports \
  -H "Authorization: Bearer rs_live_…" \
  -H "Idempotency-Key: JOB-2231" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "Austin Way, Cedar Falls, IA 50613",
    "report_type": "roof_residential",
    "reference": "JOB-2231"
  }'
Response · 201
{
  "data": {
    "id": "c41d…",
    "reference": "ORD-04217",
    "status": "new",
    "delivered": false,
    "report_type": "roof_residential",
    "address": "Austin Way, Cedar Falls, IA 50613",
    "your_reference": "JOB-2231",
    "pdf_url": null,
    "pdf_url_roofstruct": null,
    "balance_cents": 18600
  }
}

Data

Measurements

Projects, reports and webhooks share one measurements format, roofstruct.measurements.v1. Fields are only added, never renamed, so your code keeps working.

measurements is null when there is nothing measured yet, for example a project with no drawing.

FieldWhat it is
calibratedfalse when the drawing has no scale yet. Every size is then null.
roof_area_ft2 · roof_area_m2Roof area, pitch included. ft² in whole numbers, m² to one decimal.
footprint_ft2 · footprint_m2Footprint: the area seen from above.
squaresRoof area in squares (100 ft²), no waste.
waste_percent · order_squaresThe waste used, and the squares to order with it.
predominant_pitch · predominant_pitch_textThe main pitch, for example 6 and "6/12".
facet_count · structure_count · penetration_countCounts from the drawing.
unpitched_face_countFaces with no pitch yet (counted flat). 0 when complete.
lengths_ft · lengths_meave, rake, ridge, hip, valley, drip_edge, step_flashing, wall_flashing and gutter.
Measurements
{
  "schema": "roofstruct.measurements.v1",
  "calibrated": true,
  "roof_area_ft2": 2846,
  "roof_area_m2": 264.4,
  "footprint_ft2": 2312,
  "footprint_m2": 214.8,
  "squares": 28.46,
  "waste_percent": 10,
  "order_squares": 31.31,
  "predominant_pitch": 6,
  "predominant_pitch_text": "6/12",
  "facet_count": 9,
  "unpitched_face_count": 0,
  "structure_count": 1,
  "penetration_count": 3,
  "lengths_ft": {
    "eave": 182.4, "rake": 96.2, "ridge": 58.7,
    "hip": 44.1, "valley": 31.5, "drip_edge": 278.6,
    "step_flashing": 22.0, "wall_flashing": 14.5,
    "gutter": 182.4
  },
  "lengths_m": { "eave": 55.6, … }
}

Events

Webhooks

Add an endpoint in Settings › Integrations: a public https URL and the events you want. RoofStruct shows its signing secret once (whsec_…).

report.delivered

A report you ordered is delivered. Sends the report (with pdf_url, plus pdf_url_roofstruct and background_image_url if your account receives them) and its measurements. Can wait up to 10 minutes for the PDF.

report.status_changed

A report order moves to another status. Sends the report and previous_status.

measurement.sent

Someone clicks Send to Your Apps in the builder. Sends the project, its measurements and sent_by.

report.rejected

A report we couldn’t complete (no usable aerial imagery, roof hidden, address problem…). Sends the report with status rejected, reject_reason and reject_message. API orders are credited back to your balance. Also sent as report.status_changed.

balance.low

Report ordering accounts: your prepaid balance fell below about five reports. Sends balance (balance_cents, low_balance_cents, cheapest_report_cents). Sent once each time the line is crossed.

balance.empty

Report ordering accounts: your balance can no longer pay for the cheapest report, so new API orders are refused until you top up. Same body as balance.low.

balance.topped_up

Report ordering accounts: money was added to your balance. Sends balance and top_up (amount_cents, method: card or manual).

Use Send test next to an endpoint that is turned on to check your receiver. The test arrives with type webhook.test and a short message, so answer it with a 2xx too. Recent deliveries and their responses are listed there.

Delivery
POST /your/endpoint
webhook-id: 0d6f2c1e-…
webhook-timestamp: 1793740815
webhook-signature: v1,K5oZfz…
content-type: application/json

{
  "id": "0d6f2c1e-…",
  "type": "report.delivered",
  "created_at": "2026-11-03T13:02:18Z",
  "data": {
    "report": { "id": "c41d…", "status": "delivered", … },
    "measurements": { "schema": "roofstruct.measurements.v1", … }
  }
}

Security

Verify signatures

Webhooks follow the Standard Webhooks spec, so its libraries work as they are. To check by hand:

1. Join webhook-id, webhook-timestamp and the raw body with dots.

2. HMAC-SHA256 it with your secret: the part after whsec_, base64-decoded.

3. Compare the base64 result with the value after v1, in webhook-signature, in constant time.

Reject a timestamp more than 5 minutes old, and use webhook-id to skip events you already handled.

Node.js
import crypto from "node:crypto";

function verify(req, rawBody, secret) {
  const id = req.headers["webhook-id"];
  const ts = req.headers["webhook-timestamp"];
  const key = Buffer.from(secret.replace("whsec_", ""), "base64");
  const expected = crypto.createHmac("sha256", key)
    .update(`${id}.${ts}.${rawBody}`)
    .digest("base64");
  const got = req.headers["webhook-signature"].split(" ")
    .map((s) => s.split(",")[1]);
  const ok = got.some((g) => g && g.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(g), Buffer.from(expected)));
  const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300;
  return ok && fresh;
}

Delivery

Retries

Answer with any 2xx within 10 seconds. Any other reply, 410 and redirects included, is tried again, five more times:

  1. +1 min
  2. +5 min
  3. +30 min
  4. +2 h
  5. +12 h

Every try sends the same webhook-id, so use it to skip duplicates. For report.delivered, each try carries fresh PDF links.

After 10 deliveries in a row fail every try, the webhook is switched off. Turn it back on in Settings › Integrations once your endpoint is fixed.

To stop deliveries, turn the webhook off or delete it in Settings › Integrations.

Building something with RoofStruct?

Ask us from the Help button in the app, or email support@roofstruct.com. We read every message.