Developers

Real sharing in an afternoon.

The integration surface is deliberately small. Make your models shareable, create a capsule when the user taps Share, and turn incoming links back into typed values. CapsuleCards runs everything on the web side.

Share

Conform a model to Shareable, give it preview fields for the link preview, and call share. You get back a public URL and the SDK stores the capsule's edit token for later updates.

struct Recipe: Shareable {
    static let shareType = "recipe"
    static let schemaVersion = 2

    var name: String
    var servings: Int
    var ingredients: [String]
    var photo: CapsuleImage?

    var preview: CapsulePreview {
        .init(title: name,
              description: "\(ingredients.count) ingredients",
              image: photo)
    }
}

CapsuleCards.configure(publishableKey: "cc_pk_live_…")

let link = try await CapsuleCards.shared.share(recipe)
ShareLink(item: link.url)

Receive

Add your app's CapsuleCards hostname to Associated Domains. When a recipient with your app taps the link, it opens your app and the SDK fetches the capsule as your own type.

.onOpenURL { url in
    Task {
        if let recipe = try await CapsuleCards.shared
            .capsule(from: url, as: Recipe.self) {
            importRecipe(recipe)
        }
    }
}

Update and delete

Capsules are live. Update one and its web page, preview and payload change at the same URL, so links already shared stay current. Delete it when the content is gone.

try await CapsuleCards.shared.update(link, with: editedRecipe)
try await CapsuleCards.shared.delete(link)

What you get

Swift SDK

The reference integration for iOS and other Apple platforms. It handles keys, App Attest, attachment uploads, edit tokens and schema versions behind the scenes.

REST API

Manage capsules and attachments, read public capsules for import, and query view statistics from api.capsule.cards. A published OpenAPI schema lets you generate a typed client for any language.

Hosted capsule URLs

Every capsule gets a stable public URL on your app's own hostname, either <slug>.capsule.cards/<id> or your custom domain. The SDK returns it on create, ready for the share sheet.

Dashboard

Manage teams, apps, share types and their designs, keys, domains and analytics at app.capsule.cards.

Four ideas to know

App
One mobile app. It owns a hostname, its API keys and its share types, so links to its capsules open that app.
Share type
A kind of thing your users share, like a Recipe. It has a versioned schema for its payload and a design for its web page.
Capsule
One shared item, published as a single link. It carries preview fields, a typed payload and optional attachments.
Capsule card
The public web page for a capsule, with correct preview metadata and an invitation to install your app.

Secure by design

Keys per app

A publishable key is safe to ship in your app binary and can only create capsules and edit its own. Secret keys stay on your servers. Rotating one app's keys never affects another.

App Attest

On Apple platforms, requests from your app are hardened with App Attest, so only genuine copies of your app can create capsules.

Isolated hostnames

Each app's capsules are served from its own origin, which keeps custom designs and data separate from every other app.

Want early access to the SDK?

CapsuleCards is in private beta. Join the waitlist and we'll let you know as soon as there's a spot for your app.

Join the waitlist