{"version":"1.0","auth":{"type":"api_key_secret","headers":{"key":"X-Agent-KeyId","secret":"X-Agent-Secret"},"description":"Include both headers on every request. Credentials are issued from the IHM account settings page."},"endpoints":{"discover":{"method":"GET","path":"/AgentApi/Discover","auth":false,"description":"This endpoint. Returns API schema and available operations."},"webhook_types":{"method":"GET","path":"/AgentApi/WebhookTypes","auth":true,"description":"List available webhook event types."},"webhooks":{"method":"GET","path":"/AgentApi/Webhooks","auth":true,"description":"List your current webhook subscriptions."},"subscribe":{"method":"POST","path":"/AgentApi/Subscribe","auth":true,"description":"Subscribe to a webhook event type. Upserts — calling again for the same type/user/category updates the URL and secret. For hail alert subscriptions, you can subscribe to specific alert categories per user. Call multiple times to subscribe to multiple categories.","parameters":[{"name":"AgentWebhookType_id","type":"int","required":true,"description":"The webhook type ID from /AgentApi/WebhookTypes."},{"name":"WebhookUrl","type":"string","required":true,"description":"The URL where event payloads will be POSTed."},{"name":"WebhookSecret","type":"string","required":true,"description":"A secret used to sign outbound payloads via HMAC-SHA256. Store this securely — it cannot be retrieved later."},{"name":"UserEmail","type":"string","required":false,"description":"Email of the user whose alerts to subscribe to. Must be a user on the account. Defaults to the account owner if omitted."},{"name":"AlertCategory","type":"string","required":false,"description":"Alert category to subscribe to (e.g. HAIL_DETECTED, HAIL_SPOTTED). Omit to receive all categories. See /AgentApi/WebhookTypes for available categories."}]},"unsubscribe":{"method":"POST","path":"/AgentApi/Unsubscribe","auth":true,"description":"Unsubscribe from a webhook event type. Specify UserEmail and AlertCategory to target a specific subscription, or omit to match the defaults.","parameters":[{"name":"AgentWebhookType_id","type":"int","required":true,"description":"The webhook type ID to unsubscribe from."},{"name":"UserEmail","type":"string","required":false,"description":"Email of the user to unsubscribe. Defaults to account owner if omitted."},{"name":"AlertCategory","type":"string","required":false,"description":"Alert category to unsubscribe from. Omit to match a subscription with no category filter."}]},"webhook_logs":{"method":"GET","path":"/AgentApi/WebhookLogs","auth":true,"description":"Get recent webhook delivery logs for a subscription. Returns up to 25 entries including account, agent, and webhook status to help diagnose delivery issues. For hail alert subscriptions, filter by UserEmail and/or AlertCategory.","parameters":[{"name":"AgentWebhookType_id","type":"long","required":true,"description":"The webhook type ID to retrieve logs for."},{"name":"UserEmail","type":"string","required":false,"description":"Filter logs by user email. Omit to see logs for all users."},{"name":"AlertCategory","type":"string","required":false,"description":"Filter logs by alert category. Omit to see logs for all categories."}]},"impact_dates_for_lat_long":{"method":"GET","path":"/AgentApi/ImpactDatesForLatLong","auth":true,"enterprise_only":true,"description":"Get hail impact dates for a geographic coordinate. Enterprise accounts only.","parameters":[{"name":"Lat","type":"decimal","required":true,"description":"Latitude."},{"name":"Long","type":"decimal","required":true,"description":"Longitude."},{"name":"Months","type":"int","required":true,"description":"Number of months to look back."}]},"impact_dates_for_address_marker":{"method":"GET","path":"/AgentApi/ImpactDatesForAddressMarker","auth":true,"enterprise_only":true,"description":"Get hail impact dates for an existing address marker. Enterprise accounts only.","parameters":[{"name":"AddressMarker_id","type":"long","required":true,"description":"The IHM AddressMarker_id."},{"name":"Months","type":"int","required":true,"description":"Number of months to look back."}]},"add_marker":{"method":"POST","path":"/AgentApi/AddMarker","auth":true,"description":"Add or update an address marker. POST a JSON body. If latitude/longitude are omitted, the address will be geocoded automatically.","parameters":[{"name":"street","type":"string","required":true,"description":"Street address."},{"name":"city","type":"string","required":true,"description":"City."},{"name":"state","type":"string","required":true,"description":"State abbreviation."},{"name":"zip","type":"string","required":true,"description":"Zip code."},{"name":"latitude","type":"decimal","required":false,"description":"Latitude. If omitted, address will be geocoded."},{"name":"longitude","type":"decimal","required":false,"description":"Longitude. If omitted, address will be geocoded."},{"name":"customer_name","type":"string","required":false,"description":"Customer name."},{"name":"customer_phone","type":"string","required":false,"description":"Customer phone number."},{"name":"customer_mobile","type":"string","required":false,"description":"Customer mobile number."},{"name":"customer_email","type":"string","required":false,"description":"Customer email address."},{"name":"comment1","type":"string","required":false,"description":"Comment field 1."},{"name":"comment2","type":"string","required":false,"description":"Comment field 2."},{"name":"comment3","type":"string","required":false,"description":"Comment field 3."},{"name":"status","type":"string","required":false,"description":"Marker status."},{"name":"salesman_email","type":"string","required":false,"description":"Salesman email for assignment."},{"name":"external_key","type":"string","required":false,"description":"Your external reference ID for upsert matching."},{"name":"address_monitoring_size","type":"decimal","required":false,"description":"Enable address monitoring at this hail size threshold (inches). Values: 0.50, 1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, 2.75, 3.00."},{"name":"AddressMarker_id","type":"long","required":false,"description":"IHM AddressMarker_id for updating an existing marker."}]}},"webhook_signatures":{"description":"Every outbound webhook request includes an HMAC-SHA256 signature so you can verify the payload is authentic.","header":"X-Webhook-Signature","algorithm":"HMAC-SHA256","format":"Lowercase hex string (no prefix)","verification_steps":["1. Read the raw request body as a UTF-8 string.","2. Trim any leading/trailing whitespace from the raw body.","3. Compute HMAC-SHA256 using your WebhookSecret (UTF-8) as the key and the trimmed body as the message.","4. Convert the hash to a lowercase hex string.","5. Compare to the X-Webhook-Signature header using a constant-time comparison."],"pitfalls":["Do not parse and re-serialize the JSON — verify against the raw body.","Trim the raw body before hashing — some frameworks add trailing whitespace.","Use constant-time comparison to prevent timing attacks.","Both secret and body must be UTF-8 encoded before hashing.","The signature has no \u0027sha256=\u0027 prefix — it is a plain hex string."]},"webhook_payloads":{"notes":["Field names are camelCase in the delivered JSON.","Fields with a null value are omitted from the delivered JSON entirely — do not assume every documented field is present.","All datetime values are ISO 8601 UTC.","Type \u0027long\u0027 denotes a 64-bit integer — use 64-bit types for these fields when generating typed clients."],"monitoring_alert":{"description":"Sent when a hail event is detected at a monitored address.","fields":[{"name":"monitoringAlert_id","type":"long","description":"Unique ID for this alert."},{"name":"reconMarker_id","type":"long","description":"The marker/address that was alerted."},{"name":"fileDate","type":"datetime","description":"Date of the hail data file (ISO 8601 UTC)."},{"name":"detected","type":"datetime","description":"Timestamp when the alert was generated (ISO 8601 UTC)."},{"name":"levelDetected","type":"int","description":"Monitoring level that triggered the alert (ordinal)."},{"name":"swathSize","type":"decimal","description":"Hail size detected in inches."},{"name":"userEmail","type":"string","description":"Email of the assigned user."},{"name":"userName","type":"string","description":"Name of the assigned user."},{"name":"markerStatus","type":"string","description":"Current status of the marker."},{"name":"customerName","type":"string","description":"Customer name on the marker."},{"name":"phoneNumber","type":"string","description":"Customer phone number."},{"name":"mobileNumber","type":"string","description":"Customer mobile number."},{"name":"email","type":"string","description":"Customer email address."},{"name":"street","type":"string","description":"Street address."},{"name":"city","type":"string","description":"City."},{"name":"state","type":"string","description":"State abbreviation."},{"name":"zipCode","type":"string","description":"Zip code."},{"name":"lat","type":"decimal","description":"Latitude."},{"name":"long","type":"decimal","description":"Longitude."},{"name":"comments","type":"string","description":"Combined comments from the marker."},{"name":"externalKey","type":"string","description":"Your external reference ID, if provided when the marker was created."},{"name":"timeZone","type":"string","description":"IANA time zone of the marker location (e.g. America/Chicago)."}]},"marker_status_changed":{"description":"Sent when a marker\u0027s status is changed. Status changes are the primary workflow driver (e.g. New → Knocked → Signed → Claim Pending → Complete).","fields":[{"name":"reconMarker_id","type":"long","description":"The marker that was updated."},{"name":"changeDate","type":"datetime","description":"Timestamp of the status change (ISO 8601 UTC)."},{"name":"source","type":"string","description":"Source of the change (e.g. SAT for satellite/web, APP for mobile)."},{"name":"mapDate","type":"datetime","description":"Date of the map the marker belongs to (ISO 8601 UTC)."},{"name":"markerCreated","type":"datetime","description":"Timestamp when the marker was originally created (ISO 8601 UTC)."},{"name":"userEmail","type":"string","description":"Email of the assigned user."},{"name":"userName","type":"string","description":"Name of the assigned user."},{"name":"markerStatus","type":"string","description":"The new status after the change."},{"name":"customerName","type":"string","description":"Customer name on the marker."},{"name":"phoneNumber","type":"string","description":"Customer phone number."},{"name":"mobileNumber","type":"string","description":"Customer mobile number."},{"name":"email","type":"string","description":"Customer email address."},{"name":"street","type":"string","description":"Street address."},{"name":"city","type":"string","description":"City."},{"name":"state","type":"string","description":"State abbreviation."},{"name":"zipCode","type":"string","description":"Zip code."},{"name":"lat","type":"decimal","description":"Latitude."},{"name":"long","type":"decimal","description":"Longitude."},{"name":"comments","type":"string","description":"Combined comments from the marker."},{"name":"externalKey","type":"string","description":"Your external reference ID, if provided when the marker was created."},{"name":"timeZone","type":"string","description":"IANA time zone of the marker location (e.g. America/Chicago)."},{"name":"monitoringSize","type":"decimal","description":"Hail size monitoring threshold in inches (e.g. 1.00, 1.25). Omitted if monitoring is not enabled."},{"name":"monitoringSizeInt","type":"int","description":"Monitoring size as ordinal integer. Omitted if monitoring is not enabled."}]},"hail_alert":{"description":"Sent when a weather alert is generated for the subscribed user. Subscribe to specific categories or omit AlertCategory to receive all. Which optional fields are present depends on the alert category — dispatch on alertCategory.","fields":[{"name":"userAlertAgentWebhook_id","type":"long","description":"Unique ID for this webhook delivery."},{"name":"message","type":"string","description":"Short alert message text. Omitted if empty."},{"name":"sound","type":"string","description":"Sound identifier used by the mobile push version of this alert. Omitted if empty."},{"name":"lat","type":"decimal","description":"Latitude of the event, for location-based alerts. Omitted if not applicable."},{"name":"long","type":"decimal","description":"Longitude of the event, for location-based alerts. Omitted if not applicable."},{"name":"fileDate","type":"datetime","description":"Date of the related hail data file. Omitted if not applicable."},{"name":"reconMarkerReport_id","type":"long","description":"Related hail impact report ID (IMPACT_REPORT alerts). Omitted if not applicable."},{"name":"territory_id","type":"int","description":"Related territory ID (TERRITORY alerts). Omitted if not applicable."},{"name":"reconPic_id","type":"long","description":"Related ReconPic ID (RECONPIC_MENTION / RECONPIC_COMMENT alerts). Omitted if not applicable."},{"name":"reconMarker_id","type":"long","description":"Related marker ID (e.g. ADDRESS_MARKER alerts). Omitted if not applicable."},{"name":"sendOnlyToUserDevice_id","type":"long","description":"Present only when the alert targeted a single user device. Omitted otherwise."},{"name":"description","type":"string","description":"Longer alert description. Omitted if empty."},{"name":"alertCategory","type":"string","description":"The alert category (see alert_categories). Use this to dispatch handling."}],"alert_categories":[{"category":"HAIL_DETECTED","description":"Hail detected by radar."},{"category":"HAIL_SPOTTED","description":"Hail spotted on the ground."},{"category":"WIND_DAMAGE","description":"Wind damage reported."},{"category":"WIND_SPEED","description":"Wind speed measured."},{"category":"TERRITORY","description":"Territory notification."},{"category":"HAIL_PROXIMITY","description":"Sent when a user visits a location for the first time (or not within the last 12 months) and hail was detected at that location."},{"category":"HAIL_FORECAST","description":"Hail forecast alert."},{"category":"IMPACT_REPORT","description":"Impact report notification."},{"category":"ADDRESS_MARKER","description":"Address marker notification."},{"category":"RECONPIC_MENTION","description":"ReconPic mention."},{"category":"RECONPIC_COMMENT","description":"ReconPic comment."},{"category":"TEST","description":"Test alert."}]},"hail_impact_report":{"description":"Sent when a hail impact report is generated for a marker. Includes the report PDF as a base64-encoded attachment.","fields":[{"name":"reconMarkerReport_id","type":"long","description":"Unique ID of the impact report."},{"name":"reconMarker_id","type":"long","description":"The marker the report was generated for."},{"name":"user_id","type":"long","description":"ID of the user who generated the report."},{"name":"locked","type":"datetime","description":"Timestamp when the report was locked. Omitted if not locked."},{"name":"source","type":"string","description":"Source of the report (e.g. SAT for satellite/web, APP for mobile)."},{"name":"mapDate","type":"datetime","description":"Date of the map the marker belongs to."},{"name":"markerCreated","type":"datetime","description":"Timestamp when the marker was originally created."},{"name":"userEmail","type":"string","description":"Email of the assigned user."},{"name":"userName","type":"string","description":"Name of the assigned user."},{"name":"markerStatus","type":"string","description":"Current status of the marker."},{"name":"customerName","type":"string","description":"Customer name on the marker."},{"name":"phoneNumber","type":"string","description":"Customer phone number."},{"name":"mobileNumber","type":"string","description":"Customer mobile number."},{"name":"email","type":"string","description":"Customer email address."},{"name":"street","type":"string","description":"Street address."},{"name":"city","type":"string","description":"City."},{"name":"state","type":"string","description":"State abbreviation."},{"name":"zipCode","type":"string","description":"Zip code."},{"name":"lat","type":"decimal","description":"Latitude."},{"name":"long","type":"decimal","description":"Longitude."},{"name":"comments","type":"string","description":"Combined comments from the marker."},{"name":"externalKey","type":"string","description":"Your external reference ID, if provided when the marker was created."},{"name":"timeZone","type":"string","description":"IANA time zone of the marker location (e.g. America/Chicago)."},{"name":"monitoringSize","type":"decimal","description":"Hail size monitoring threshold in inches (e.g. 1.00, 1.25). Omitted if monitoring is not enabled."},{"name":"monitoringSizeInt","type":"int","description":"Monitoring size as ordinal integer. Omitted if monitoring is not enabled."},{"name":"reportPdf","type":"object","description":"The report PDF attachment (see attachment_fields). Omitted if the PDF could not be generated."}],"attachment_fields":[{"name":"contentType","type":"string","description":"Always application/pdf."},{"name":"fileName","type":"string","description":"Suggested file name for the attachment."},{"name":"data","type":"string","description":"Base64-encoded PDF bytes."}]},"recon_pic":{"description":"Sent when a ReconPic (job site photo) is uploaded for a marker. Includes a short-lived pre-signed URL to download the photo.","fields":[{"name":"reconPic_id","type":"string","description":"Unique ID (GUID) of the photo."},{"name":"reconMarker_id","type":"long","description":"The marker the photo belongs to."},{"name":"taken","type":"datetime","description":"Timestamp when the photo was taken."},{"name":"takenLocal","type":"datetime","description":"Timestamp when the photo was taken, in the marker\u0027s local time zone. Omitted if unknown."},{"name":"localTimeZone","type":"string","description":"Time zone of takenLocal. Omitted if unknown."},{"name":"user_id","type":"long","description":"ID of the user who took the photo."},{"name":"userEmail","type":"string","description":"Email of the user who took the photo."},{"name":"userName","type":"string","description":"Name of the user who took the photo."},{"name":"photoDistance","type":"decimal","description":"Distance from the photo location to the marker. Omitted if unknown."},{"name":"locationBearing","type":"decimal","description":"Compass bearing from the photo location toward the marker. Omitted if unknown."},{"name":"session_id","type":"long","description":"ID of the app session the photo was taken in. Omitted if unknown."},{"name":"portrait","type":"bool","description":"True if the photo is portrait orientation."},{"name":"lat","type":"decimal","description":"Latitude where the photo was taken. Omitted if unknown."},{"name":"long","type":"decimal","description":"Longitude where the photo was taken. Omitted if unknown."},{"name":"width","type":"int","description":"Photo width in pixels. Omitted if unknown."},{"name":"height","type":"int","description":"Photo height in pixels. Omitted if unknown."},{"name":"size","type":"long","description":"Photo size in bytes. Omitted if unknown."},{"name":"uploadedSize","type":"long","description":"Uploaded file size in bytes. Omitted if unknown."},{"name":"externalKey","type":"string","description":"Your external reference ID, if provided when the marker was created."},{"name":"timeZone","type":"string","description":"IANA time zone of the marker location (e.g. America/Chicago)."},{"name":"photoUrl","type":"string","description":"Pre-signed URL to download the photo. Expires 15 minutes after delivery. Omitted if a URL could not be generated."}]}}}