Deep Links API

Create and manage deep links through our REST API.

Create Deep Link

Create a new deep link for your mobile app. The platform-specific URLs (iOS/Android) are automatically configured based on your workspace's app settings.

Endpoint

POST /api/deeplink

Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body

{
  "slug": "summer-sale",
  "app_params": {
    "screen": "promo",
    "promo_id": "summer2024",
    "discount": "50"
  },
  "social_meta": {
    "title": "Summer Sale - 50% Off!",
    "description": "Don't miss our biggest sale of the year",
    "thumbnail_url": "https://mycdn.com/summer-sale.jpg"
  }
}

Parameters

ParameterTypeRequiredDescription
slugstringYesCustom identifier for your deep link (used in the URL path)
app_paramsobjectYesCustom parameters that your app will receive when the deep link is opened
social_metaobjectNoMetadata for social media sharing (title, description, thumbnail)
social_meta.titlestringNoSocial media title (default: "Depl.link | App Download")
social_meta.descriptionstringNoSocial media description (default: "Download the mobile app...")
social_meta.thumbnail_urlstringNoSocial media thumbnail URL (default: "/images/og-image.jpg")

Note: The app_params object can contain any custom fields your app needs. These parameters will be available when your app opens the deep link.

Response

Success (200 OK)

{
  "success": true,
  "deeplink_url": "https://yourdomain.depl.link/abc123",
  "created_at": "2025-01-15T10:30:00Z"
}

Get Deep Link

Retrieve the parameters and metadata of an existing deep link. Use this in your mobile app to fetch the app_params when the deep link is opened.

Endpoint

GET /api/deeplink?slug=abc123

Headers

Authorization: Bearer YOUR_CLIENT_KEY

Query Parameters

ParameterTypeRequiredDescription
slugstringYesThe slug from the deep link URL

Response

Success (200 OK)

Returns the complete deep link record:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "workspace_id": "workspace-id",
  "slug": "summer-sale",
  "app_params": {
    "screen": "promo",
    "promo_id": "summer2024",
    "discount": "50"
  },
  "ios_parameters": {
    "bundle_id": "com.myapp.ios",
    "app_store_id": "123456789"
  },
  "android_parameters": {
    "package_name": "com.myapp.android",
    "action": "android.intent.action.VIEW",
    "fallback_url": "https://play.google.com/store/apps/details?id=com.myapp.android"
  },
  "social_meta": {
    "title": "Summer Sale - 50% Off!",
    "description": "Don't miss our biggest sale of the year",
    "thumbnail_url": "https://mycdn.com/summer-sale.jpg"
  },
  "click_count": 1234,
  "source": "API",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z"
}

Mobile App Integration

iOS (Swift)

// When your app opens from a deep link
func handleDeepLink(url: URL) {
    // Extract slug from URL: https://yourdomain.depl.link/abc123
    let slug = url.lastPathComponent

    // Fetch deep link data
    var request = URLRequest(url: URL(string: "https://depl.link/api/deeplink?slug=\(slug)")!)
    request.setValue("Bearer YOUR_CLIENT_KEY", forHTTPHeaderField: "Authorization")

    URLSession.shared.dataTask(with: request) { data, response, error in
        if let data = data {
            let deeplink = try? JSONDecoder().decode(DeepLink.self, from: data)
            // Use deeplink.app_params to navigate your app
            navigateToScreen(params: deeplink?.app_params)
        }
    }.resume()
}

Android (Kotlin)

// When your app opens from a deep link
fun handleDeepLink(uri: Uri) {
    // Extract slug from URL: https://yourdomain.depl.link/abc123
    val slug = uri.lastPathSegment

    // Fetch deep link data
    val request = Request.Builder()
        .url("https://depl.link/api/deeplink?slug=$slug")
        .addHeader("Authorization", "Bearer YOUR_CLIENT_KEY")
        .build()

    client.newCall(request).enqueue(object : Callback {
        override fun onResponse(call: Call, response: Response) {
            val deeplink = gson.fromJson(response.body?.string(), DeepLink::class.java)
            // Use deeplink.app_params to navigate your app
            navigateToScreen(deeplink.app_params)
        }
    })
}

Error Responses

All errors follow this format:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message"
  }
}

Common Error Codes

401 Unauthorized - Invalid API Key (POST)

{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Invalid API key."
  }
}

401 Unauthorized - Invalid Client Key (GET)

{
  "error": {
    "code": "INVALID_CLIENT_KEY",
    "message": "Invalid client_key."
  }
}

400 Bad Request - Missing Fields

{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Required fields are missing. slug and app_params are required."
  }
}

400 Bad Request - No Apps Configured

{
  "error": {
    "code": "NO_APPS_CONFIGURED",
    "message": "프로젝트에 등록된 앱이 없습니다."
  }
}

404 Not Found - Deep Link Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Deeplink with the specified slug not found."
  }
}

500 Server Error

{
  "error": {
    "code": "SERVER_ERROR",
    "message": "An internal server error occurred."
  }
}