# Deep links for SaaS mobile apps

> Invite teammates into a workspace, open shared items in the app, hold betas behind a password, and credit referrals with signed webhooks.

Page: https://warplink.app/use-cases/saas-app-links

A SaaS app has a mobile companion, and its growth links are invitations: teammates joining a workspace, customers opening a shared item, users referring a colleague. WarpLink links open that workspace or item in the app, carry the invitation through the install, and credit the person who sent it.

## How it works

1. **Link invitations to the workspace.** Create an invite link with a destination such as a workspace or a project path in your app. Turn on the referral option when you want to credit the inviter.
2. **Open shared items in the app.** Links in notification emails and chat messages can open the exact item: a report, a ticket or a board. Use your own domain so the link reads as yours.
3. **Hold betas behind a password.** Gate a beta or preview link with a password and an expiry date, and share the password in another channel.
4. **Route the first launch.** With the SDK in your app, the first launch reads the link and opens the workspace the invite named, before sign-up. Keep a generic welcome for everyone else.
5. **Claim and reward referrals.** After the new user signs up, claim the referral with your own user id. Your webhook receives a signed event and grants the reward in your billing system.
6. **Read the funnel from the link.** The report shows clicks and installs per link, and the Referrals report shows invites by inviter. Pull the same numbers over REST or MCP.

## Credit an invite after sign-up

### iOS (Swift)

```swift
import WarpLink

// First screen: offer the invitation paste.
WarpLinkPasteButton { result in
    if case .success(let link) = result, link != nil { showInvitationApplied() }
}

// After sign-up: credit the invite with your own id for the new user.
WarpLink.claimReferral(installerId: user.warplinkId) { result in
    guard case .success(let claim) = result, claim.status == .claimed else { return }
    // Recorded. Your webhook grants the reward.
}
```

### Android (Kotlin)

```kotlin
// Nothing to paste on Android: the Play install referrer carries the invitation.
// After sign-up: credit the invite with your own id for the new user.
WarpLink.claimReferral(user.warplinkId) { result ->
    result.onSuccess { claim ->
        if (claim.status == ReferralClaimStatus.CLAIMED) {
            // Recorded. Your webhook grants the reward.
        }
    }
}
```

### React Native

```typescript
import { WarpLink } from '@warplink/react-native'

// The person pastes the invitation into a field on your onboarding screen.
const link = await WarpLink.redeemInvitation(pastedText)
if (link) showInvitationApplied()

// After sign-up: credit the invite with your own id for the new user.
const claim = await WarpLink.claimReferral(user.warplinkId)
if (claim.status === 'claimed') {
  // Recorded. Your webhook grants the reward.
}
```

### Flutter

```dart
import 'package:warplink_flutter/warplink_flutter.dart';

// The person pastes the invitation into a field on your onboarding screen.
final link = await WarpLink.redeemInvitation(pastedText);
if (link != null) showInvitationApplied();

// After sign-up: credit the invite with your own id for the new user.
final claim = await WarpLink.claimReferral(user.warplinkId);
if (claim.status == ReferralClaimStatus.claimed) {
  // Recorded. Your webhook grants the reward.
}
```

## What you get

- **Linking.** Invitation and shared-item links that open the workspace or item in the app, from email, chat or the web.
- **Attribution.** Installs that follow a tap on a WarpLink link, in any channel, are matched to the invite, and a claimed referral credits the inviter.
- **Analytics.** Clicks and installs per link, a Referrals report by inviter, and the same figures over REST and MCP.

## Questions

### Can an invite link open a specific workspace?

Yes. The destination is a path in your app, and the SDK returns it on first launch so you can route to the workspace the invite named.

### How are referral rewards granted?

Your backend receives a signed webhook when a referral is claimed, and grants the reward in your own system. WarpLink records the claim and the evidence behind it.

### Can I keep a beta link private?

Yes. Set a password and an expiry date on the link. The form is served at the edge, and the password is stored as a hash.

### Does it work with a React Native or Flutter app?

Yes. The iOS, Android, React Native and Flutter SDKs each support invitations and referral claims.

### Can a script create the invite links?

Yes. Create links with a POST to /v1/links, with is_referral set to true for referral links. An MCP client can do the same.

## Related

- [App referral programs](https://warplink.app/use-cases/app-referral-programs)
- [Invite-a-friend onboarding](https://warplink.app/use-cases/invite-friends-onboarding)
- [Referrals guide](https://warplink.app/docs/guides/referrals)
- [Webhooks guide](https://warplink.app/docs/guides/webhooks)
- [Password-protected app links](https://warplink.app/use-cases/password-protected-app-links)
