Aurora uses webhooks to notify your applications when an event occurs in your tenant.
Use cases
Common webhook use cases include:
- Notifying your team that Aurora Expert Design service finished building a roof model, and the design is ready for panel placement
- Keeping Aurora design details in sync with those in your CRM
- Triggering post-sales workflow in your IT ecosystem on homeowner's e-signing a solar installation agreement
- Replacing batched polling of Aurora objects for statuses with real-time webhook-based notifications
How webhooks work
A webhook is a single message sent by Aurora to your application's webhook subscription URL. A webhook contains payload in path parameters and, optionally, authentication information in the headers.
A webhook subscription is a persisted data object that you can create, update, and delete using Aurora's REST APIs. The webhook subscription describes the event that your application needs to be notified about and a destination where Aurora should send webhooks of the specified event. When the event occurs, the webhook subscription sends a relevant payload to your destination.
Events
With access to either Sync API or Design API, you can create webhook subscriptions to all the following events.
Event | Description | URL Attributes |
---|---|---|
agreement_status_changed | Fires upon agreement status change. For a list of available statuses, see the response for "Retrieve Agreement." | <PROJECT_ID> <AGREEMENT_ID> <STATUS> |
ahj_lookup_completed | Fires upon completion of an Authority Having Jurisdiction (AHJ) lookup, which happens upon project creation to assign the project to an AHJ. The <STATUS> field can have a value of succeeded or failed , since the job sometimes fails to assign an AHJ. | <PROJECT_ID> <AHJ_ID> <STATUS> |
app_status_changed | Fires upon the status of a partner application changing. The <STATUS> field can have a value of enabled or disabled . | <APP_ID> <STATUS> |
asset_created | Fires upon an asset being created and ready for download. Will not fire for assets still upload-in-progress. The <ASSET_TYPE> field can be Design DXF , Design Layout , CAD Screenshot , CAD Auto Screenshot , or Site Survey Request Screenshot . | <DESIGN_ID> <ASSET_ID> <ASSET_TYPE> |
auto_designer_job_completed | Fires upon AutoDesigner job completion. For a list of available statuses, see the response for "Retrieve AutoDesigner job's status." | <DESIGN_ID> <JOB_ID> <STATUS> |
consumption_profile_changed | Fires upon any change to a consumption profile. Note that the change may not affect any fields exposed through the API. | <PROJECT_ID> |
design_created | Fires upon a new design being created in Aurora. The SOURCE of a design can be either app , api , or expert_design_service based on whether the design was created (or duplicated) manually in Aurora, via API, or through the expert design service. | <PROJECT_ID> <DESIGN_ID> <SOURCE> |
design_deleted | Fires upon a design being deleted in Aurora. | <PROJECT_ID> <DESIGN_ID> |
design_request_completed | Fires upon design request status changing to designer_completed . | <DESIGN_REQUEST_ID_IN_AURORA> <STATUS> |
design_request_rejected | Fires upon design request status changing to designer_rejected . | <DESIGN_REQUEST_ID_IN_AURORA> <STATUS> |
lead_changed | Fires upon a new lead being changed in Aurora. | <LEAD_ID> |
lead_converted | Fires upon a lead being converted into a project in Aurora. | <LEAD_ID> <PROJECT_ID> |
lead_created | Fires upon a new lead being created in Aurora. The SOURCE of a lead can either be lcai or api based on if the lead was made through LCAI or manually via API. | <LEAD_ID> <SOURCE> |
panel_irradiance_analysis_job_completed | Fires upon irradiance analysis job completion. Note that this will only send once panel irradiance is completed, and will not send for roof irradiance jobs. For a list of available statuses, see the response for "Retrieve irradiance analysis job's status." | <DESIGN_ID> <JOB_ID> <STATUS> |
performance_simulation_job_completed | Fires upon performance simulation job completion. For a list of available statuses, see the response for "Retrieve performance simulation job's Status." | <DESIGN_ID> <JOB_ID> <STATUS> |
project_created | Fires upon a new project being created in Aurora. The SOURCE of a project can be either app or api based on whether the project was created manually in Aurora, or via API. | <PROJECT_ID> <SOURCE> |
project_deleted | Fires upon a new project being deleted in Aurora. The SOURCE of a project can be either app or api based on whether the project was deleted manually in Aurora, or via API. | <PROJECT_ID> <SOURCE> |
project_status_changed | Fires upon a project status change. Unlike other webhook statuses, a project status can be any string. | <PROJECT_ID> <STATUS> |
web_proposal_url_created | Fires upon a a Web Proposal URL being generated or re-generated. The SOURCE of a project can be either app or api based on whether the Web Proposal URL was generated manually in Aurora, or via API. | <DESIGN_ID> <SOURCE> |
URL template
Aurora webhooks are fired as GET requests to a URL generated using a template provided by you. When creating a webhook subscription, you may specify which of the event's attributes should be included in the webhook's URL. For example, URL template
https://www.yourapp.com/auto_designer_job_completed?design_id=<DESIGN_ID>&job_id=<JOB_ID>&status=<STATUS>
would result in GET requests that look like this
https://www.yourapp.com/auto_designer_job_completed?design_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&job_id=5cf99a21-5717-4562-b3fc-2c963f66abc6&status=succeeded
Event | Suggested URL Template |
---|---|
agreement_status_changed | https://www.yourapp.com/agreement_status_changed?project_id=<PROJECT_ID>&agreement_id=<AGREEMENT_ID>&status=<STATUS> |
ahj_lookup_completed | https://www.yourapp.com/ahj_lookup_completed?project_id=<PROJECT_ID>&ahj_id=<AHJ_ID>&status=<STATUS> |
app_status_changed | https://www.yourapp.com/app_status_changed?app_id=<APP_ID>&status=<STATUS> |
asset_created | https://www.yourapp.com/asset_created?design_id=<DESIGN_ID>&asset_id=<ASSET_ID>&asset_type=<ASSET_TYPE> |
auto_designer_job_completed | https://www.yourapp.com/auto_designer_job_completed?design_id=<DESIGN_ID>&job_id=<JOB_ID>&status=<STATUS> |
consumption_profile_changed | https://www.yourapp.com/consumption_profile_changed?project_id=<PROJECT_ID> |
design_created | https://www.yourapp.com/design_created?project_id=<PROJECT_ID>&design_id=<DESIGN_ID>&source=<SOURCE> |
design_deleted | https://www.yourapp.com/design_deleted?project_id=<PROJECT_ID>&design_id=<DESIGN_ID> |
design_request_completed | https://www.yourapp.com/design_request_completed?design_request_id=<DESIGN_REQUEST_ID_IN_AURORA>&status=<STATUS> |
design_request_rejected | https://www.yourapp.com/design_request_rejected?design_request_id=<DESIGN_REQUEST_ID_IN_AURORA>&status=<STATUS> |
lead_changed | https://www.yourapp.com/lead_changed?lead_id=<LEAD_ID> |
lead_converted | https://www.yourapp.com/lead_converted?lead_id=<LEAD_ID>&project_id=<PROJECT_ID> |
lead_created | https://www.yourapp.com/lead_created?lead_id=<LEAD_ID>&source=<SOURCE> |
panel_irradiance_analysis_job_completed | https://www.yourapp.com/panel_irradiance_analysis_job_completed?design_id=<DESIGN_ID>&job_id=<JOB_ID>&status=<STATUS> |
performance_simulation_job_completed | https://www.yourapp.com/performance_simulation_job_completed?design_id=<DESIGN_ID>&job_id=<JOB_ID>&status=<STATUS> |
project_created | https://www.yourapp.com/project_created?project_id=<PROJECT_ID>&source=<SOURCE> |
project_deleted | https://www.yourapp.com/project_deleted?project_id=<PROJECT_ID>&source=<SOURCE> |
project_status_changed | https://www.yourapp.com/project_status_changed?project_id=<PROJECT_ID>&status=<STATUS> |
web_proposal_url_created | https://www.yourapp.com/web_proposal_url_created?design_id=<DESIGN_ID>&source=<SOURCE> |
Note that you can also include static attributes like ?aurora_event=design_request_rejected
in URL templates.
Securing your webhooks
To keep communications between Aurora and your application secure, we only include proprietary identifiers and statuses in webhook payloads. You can assure that the payload is encrypted by using an HTTPS URL.
Your webhooks can optionally include authentication information to verify that they came from Aurora rather than someone claiming to be Aurora. We offer two types of webhook authentication:
Header-based Token Authentication
Provide your auth token using a key-value pair in the webhook's headers.
//POST /tenants/{tenant_id}/webhooks
"webhook": {
"description": "Aurora - AutoDesigner Webhook",
"event": "auto_designer_job_completed",
"url_template": "https://www.webhookclient.com...",
"enabled": true,
"header_auth_key": "X-Aurora-Webhook-Token",
"header_auth_value": "2dbcbba1-9f64-4c07-86dc-02effcbeafa6"
}
Basic Auth
Provide basic auth username and password to be sent with each webhook.
//POST /tenants/{tenant_id}/webhooks
"webhook": {
"description": "Aurora - AutoDesigner Webhook",
"event": "auto_designer_job_completed",
"url_template": "https://www.webhookclient.com...",
"enabled": true,
"basic_auth_username": "[email protected]",
"basic_auth_password": "Powering the future 0f solar together!"
}
Filters
Provide filters for your URL attributes so that webhooks are only sent on specific events.
Webhook Filters act as an allow-list for values of a URL attributes. When an event occurs in Aurora, the values for the URL attributes will be checked against the webhook's filters. Webhooks will only trigger if the value for all URL attributes matches the associated filters. If a webhook subscription has no filters associated with it, no filtering will be done and the webhook will be sent.
For example, a project_status_created
webhook with the filters:
{
"<STATUS>": ["In Progress", "Completed"]
}
would only send a webhook notification when a Project is transitioned to "In Progress" or "Completed". All other project_status_changed
events would be filtered out, and no webhook notification would be sent.
Event | Available Filter(s) | Filter Values |
---|---|---|
agreement_status_changed | STATUS | sent viewed signed cancel-pending canceled declined error |
ahj_lookup_completed | STATUS | succeeded failed |
app_status_changed | STATUS | enabled disabled |
asset_created | ASSET_TYPE | Design DXF Design Layout CAD Screenshot CAD Auto Screenshot Site Survey Request Screenshot |
auto_designer_job_completed | STATUS | succeeded failed |
consumption_profile_changed | — | — |
design_created | SOURCE | app api expert_design_service |
design_deleted | - | - |
design_request_completed | - | - |
design_request_rejected | - | - |
lead_changed | — | — |
lead_converted | — | — |
lead_created | SOURCE | lcai api |
panel_irradiance_analysis_job_completed | STATUS | succeeded failed |
performance_simulation_job_completed | STATUS | succeeded failed |
project_created | SOURCE | app api |
project_deleted | SOURCE | app api |
project_status_changed | STATUS | any string value |
web_proposal_url_created | SOURCE | app api |
Considerations
Timeouts. Your application is expected to respond within 10 seconds. Otherwise, the webhook will time out.
Retries. Aurora has a retry mechanism for failed webhook notifications. If your application doesn't respond within 10 seconds, or responds with a 3xx/4xx/5xx status code, Aurora will try to deliver the webhook 5 more times. Each retry will use the most recent webhook definition so that errors in URLs or credentials can be corrected. Disabling or deleting a failing webhook will prevent subsequent retries.
Retries occur at exponentially increasing intervals over 24 hours:
Retry | Interval until next retry (approximate) |
---|---|
1 | 30 seconds |
2 | 5 minutes |
3 | 30 minutes |
4 | 3 hours |
5 | 20 hours |
If your application has an outage that causes you to miss all retries, we can resend notifications within 30 days of the original event. Please contact your Aurora account representative for assistance.
If all retries for a webhook subscription fail within a 48 hour period, the webhook will be automatically disabled to avoid excessive load on Aurora's systems. A webhook subscription must have at least 100 attempts within the 48 hours to be considered for auto-disabling. After the failure is resolved, you can re-enable the webhook subscription in the webhooks dashboard or using Webhooks API.
Multiple subscriptions. You can have multiple webhook subscriptions associated with an event with a maximum of 5 subscriptions per event per tenant.
Ordering. Ordering between events is not guaranteed. For example, it's possible that you'll receive a webhook with status signed
before you receive a webhook with status viewed
for an agreement. Your endpoint should handle this accordingly.
Best practices
Respond quickly. It's important to respond to the webhook request as quickly as possible. A common pattern is to store the payload in a message queue for later processing by a background worker.
Handle duplicate webhooks. Although we try not to send the same webhook twice, in some rare cases, that might happen. Receiving the same webhook a second time in a row should have no additional effect. You can detect duplicate webhooks by examining universally unique identifiers included in the payload (e.g. design_request_id
, job_id
) or just comparing the payload directly to the previous state.