Share Links API

Create secure, time-limited share links to give external parties read-only access to deal summaries. Links can be password-protected and expire automatically.

Share links expose deal summary data without requiring API authentication. Use password protection and short expiration times for sensitive deals. Revoke links immediately when access is no longer needed.

Generate a new share link for a deal. The link provides read-only access to the deal summary, health score, and recommendation. Optionally set an expiration time and password.

NameTypeRequiredDescription
deal_idintegerRequiredThe deal ID to share
expires_in_hoursintegerOptionalNumber of hours until the link expires. Omit for no expiration.
passwordstringOptionalOptional password required to view the shared deal
Request
curl -X POST https://api.banklyze.com/v1/deals/42/share \
  -H "Authorization: Bearer sk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "expires_in_hours": 72,
    "password": "securepass123"
  }'
201 Created
{
  "data": {
    "id": 15,
    "deal_id": 42,
    "token": "sh_a1b2c3d4e5f6g7h8i9j0",
    "url": "https://app.banklyze.com/share/sh_a1b2c3d4e5f6g7h8i9j0",
    "password_protected": true,
    "expires_at": "2026-03-13T14:30:00Z",
    "created_at": "2026-03-10T14:30:00Z",
    "created_by": "underwriter@company.com"
  }
}

Returns all active (non-revoked) share links for a deal, including view counts and last accessed timestamps.

NameTypeRequiredDescription
deal_idintegerRequiredThe deal ID
Request
curl https://api.banklyze.com/v1/deals/42/share \
  -H "Authorization: Bearer sk_live_abc123"
200 OK
{
  "data": [
    {
      "id": 15,
      "deal_id": 42,
      "token": "sh_a1b2c3d4e5f6g7h8i9j0",
      "url": "https://app.banklyze.com/share/sh_a1b2c3d4e5f6g7h8i9j0",
      "password_protected": true,
      "expires_at": "2026-03-13T14:30:00Z",
      "view_count": 3,
      "last_viewed_at": "2026-03-11T09:15:00Z",
      "created_at": "2026-03-10T14:30:00Z",
      "created_by": "underwriter@company.com"
    },
    {
      "id": 12,
      "deal_id": 42,
      "token": "sh_x9y8z7w6v5u4t3s2r1q0",
      "url": "https://app.banklyze.com/share/sh_x9y8z7w6v5u4t3s2r1q0",
      "password_protected": false,
      "expires_at": null,
      "view_count": 18,
      "last_viewed_at": "2026-03-10T16:45:00Z",
      "created_at": "2026-03-01T10:00:00Z",
      "created_by": "analyst@company.com"
    }
  ]
}

Immediately revoke a share link. The link will return 404 for any subsequent access attempts. Returns 204 No Content on success.

NameTypeRequiredDescription
share_idintegerRequiredThe share link ID to revoke
Request
curl -X DELETE https://api.banklyze.com/v1/share/15 \
  -H "Authorization: Bearer sk_live_abc123"

Public View

Access a shared deal summary using the share token. No API authentication is required. If the link is password-protected, pass the password via the X-Share-Password header.

NameTypeRequiredDescription
tokenstringRequiredThe share token from the link URL
X-Share-PasswordstringOptionalPassword for protected links (passed as a header)
Request (no password)
curl https://api.banklyze.com/v1/share/sh_a1b2c3d4e5f6g7h8i9j0
Request (with password)
curl https://api.banklyze.com/v1/share/sh_a1b2c3d4e5f6g7h8i9j0 \
  -H "X-Share-Password: securepass123"
200 OK
{
  "data": {
    "business_name": "Acme Trucking LLC",
    "status": "under_review",
    "health_score": 72.5,
    "grade": "B",
    "risk_factors": [
      "4 NSF transactions in January",
      "Revenue trending downward (-8% MoM)"
    ],
    "summary": {
      "total_deposits": 245000.00,
      "total_withdrawals": 218500.00,
      "average_daily_balance": 12450.00,
      "statement_count": 3,
      "date_range": {
        "start": "2025-11-01",
        "end": "2026-01-31"
      }
    },
    "recommendation": {
      "decision": "conditional_approval",
      "max_funding": 50000.00,
      "notes": "Conditional on updated January bank statement showing NSF resolution."
    },
    "shared_at": "2026-03-10T14:30:00Z",
    "expires_at": "2026-03-13T14:30:00Z"
  }
}

The public view returns a curated subset of deal data. Sensitive fields like raw transaction data, internal notes, and full financial details are excluded from shared views.