Integration guide
For copyable examples covering applications, member invitations and status webhooks, start with the integration quickstart.
Keep your backend responsible for credentials, application identity and reconciliation. Your frontend sends applicants into the Aegis portal, where they provide their own forms, documents and answers.
Prepare your integration
Arrange a tenant and intake
Request the scopes you need
Store your application identity
Plan asynchronous outcomes
Choose your provisioning flow
Links are single use and live three days from issue. Read expiresAt rather than hardcoding the duration. Aegis does not send an email for tenant API login-session requests. A repeated call mints a new ticket; never construct the portal URL yourself or assume retry returns the same ticket.
Server quickstart
First, call GET /v1/intakes and select the label for your onboarding flow. Use its labelId in the create request. An empty intake list requires configuration by your Aurora Edge representative; do not guess a label.
This cURL example creates an application and returns a sign-in link. Replace placeholders with values from onboarding. Keep the response out of routine logs because it contains loginUrl.
After saving clientId, send an HTTP redirect or place the returned URL in a private invitation. Avoid link-preview and automated link-checking systems that could consume a single-use ticket. Redact URLs containing tickets from analytics and access logs.
Handle HTTP responses consistently
This server-side JavaScript helper preserves status and diagnostic headers, handles 204 without parsing JSON and tolerates an empty or non-JSON failure from an upstream proxy. It leaves retries to the caller so a side-effecting request is not repeated blindly.
Retry 429 and transient 5xx with bounded exponential backoff and jitter, honoring Retry-After when present. Network errors and timeouts also need reconciliation. Preserve the same provisioning identity. A 409 requires fixing the reference/email conflict, and a 401 requires a valid key. A 403 may require the correct scope, unlocking the application or restoring tenant access. The error reference explains each case.
Use the helper in your backend
Set AEGIS_API_KEY in your server environment, then use the helper above. The sample corporate label must be replaced with a label returned for your tenant. Save the returned clientId before handing off the applicant; never log the session object.
Reconcile outcomes
GET the application by its saved clientId with applications:read. Its status, latest decision and rejectionReason are the outcome contract. active means approved; pending_approval does not. pending can mean submitted and awaiting review, so do not infer submission solely from status.
Poll at a cadence that fits the shared 60-per-minute key budget, spread requests over time and reduce polling for settled cases. Use the application list with externalRef to recover a missing clientId, or updatedSince to reconcile a window of changes.
Handle information requests
Read the request
Notify the right person
Let the applicant answer
Wait for review
Membership and access controls
You can add up to 20 members. Save each returned uid for later removal. Repeating an add preserves joinedAt. Removing the owner requires newOwnerUid in the query, naming another member; role labels alone do not identify the owner after a handover. A repeat removal returns 400, so check the roster after an uncertain result.
Lock disables applicant access without changing the decision or deleting the case. Reads, removal and locking remain available during tenant suspension; provisioning, new links, addition and unlocking are refused. The application read does not return ownerUid or accessActive; retain successful handover and lock/unlock responses in your integration record.
Keep outcomes in sync with webhooks
Register your receiver, store its signing secret and send a test event using the webhook reference. Subscribe to application.status.changed for outcomes and application.info_request.raised for applicant follow-up. Use application reads to reconcile every accepted event.
Deduplicate event IDs and process every unseen event. Sequence numbers describe event allocation order, which can differ from the time the underlying change happened. Read the application for current status instead of copying a webhook status into your case. Serialize reconciliation for each clientId so concurrent reads cannot overwrite one another out of order. During recovery, inspect dead letters and sweep the application list with updatedSince.
Integration acceptance checklist
- Verify the required scopes on your test tenant and use synthetic applicants for acceptance checks.
- Create, repeat with the same identity, read the current status, and verify a conflicting email returns 409 without adding a member.
- Open a private test link, verify single use, handle expiry and reissue to the intended current member.
- Exercise a request/response round through the portal and verify needs_info, responded, reopened and decision handling.
- Check membership limits, ownership handover, repeated removal and lock/unlock where your integration uses them.
- Verify 401, 403, 404, 410, 429 and transient error handling without exposing secrets or applicant data in logs.
- Verify real events, bad signatures, stale timestamps, duplicates, reversed order, receiver failure, secret overlap and dead-letter recovery.
- Arrange credential rotation, monitoring and an operational contact. Check the changelog before enabling a new capability.