> For the complete documentation index, see [llms.txt](https://help.branch.io/llms.txt).

# Deep Linking API

The Deep Linking API creates and manages Branch Links programmatically—generate links at scale and tag them by channel and campaign for analytics.

[Read the Deep Linking API overview](https://help.branch.io/apidocs/deep-linking/overview.md)

## Read deep link

`GET https://api2.branch.io/v1/url`

This endpoint retrieves the deep link URL details based on the parameter you provide.

### Parameters

- `branch_key` (string, query, required) — The Branch Key of the originating app, from your Branch Settings. 
- `url` (string, query, required) — The deep link URL against which the details are to be fetched. 

### Responses

- `200` — Success.
- `400` — Bad request—typically an invalid or missing credential or parameter.
- `429` — Rate limit exceeded—reduce request frequency and retry.

### Returns

Success. Returns `400` and `429` on failure — see the response panel for the error shape.

### Example request

```bash
curl 'https://api2.branch.io/v1/url?url=https%3A%2F%2Fexample.app.link%2FabCdEf123&branch_key=key_live_xxxx' \
  --request GET
```

### Example responses

`200`

```json
{
  "channel": "facebook",
  "feature": "onboarding",
  "campaign": "new product",
  "stage": "new user",
  "tags": [
    "one"
  ],
  "data": {
    "~channel": "facebook",
    "url": "https://branch-demo.app.link/abCdEf123",
    "$one_time_use": false,
    "+url": "https://branch-demo.app.link/abCdEf123",
    "~creation_source": 0,
    "$match_duration": 7200,
    "$fallback_url": "",
    "$identity_id": "00000000",
    "$id": "00000000",
    "$fallback_url_xx": "",
    "$desktop_url": "",
    "$ios_url": "",
    "$ios_url_xx": "",
    "$ipad_url": "",
    "$android_url": "",
    "$android_url_xx": "",
    "$samsung_url": "",
    "$huawei_url": "",
    "$windows_phone_url": "",
    "$blackberry_url": "",
    "$fire_url": "",
    "$ios_wechat_url": "",
    "$android_wechat_url": "",
    "$web_only": false,
    "$desktop_web_only": false,
    "$mobile_web_only": false,
    "$after_click_url": "",
    "$afterclick_desktop_url": false,
    "$canonical_url": "http://www.example.com/content/123",
    "$deeplink_path": "radio/station/456",
    "$og_title": "Deep Link title.",
    "$og_description": "Deep Link description.",
    "$og_image_url": "https://cdn.branch.io/example/og-image.png"
  },
  "alias": "",
  "type": 0,
  "duration": 7200
}
```

`400`

```json
{
  "error": {
    "message": "Authentication failed.",
    "code": 400
  }
}
```

`429`

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit reached."
  }
}
```

## Create deep link

`POST https://api2.branch.io/v1/url`

This endpoint generates a deep link URL based on the parameters you provide.

### Parameters

- `branch_key` (string, required) — The Branch Key of the originating app obtained in your [Account Settings](https://help.branch.io/account-hub/profile-settings.md).
- `alias` (string) — Instead of our standard encoded short URL, you can specify the vanity alias. For example, instead of a random string of characters/integers, you can set the vanity alias as .app.link/spring-launch.
- `campaign` (string) — Campaign name.
- `channel` (string) — Deep link channel.
- `data` (object)
- `data.$fallback_url` (string) — Change the redirect endpoint for all platforms, so you don't have to enable it by platform. Note that Branch will forward all robots to this URL, which overrides any OG tags entered in the link. System-wide Default URL (set in Link Settings).
- `data.$fallback_url_xx` (string) — Change the redirect endpoint for all platforms based on a lowercase Alpha-2 country code.
- `data.$desktop_url` (string) — Redirect URL for desktop devices. Mobile users will default to the app store.
- `data.$ios_url` (string) — Change the redirect endpoint for the iOS App Store page for your app (set in Link Settings).
- `data.$ios_url_xx` (string) — Change the redirect endpoint for iOS based on a lowercase Alpha-2 country code. For example, $ios_url_de="..." would redirect Germany deep link clicks.
- `data.$ipad_url` (string) — Change the redirect endpoint for iPads. Falls back to the $ios_url value when unset.
- `data.$android_url` (string) — Change the redirect endpoint for the Android Play Store page for your app (set in Link Settings).
- `data.$android_url_xx` (string) — Change the redirect endpoint for Android based on a lowercase Alpha-2 country code. For example, $android_url_de="..." would redirect Germany deep link clicks.
- `data.$samsung_url` (string) — Redirect to the Samsung Galaxy Store on Samsung devices. Only link-level control. The format should be http://www.samsungapps.com/appquery/appDetail.as?appId={PACKAGE_NAME}
- `data.$huawei_url` (string) — Redirect to the Huawei App Gallery on Huawei devices. Only link-level control. The format should be https://appgallery.huawei.com/app/{HUAWEI_APP_GALLERY_ID}
- `data.$windows_phone_url` (string) — Change the redirect endpoint for Windows OS. Windows Phone default URL (set in Link Settings).
- `data.$blackberry_url` (string) — Change the redirect endpoint for BlackBerry OS. BlackBerry default URL (set in Link Settings). Deep link channel.
- `data.$fire_url` (string) — Change the redirect endpoint for Amazon Fire OS. Fire default URL (set in Link Settings).
- `data.$ios_wechat_url` (string) — Change the redirect endpoint for WeChat on iOS devices. $ios_url value.
- `data.$android_wechat_url` (string) — Change the redirect endpoint for WeChat on Android devices. $android_url value.
- `data.$web_only` (boolean) — Force opening the $fallback_url instead of the app.
- `data.$desktop_web_only` (boolean) — Force opening the $windows_desktop_url, $mac_desktop_url, $desktop_url, or $fallback_url in this order of precedence instead of the app.
- `data.$mobile_web_only` (boolean) — Force opening the $ios_url, $android_url, or $fallback_url in this order of precedence instead of the app.
- `data.$after_click_url` (string) — When a user returns to the browser after going to the app, take them to this URL. iOS only; Android coming soon.
- `data.$afterclick_desktop_url` (boolean) — When a user on desktop returns to the desktop browser after going to the desktop app, take them to this URL.
- `data.$canonical_url` (string) — This is the URL set against the identifier.
- `data.$deeplink_path` (string) — The value of the deep link path that you would like us to append to your URI.
- `data.$og_title` (string) — Set the title of the deep link as it will be seen in social media displays.
- `data.$og_description` (string) — Set the description of the deep link as it will be seen in social media displays.
- `data.$og_image_url` (string) — Set the image of the deep link as it will be seen in social media displays.
- `data.~id` (string) — The unique ID for the link.
- `data.~creation_source` (string) — The source where the Branch Link was created, represented by a number.
- `data.~tags` (array of string) — A free-form entry with unlimited values of type `string`. Use it to organize your link data with labels that don't fit under other keys.
- `data.~campaign` (string) — The name of the campaign associated with your link.
- `data.~campaign_id` (string) — The ID for the campaign associated with your link.
- `data.~channel` (string) — The route that your link reaches your users by.
- `data.~feature` (string) — The feature of your app associated with the link.
- `data.~stage` (string) — The progress or category of a user when the link was generated.
- `data.~marketing` (string) — Pass `"true"` to indicate this is a Quick Link.
- `data.~link_type` (string) — The Branch Link type (Deep, Quick, or Ad).
- `data.~agency_id` (string) — The ID of the relevant [agency](https://help.branch.io/account-hub/agency-profile.md).
- `data.~quick_link_template_id` (string) — The ID of the [Branch Quick Link template](https://help.branch.io/marketer-hub/link-templates.md#overview) you're using.
- `data.~ad_link_template_id` (string) — The ID of the [ad link template](https://help.branch.io/marketer-hub/testing-ads-campaign-setup.md#_2-create-a-branch-link) you're using.
- `data.~advertising_partner_name` (string) — The name of the relevant advertising partner.
- `data.~creative_name` (string) — The creative name specified for the last attributed touch.
- `data.~customer_placement` (string) — The customer-specified placement of the last touch. This is the actual app or website that the ad appears on in display campaigns.
- `data.~ad_set_name` (string) — The ad set name specified for the last attributed touch.
- `data.~ad_set_id` (string) — The ad set ID specified for the last attributed touch.
- `data.~branch_ad_format` (string) — Possible values are `"Cross-Platform Display"` or `"App Only"`.
- `data.~secondary_ad_format` (string) — Specify an ad format to help organize your analytics and make it faster to set up web fallbacks for your link.
- `domain` (string) — Link domain.
- `duration` (integer) — In seconds. Only set this key if you want to override the match duration for deep link matching. This is the time that Branch allows a click to remain outstanding and be eligible to be matched with a new app session. The default is 7200 (2 hours).
- `feature` (string) — Deep link feature set.
- `stage` (string)
- `tags` (array of string) — Social media tags.
- `type` (integer) — Default is 0.

### Responses

- `200` — Success.
- `400` — Bad request—typically an invalid or missing credential or parameter.
- `429` — Rate limit exceeded—reduce request frequency and retry.

### Returns

Success. Returns `400` and `429` on failure — see the response panel for the error shape.

### Example request

```bash
curl 'https://api2.branch.io/v1/url' \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
    "branch_key": "key_live_xxxx",
    "channel": "facebook",
    "feature": "onboarding",
    "campaign": "new product",
    "stage": "new user",
    "tags": [
      "one"
    ],
    "domain": "mydomain.custom.com",
    "data": {
      "$canonical_url": "http://www.example.com/content/123",
      "$deeplink_path": "radio/station/456",
      "$og_title": "Deep Link title.",
      "$og_description": "Deep Link description.",
      "$og_image_url": "https://cdn.branch.io/example/og-image.png",
      "~id": "00000001",
      "~creation_source": "1",
      "~tags": [
        "tag_one"
      ],
      "~campaign": "fall_feature_launch",
      "~campaign_id": "data_campaign_0000",
      "~channel": "LinkedIn",
      "~feature": "referral",
      "~stage": "level 5",
      "~link_type": "Quick",
      "~agency_id": "1111",
      "~quick_link_template_id": "1010",
      "~ad_link_template_id": "0101",
      "~advertising_partner_name": "Facebook",
      "~creative_name": "fall_feature_facebook",
      "~customer_placement": "company_ios_app",
      "~ad_set_name": "ad_group_name",
      "~ad_set_id": "ad_group_id",
      "~branch_ad_format": "Cross-Platform Display",
      "~secondary_ad_format": "App Only"
    },
    "duration": 7200
  }'
```

### Example responses

`200`

```json
{
  "url": "https://example.app.link/abCdEf123"
}
```

`400`

```json
{
  "error": {
    "message": "Authentication failed.",
    "code": 400
  }
}
```

`429`

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit reached."
  }
}
```

## Create deep links in bulk

`POST https://api2.branch.io/v1/url/bulk/{branch_key}`

This endpoint generates a deep link URL based on the parameters you provide.

### Parameters

- `branch_key` (string, path, required) — The Branch Key of the originating app, from your Branch Settings. 
- `alias` (string) — Instead of our standard encoded short URL, you can specify the vanity alias. For example, instead of a random string of characters/integers, you can set the vanity alias as .app.link/spring-launch.
- `campaign` (string) — Campaign name.
- `channel` (string) — Deep link channel.
- `data` (object)
- `data.$fallback_url` (string) — Change the redirect endpoint for all platforms, so you don't have to enable it by platform. Note that Branch will forward all robots to this URL, which overrides any OG tags entered in the link. System-wide Default URL (set in Link Settings).
- `data.$fallback_url_xx` (string) — Change the redirect endpoint for all platforms based on a lowercase Alpha-2 country code.
- `data.$desktop_url` (string) — Redirect URL for desktop devices. Mobile users will default to the app store.
- `data.$ios_url` (string) — Change the redirect endpoint for the iOS App Store page for your app (set in Link Settings).
- `data.$ios_url_xx` (string) — Change the redirect endpoint for iOS based on a lowercase Alpha-2 country code. For example, $ios_url_de="..." would redirect Germany deep link clicks.
- `data.$ipad_url` (string) — Change the redirect endpoint for iPads. Falls back to the $ios_url value when unset.
- `data.$android_url` (string) — Change the redirect endpoint for the Android Play Store page for your app (set in Link Settings).
- `data.$android_url_xx` (string) — Change the redirect endpoint for Android based on a lowercase Alpha-2 country code. For example, $android_url_de="..." would redirect Germany deep link clicks.
- `data.$samsung_url` (string) — Redirect to the Samsung Galaxy Store on Samsung devices. Only link-level control. The format should be http://www.samsungapps.com/appquery/appDetail.as?appId={PACKAGE_NAME}
- `data.$huawei_url` (string) — Redirect to the Huawei App Gallery on Huawei devices. Only link-level control. The format should be https://appgallery.huawei.com/app/{HUAWEI_APP_GALLERY_ID}
- `data.$windows_phone_url` (string) — Change the redirect endpoint for Windows OS. Windows Phone default URL (set in Link Settings).
- `data.$blackberry_url` (string) — Change the redirect endpoint for BlackBerry OS. BlackBerry default URL (set in Link Settings). Deep link channel.
- `data.$fire_url` (string) — Change the redirect endpoint for Amazon Fire OS. Fire default URL (set in Link Settings).
- `data.$ios_wechat_url` (string) — Change the redirect endpoint for WeChat on iOS devices. $ios_url value.
- `data.$android_wechat_url` (string) — Change the redirect endpoint for WeChat on Android devices. $android_url value.
- `data.$web_only` (boolean) — Force opening the $fallback_url instead of the app.
- `data.$desktop_web_only` (boolean) — Force opening the $windows_desktop_url, $mac_desktop_url, $desktop_url, or $fallback_url in this order of precedence instead of the app.
- `data.$mobile_web_only` (boolean) — Force opening the $ios_url, $android_url, or $fallback_url in this order of precedence instead of the app.
- `data.$after_click_url` (string) — When a user returns to the browser after going to the app, take them to this URL. iOS only; Android coming soon.
- `data.$afterclick_desktop_url` (boolean) — When a user on desktop returns to the desktop browser after going to the desktop app, take them to this URL.
- `data.$canonical_url` (string) — This is the URL set against the identifier.
- `data.$deeplink_path` (string) — The value of the deep link path that you would like us to append to your URI.
- `data.$og_title` (string) — Set the title of the deep link as it will be seen in social media displays.
- `data.$og_description` (string) — Set the description of the deep link as it will be seen in social media displays.
- `data.$og_image_url` (string) — Set the image of the deep link as it will be seen in social media displays.
- `data.~id` (string) — The unique ID for the link.
- `data.~creation_source` (string) — The source where the Branch Link was created, represented by a number.
- `data.~tags` (array of string) — A free-form entry with unlimited values of type `string`. Use it to organize your link data with labels that don't fit under other keys.
- `data.~campaign` (string) — The name of the campaign associated with your link.
- `data.~campaign_id` (string) — The ID for the campaign associated with your link.
- `data.~channel` (string) — The route that your link reaches your users by.
- `data.~feature` (string) — The feature of your app associated with the link.
- `data.~stage` (string) — The progress or category of a user when the link was generated.
- `data.~marketing` (string) — Pass `"true"` to indicate this is a Quick Link.
- `data.~link_type` (string) — The Branch Link type (Deep, Quick, or Ad).
- `data.~agency_id` (string) — The ID of the relevant [agency](https://help.branch.io/account-hub/agency-profile.md).
- `data.~quick_link_template_id` (string) — The ID of the [Branch Quick Link template](https://help.branch.io/marketer-hub/link-templates.md#overview) you're using.
- `data.~ad_link_template_id` (string) — The ID of the [ad link template](https://help.branch.io/marketer-hub/testing-ads-campaign-setup.md#_2-create-a-branch-link) you're using.
- `data.~advertising_partner_name` (string) — The name of the relevant advertising partner.
- `data.~creative_name` (string) — The creative name specified for the last attributed touch.
- `data.~customer_placement` (string) — The customer-specified placement of the last touch. This is the actual app or website that the ad appears on in display campaigns.
- `data.~ad_set_name` (string) — The ad set name specified for the last attributed touch.
- `data.~ad_set_id` (string) — The ad set ID specified for the last attributed touch.
- `data.~branch_ad_format` (string) — Possible values are `"Cross-Platform Display"` or `"App Only"`.
- `data.~secondary_ad_format` (string) — Specify an ad format to help organize your analytics and make it faster to set up web fallbacks for your link.
- `duration` (integer) — In seconds. Only set this key if you want to override the match duration for deep link matching. This is the time that Branch allows a click to remain outstanding and be eligible to be matched with a new app session. The default is 7200 (2 hours).
- `feature` (string) — Deep link feature set.
- `stage` (string)
- `tags` (array of string) — Social media tags.
- `type` (integer) — Set type to 1 to make the URL a one-time-use URL. It won't deep link after 1 successful deep link. Default is 0, the standard Branch Link behavior used by our SDKs.

### Responses

- `200` — Success.
- `400` — Bad request—typically an invalid or missing credential or parameter.
- `429` — Rate limit exceeded—reduce request frequency and retry.

### Returns

Success. Returns `400` and `429` on failure — see the response panel for the error shape.

### Example request

```bash
curl 'https://api2.branch.io/v1/url/bulk/key_live_xxxx' \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '[
    {
      "channel": "facebook",
      "feature": "onboarding",
      "campaign": "new product",
      "stage": "new user",
      "tags": [
        "one"
      ],
      "data": {
        "$canonical_url": "http://www.example.com/content/123",
        "$deeplink_path": "radio/station/456",
        "$og_title": "Deep Link title.",
        "$og_description": "Deep Link description.",
        "$og_image_url": "https://cdn.branch.io/example/og-image.png",
        "~id": "00000001",
        "~creation_source": "1",
        "~tags": [
          "tag_one"
        ],
        "~campaign": "fall_feature_launch",
        "~campaign_id": "data_campaign_0000",
        "~channel": "LinkedIn",
        "~feature": "referral",
        "~stage": "level 5",
        "~link_type": "Quick",
        "~agency_id": "1111",
        "~quick_link_template_id": "1010",
        "~ad_link_template_id": "0101",
        "~advertising_partner_name": "Facebook",
        "~creative_name": "fall_feature_facebook",
        "~customer_placement": "company_ios_app",
        "~ad_set_name": "ad_group_name",
        "~ad_set_id": "ad_group_id",
        "~branch_ad_format": "Cross-Platform Display",
        "~secondary_ad_format": "App Only"
      },
      "duration": 7200
    }
  ]'
```

### Example responses

`200`

```json
[
  {
    "url": "https://example.app.link/abCdEf123"
  }
]
```

`400`

```json
{
  "error": {
    "message": "Authentication failed.",
    "code": 400
  }
}
```

`429`

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit reached."
  }
}
```

## Update deep link

`PUT https://api2.branch.io/v1/url`

Updates an existing Branch Link.

### Parameters

- `branch_key` (string, required) — The Branch Key of the originating app obtained in your [Account Settings](https://help.branch.io/account-hub/profile-settings.md).
- `branch_secret` (string, required) — The Branch Secret of the originating app obtained in your [Account Settings](https://help.branch.io/account-hub/profile-settings.md).
- `url` (string, query, required) — The full URL of the deep link to update.
- `campaign` (string) — The name of the campaign associated with your link.
- `channel` (string) — The route that your link reaches your users by.
- `data` (object)
- `data.$fallback_url` (string) — Change the redirect endpoint for all platforms, so you don't have to enable it by platform. Note that Branch will forward all robots to this URL, which overrides any OG tags entered in the link. System-wide Default URL (set in Link Settings).
- `data.$fallback_url_xx` (string) — Change the redirect endpoint for all platforms based on a lowercase Alpha-2 country code.
- `data.$desktop_url` (string) — Redirect URL for desktop devices. Mobile users will default to the app store.
- `data.$ios_url` (string) — Change the redirect endpoint for the iOS App Store page for your app (set in Link Settings).
- `data.$ios_url_xx` (string) — Change the redirect endpoint for iOS based on a lowercase Alpha-2 country code. For example, $ios_url_de="..." would redirect Germany deep link clicks.
- `data.$ipad_url` (string) — Change the redirect endpoint for iPads. Falls back to the $ios_url value when unset.
- `data.$android_url` (string) — Change the redirect endpoint for the Android Play Store page for your app (set in Link Settings).
- `data.$android_url_xx` (string) — Change the redirect endpoint for Android based on a lowercase Alpha-2 country code. For example, $android_url_de="..." would redirect Germany deep link clicks.
- `data.$samsung_url` (string) — Redirect to the Samsung Galaxy Store on Samsung devices. Only link-level control. The format should be http://www.samsungapps.com/appquery/appDetail.as?appId={PACKAGE_NAME}
- `data.$huawei_url` (string) — Redirect to the Huawei App Gallery on Huawei devices. Only link-level control. The format should be https://appgallery.huawei.com/app/{HUAWEI_APP_GALLERY_ID}
- `data.$windows_phone_url` (string) — Change the redirect endpoint for Windows OS. Windows Phone default URL (set in Link Settings).
- `data.$blackberry_url` (string) — Change the redirect endpoint for BlackBerry OS. BlackBerry default URL (set in Link Settings). Deep link channel.
- `data.$fire_url` (string) — Change the redirect endpoint for Amazon Fire OS. Fire default URL (set in Link Settings).
- `data.$ios_wechat_url` (string) — Change the redirect endpoint for WeChat on iOS devices. $ios_url value.
- `data.$android_wechat_url` (string) — Change the redirect endpoint for WeChat on Android devices. $android_url value.
- `data.$web_only` (boolean) — Force opening the $fallback_url instead of the app.
- `data.$desktop_web_only` (boolean) — Force opening the $windows_desktop_url, $mac_desktop_url, $desktop_url, or $fallback_url in this order of precedence instead of the app.
- `data.$mobile_web_only` (boolean) — Force opening the $ios_url, $android_url, or $fallback_url in this order of precedence instead of the app.
- `data.$after_click_url` (string) — When a user returns to the browser after going to the app, take them to this URL. iOS only; Android coming soon.
- `data.$afterclick_desktop_url` (boolean) — When a user on desktop returns to the desktop browser after going to the desktop app, take them to this URL.
- `data.$canonical_url` (string) — This is the URL set against the identifier.
- `data.$deeplink_path` (string) — The value of the deep link path that you would like us to append to your URI.
- `data.$og_title` (string) — Set the title of the deep link as it will be seen in social media displays.
- `data.$og_description` (string) — Set the description of the deep link as it will be seen in social media displays.
- `data.$og_image_url` (string) — Set the image of the deep link as it will be seen in social media displays.
- `data.~id` (string) — The unique ID for the link.
- `data.~creation_source` (string) — The source where the Branch Link was created, represented by a number.
- `data.~tags` (array of string) — A free-form entry with unlimited values of type `string`. Use it to organize your link data with labels that don't fit under other keys.
- `data.~campaign` (string) — The name of the campaign associated with your link.
- `data.~campaign_id` (string) — The ID for the campaign associated with your link.
- `data.~channel` (string) — The route that your link reaches your users by.
- `data.~feature` (string) — The feature of your app associated with the link.
- `data.~stage` (string) — The progress or category of a user when the link was generated.
- `data.~marketing` (string) — Pass `"true"` to indicate this is a Quick Link.
- `data.~link_type` (string) — The Branch Link type (Deep, Quick, or Ad).
- `data.~agency_id` (string) — The ID of the relevant [agency](https://help.branch.io/account-hub/agency-profile.md).
- `data.~quick_link_template_id` (string) — The ID of the [Branch Quick Link template](https://help.branch.io/marketer-hub/link-templates.md#overview) you're using.
- `data.~ad_link_template_id` (string) — The ID of the [ad link template](https://help.branch.io/marketer-hub/testing-ads-campaign-setup.md#_2-create-a-branch-link) you're using.
- `data.~advertising_partner_name` (string) — The name of the relevant advertising partner.
- `data.~creative_name` (string) — The creative name specified for the last attributed touch.
- `data.~customer_placement` (string) — The customer-specified placement of the last touch. This is the actual app or website that the ad appears on in display campaigns.
- `data.~ad_set_name` (string) — The ad set name specified for the last attributed touch.
- `data.~ad_set_id` (string) — The ad set ID specified for the last attributed touch.
- `data.~branch_ad_format` (string) — Possible values are `"Cross-Platform Display"` or `"App Only"`.
- `data.~secondary_ad_format` (string) — Specify an ad format to help organize your analytics and make it faster to set up web fallbacks for your link.
- `duration` (integer) — In seconds. Only set this key if you want to override the match duration for deep link matching. This is the time that Branch allows a click to remain outstanding and be eligible to be matched with a new app session. The default is 7200 (2 hours).
- `feature` (string) — The feature of your app associated with the link.

### Responses

- `200` — Deep link updated successfully.
- `400` — Bad request—typically an invalid or missing credential or parameter.
- `429` — Rate limit exceeded—reduce request frequency and retry.

### Returns

Deep link updated successfully. Returns `400` and `429` on failure — see the response panel for the error shape.

### Example request

```bash
curl 'https://api2.branch.io/v1/url?url=https%3A%2F%2Fexample.app.link%2FabCdEf123' \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
    "branch_key": "key_live_xxxx",
    "branch_secret": "secret_live_xxxx",
    "data": {
      "$canonical_url": "http://www.example.com/content/123",
      "$deeplink_path": "radio/station/456",
      "$og_title": "Deep Link title.",
      "$og_description": "Deep Link description.",
      "$og_image_url": "https://cdn.branch.io/example/og-image.png",
      "~id": "00000001",
      "~creation_source": "1",
      "~tags": [
        "tag_one"
      ],
      "~campaign": "fall_feature_launch",
      "~campaign_id": "data_campaign_0000",
      "~channel": "LinkedIn",
      "~feature": "referral",
      "~stage": "level 5",
      "~link_type": "Quick",
      "~agency_id": "1111",
      "~quick_link_template_id": "1010",
      "~ad_link_template_id": "0101",
      "~advertising_partner_name": "Facebook",
      "~creative_name": "fall_feature_facebook",
      "~customer_placement": "company_ios_app",
      "~ad_set_name": "ad_group_name",
      "~ad_set_id": "ad_group_id",
      "~branch_ad_format": "Cross-Platform Display",
      "~secondary_ad_format": "App Only"
    },
    "channel": "Facebook",
    "feature": "Onboarding",
    "campaign": "New Product",
    "duration": 7200
  }'
```

### Example responses

`200`

```json
{
  "url": "https://example.app.link/abCdEf123",
  "updated": true
}
```

`400`

```json
{
  "error": {
    "message": "Authentication failed.",
    "code": 400
  }
}
```

`429`

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit reached."
  }
}
```

## Delete deep link

`DELETE https://api2.branch.io/v1/url`

This endpoint deletes an existing deep link.

**Note:** This endpoint requires both **App-Level** and **Sensitive Data** permissions.
You must pass an Access Token (API key) to use the DELETE method. Otherwise, you may see an Unauthorized User error. See the Deep Linking API Overview's Authentication
section for details.

### Parameters

- `Access-Token` (string, header, required) — The Branch Access Token of the originating app obtained in your [Account Settings](https://help.branch.io/account-hub/profile-settings.md). 
- `app_id` (string, query, required) — The Branch app_id against the associated deep link URL. 
- `url` (string, query, required) — The deep link URL against which the details are to be fetched. 

### Responses

- `200` — Success.
- `400` — Bad request—typically an invalid or missing credential or parameter.
- `429` — Rate limit exceeded—reduce request frequency and retry.

### Returns

Success. Returns `400` and `429` on failure — see the response panel for the error shape.

### Example request

```bash
curl 'https://api2.branch.io/v1/url?url=https%3A%2F%2Fexample.app.link%2FabCdEf123&app_id=123456789012345680' \
  --request DELETE \
  --header 'Access-Token: api_app_xxxx'
```

### Example responses

`200`

```json
{
  "url": "https://example.app.link/abCdEf123",
  "deleted": true
}
```

`400`

```json
{
  "error": {
    "message": "Authentication failed.",
    "code": 400
  }
}
```

`429`

```json
{
  "error": {
    "code": 429,
    "message": "Rate limit reached."
  }
}
```
