Skip to main content
Mark the domain disconnect as complete after Entri restores the original DNS records.

When to Use

Call this endpoint after Entri successfully restores the user’s original DNS records during the disconnect flow. This updates the proxy status to β€œDISCONNECTED” while preserving CloudFront and ACM for fast reconnection later.

What This Does

  1. Updates proxy_status to β€œDISCONNECTED”
  2. Preserves CloudFront distribution (no recreation needed on relink)
  3. Preserves ACM certificate (continues auto-renewing)
  4. Enables fast reconnection via the 2-step DNS flow

Example Request

curl -X POST https://searchcompany-main.up.railway.app/api/domain/mark-disconnect-complete/org_xxx \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "status": "success",
  "proxy_status": "DISCONNECTED",
  "message": "Domain disconnected. CloudFront and SSL certificate preserved for fast reconnection.",
  "can_reconnect": true
}

Response Fields

FieldTypeDescription
statusstringsuccess or error
proxy_statusstringDISCONNECTED
messagestringHuman-readable status message
can_reconnectbooleanTrue if CloudFront/ACM preserved

Proxy Status Flow

PENDING_VALIDATION β†’ SSL_VALIDATING β†’ SSL_VALIDATED β†’ DEPLOYED
                                                         ↓
                                                    DISCONNECTED
                                                         ↓
                                              (User clicks Reconnect)
                                                         ↓
                                              PENDING_VALIDATION β†’ ...

Frontend Integration

// After Entri completes the disconnect flow
const handleEntriClose = async (success: boolean) => {
  if (success) {
    // Mark disconnect complete
    const result = await markDisconnectComplete(orgId, token);
    
    if (result.status === "success") {
      // Show reconnect option to user
      showReconnectButton();
    }
  }
};

Reconnection Flow

When a user wants to reconnect after disconnecting:
  1. No CloudFront setup needed - distribution already exists
  2. Start certificate - if SSL expired, or skip if still valid
  3. 2-step DNS flow - SSL CNAME β†’ www CNAME
  4. Mark step 2 complete - status becomes DEPLOYED
This is much faster than initial setup because CloudFront and ACM are preserved.

Why Preserve Infrastructure?

ResourceCost When IdleBenefit
CloudFrontFree (no traffic)Instant relink (no 15-min creation)
ACM CertificateFreeAuto-renews forever, no user action

Error Responses

Organization Not Found

{
  "detail": "Organization not found"
}

No Proxy Configuration

{
  "detail": "No proxy configuration found"
}