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

# Quick Links API

Branch's Quick Links API is a useful tool for programmatically generating Branch Links that surface in Branch. You can create deep links at scale to support all of your campaigns while tagging the links appropriately based on channel and other analytics tags. The API also supports QR code customization during link creation, which lets you programmatically apply branding and design settings to the QR codes associated with your Short Links.

[Read the Quick Links API overview](https://help.branch.io/apidocs/quick-links/overview.md)

## Create Quick Link

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

Creates a Branch Quick Link—a managed deep link that surfaces in Branch. When you include `qr_code_settings` in the request, both the link and its customized QR code are generated instantly and become visible in Branch. Set `type=2` to surface the link in Branch. Customizing a QR code through this endpoint requires access to both the Quick Links API and the QR Code API.

### Parameters

- `branch_key` (string, required) — The Branch Key of the originating app, found on the [Settings](https://help.branch.io/account-hub/profile-settings.md) tab in Branch.
- `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. Note: If you send a POST request to this endpoint with the same alias and a matching set of other POST parameters as an existing aliased link, Branch returns the original link. This deduplication applies for 7 days after the link is created. After 7 days, a POST request using an existing alias returns an HTTP 400 error for the alias conflict, even if the rest of the parameters match. If the alias clashes and the other parameters don't match, the request returns an HTTP 400 error.
- `analytics` (object)
- `analytics.~channel` (string) — Use channel to tag the route that your link reaches users by. For example, tag links with 'Facebook' or 'LinkedIn' to help track clicks and installs through those paths separately.
- `analytics.~feature` (string) — This is the feature of your app that the link might be associated with. For example, if you had built a referral program, you would label links with the feature 'referral'.
- `analytics.~campaign` (string) — Use this field to organize the links by actual campaign. For example, if you launched a new feature or product and want to run a campaign around that.
- `analytics.~campaign_id` (string) — Use this field to organize the links by actual campaign ID. For example, if you launched a new feature or product and want to run a campaign around that.
- `analytics.~customer_campaign` (string) — The customer campaign specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~stage` (string) — Use this to categorize the progress or category of a user when the link was generated. For example, if you had an invite system accessible on level 1, level 3, and 5, you could differentiate links generated at each level with this parameter.
- `analytics.~tags` (array of string) — A free-form entry with unlimited values ['string']. Use it to organize your link data with labels that don't fit under other keys.
- `analytics.~secondary_publisher` (string) — Secondary publisher specified for the last attributed touch. Passed by the ad network.
- `analytics.~customer_secondary_publisher` (string) — The ID of the secondary publisher specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~creative_name` (string) — The creative name specified for the last attributed touch.
- `analytics.~creative_id` (string) — The creative ID specified for the last attributed touch.
- `analytics.~ad_set_name` (string) — The ad set name specified for the last attributed touch.
- `analytics.~ad_set_id` (string) — The ad set ID specified for the last attributed touch.
- `analytics.~customer_ad_set_name` (string) — The customer ad set name specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~ad_name` (string) — The ad name specified for the last attributed touch.
- `analytics.~ad_id` (string) — The ad ID specified for the last attributed touch.
- `analytics.~customer_ad_name` (string) — The customer ad name specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~keyword` (string) — The keyword specified for the last attributed touch.
- `analytics.~keyword_id` (string) — The unique ID for the keyword of the last touch.
- `analytics.~customer_keyword` (string) — The customer keyword of the last touch. Can be specified on links by the client.
- `analytics.~placement` (string) — The placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns.
- `analytics.~placement_id` (string) — The ID of the placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns.
- `analytics.~customer_placement` (string) — The customer-specified placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns. Can be specified on links by the client.
- `analytics.~sub_site_name` (string) — Reference to the site where the ad was displayed.
- `analytics.~customer_sub_site_name` (string) — Customer reference to the site where the ad was displayed. Can be specified on links by the client.
- `campaign` (string) — Campaign name.
- `channel` (string) — Deep link channel.
- `data` (object)
- `data.$marketing_title` (string) — Set the marketing title to see the Branch Link in Branch (must also set `type` to 2).
- `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.
- `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.
- `qr_code_settings` (object) — QR code customization settings. When included, both the Short Link and its customized QR code are generated instantly. Requires type=2 to be set. This object accepts the same styling parameters as the QR Code API.
- `qr_code_settings.image_format` (enum) — The output image format that could be either JPEG or PNG. One of `png`, `jpeg`, `jpg`.
- `qr_code_settings.center_logo_url` (string) — URL to the image you want as a center logo, for example, "https://cdn.branch.io/branch-assets/00000000-og_image.png".
- `qr_code_settings.width` (integer) — Output size of the QR code image. Min 300px. Max 2000px. (Only applicable to JPEG/PNG.)
- `qr_code_settings.margin` (integer) — The number of pixels you want for the margin. Min 1px. Max 20px.
- `qr_code_settings.code_color` (string) — Hex color value of the QR code itself (see https://htmlcolorcodes.com/).
- `qr_code_settings.background_color` (string) — Hex color value of the background of the QR code itself (see https://htmlcolorcodes.com/).
- `qr_code_settings.code_pattern` (enum) — QR code pattern style: 1 = standard, 2 = squares, 3 = circles, 4 = triangles, 5 = diamonds, 6 = hexagons, 7 = octagons. One of `1`, `2`, `3`, `4`, `5`, `6`, `7`.
- `qr_code_settings.finder_pattern` (enum) — The finder pattern shape (top left, top right, and bottom left corners): 1 = square, 2 = rounded rectangle, 3 = circle. One of `1`, `2`, `3`.
- `qr_code_settings.finder_pattern_color` (string) — Hex color value of the finder pattern (see https://htmlcolorcodes.com/).
- `qr_code_settings.background_image_url` (string) — URL to an image to be used as the background behind the QR code.
- `qr_code_settings.code_pattern_url` (string) — Direct link to an image to be used as the code pattern itself on the QR code.
- `qr_code_settings.finder_eye_color` (string) — Hex color value of the finder eye (see https://htmlcolorcodes.com/).
- `qr_code_settings.code_shape` (integer) — Shape of the QR code modules.
- `stage` (string)
- `tags` (array of string) — Social media tags.
- `type` (integer) — Set type to 2 to see the Branch Link in Branch (must also set `$marketing_title`). Note that type=2 is also required to customize a QR code using `qr_code_settings`.

### 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"
    ],
    "type": 2,
    "data": {
      "$marketing_title": "mytitle"
    },
    "duration": 7200,
    "qr_code_settings": {
      "image_format": "png",
      "center_logo_url": "https://cdn.branch.io/branch-assets/00000000-og_image.png",
      "width": 300,
      "margin": 1,
      "code_color": "#000000",
      "background_color": "#FFFFFF",
      "code_pattern": 1,
      "finder_pattern": 1,
      "finder_pattern_color": "#00A3D8",
      "finder_eye_color": "#00A3D8"
    }
  }'
```

### 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 Quick Links in bulk

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

Creates multiple Quick Links in a single request. Each entry in the request array follows the same shape as a single Create Quick Link payload.

### Parameters

- `branch_key` (string, path, required) — The Branch Key of the originating app, found on the Settings tab in Branch. 
- `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. Note: If you send a POST request to this endpoint with the same alias and a matching set of other POST parameters as an existing aliased link, Branch returns the original link. This deduplication applies for 7 days after the link is created. After 7 days, a POST request using an existing alias returns an HTTP 400 error for the alias conflict, even if the rest of the parameters match. If the alias clashes and the other parameters don't match, the request returns an HTTP 400 error.
- `analytics` (object)
- `analytics.~channel` (string) — Use channel to tag the route that your link reaches users by. For example, tag links with 'Facebook' or 'LinkedIn' to help track clicks and installs through those paths separately.
- `analytics.~feature` (string) — This is the feature of your app that the link might be associated with. For example, if you had built a referral program, you would label links with the feature 'referral'.
- `analytics.~campaign` (string) — Use this field to organize the links by actual campaign. For example, if you launched a new feature or product and want to run a campaign around that.
- `analytics.~campaign_id` (string) — Use this field to organize the links by actual campaign ID. For example, if you launched a new feature or product and want to run a campaign around that.
- `analytics.~customer_campaign` (string) — The customer campaign specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~stage` (string) — Use this to categorize the progress or category of a user when the link was generated. For example, if you had an invite system accessible on level 1, level 3, and 5, you could differentiate links generated at each level with this parameter.
- `analytics.~tags` (array of string) — A free-form entry with unlimited values ['string']. Use it to organize your link data with labels that don't fit under other keys.
- `analytics.~secondary_publisher` (string) — Secondary publisher specified for the last attributed touch. Passed by the ad network.
- `analytics.~customer_secondary_publisher` (string) — The ID of the secondary publisher specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~creative_name` (string) — The creative name specified for the last attributed touch.
- `analytics.~creative_id` (string) — The creative ID specified for the last attributed touch.
- `analytics.~ad_set_name` (string) — The ad set name specified for the last attributed touch.
- `analytics.~ad_set_id` (string) — The ad set ID specified for the last attributed touch.
- `analytics.~customer_ad_set_name` (string) — The customer ad set name specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~ad_name` (string) — The ad name specified for the last attributed touch.
- `analytics.~ad_id` (string) — The ad ID specified for the last attributed touch.
- `analytics.~customer_ad_name` (string) — The customer ad name specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~keyword` (string) — The keyword specified for the last attributed touch.
- `analytics.~keyword_id` (string) — The unique ID for the keyword of the last touch.
- `analytics.~customer_keyword` (string) — The customer keyword of the last touch. Can be specified on links by the client.
- `analytics.~placement` (string) — The placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns.
- `analytics.~placement_id` (string) — The ID of the placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns.
- `analytics.~customer_placement` (string) — The customer-specified placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns. Can be specified on links by the client.
- `analytics.~sub_site_name` (string) — Reference to the site where the ad was displayed.
- `analytics.~customer_sub_site_name` (string) — Customer reference to the site where the ad was displayed. Can be specified on links by the client.
- `campaign` (string) — Campaign name.
- `channel` (string) — Deep link channel.
- `data` (object)
- `data.$marketing_title` (string) — Set the marketing title to see the Branch Link in Branch (must also set `type` to 2).
- `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.
- `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 2 to see the Branch Link in Branch (must also set `$marketing_title`).

### 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"
      ],
      "type": 2,
      "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 Quick Link

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

Updates an existing Branch Quick Link. You can also update the QR code design on an existing link by including `qr_code_settings` in the request body.

### Parameters

- `branch_key` (string, required) — The Branch Key of the originating app, found on the [Settings](https://help.branch.io/account-hub/profile-settings.md) tab in Branch.
- `branch_secret` (string, required) — The Branch Secret of the originating app, found on the [Settings](https://help.branch.io/account-hub/profile-settings.md) tab in Branch.
- `url` (string, query, required) — The full URL of the Quick Link to update.
- `analytics` (object)
- `analytics.~channel` (string) — Use channel to tag the route that your link reaches users by. For example, tag links with 'Facebook' or 'LinkedIn' to help track clicks and installs through those paths separately.
- `analytics.~feature` (string) — This is the feature of your app that the link might be associated with. For example, if you had built a referral program, you would label links with the feature 'referral'.
- `analytics.~campaign` (string) — Use this field to organize the links by actual campaign. For example, if you launched a new feature or product and want to run a campaign around that.
- `analytics.~campaign_id` (string) — Use this field to organize the links by actual campaign ID. For example, if you launched a new feature or product and want to run a campaign around that.
- `analytics.~customer_campaign` (string) — The customer campaign specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~stage` (string) — Use this to categorize the progress or category of a user when the link was generated. For example, if you had an invite system accessible on level 1, level 3, and 5, you could differentiate links generated at each level with this parameter.
- `analytics.~tags` (array of string) — A free-form entry with unlimited values ['string']. Use it to organize your link data with labels that don't fit under other keys.
- `analytics.~secondary_publisher` (string) — Secondary publisher specified for the last attributed touch. Passed by the ad network.
- `analytics.~customer_secondary_publisher` (string) — The ID of the secondary publisher specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~creative_name` (string) — The creative name specified for the last attributed touch.
- `analytics.~creative_id` (string) — The creative ID specified for the last attributed touch.
- `analytics.~ad_set_name` (string) — The ad set name specified for the last attributed touch.
- `analytics.~ad_set_id` (string) — The ad set ID specified for the last attributed touch.
- `analytics.~customer_ad_set_name` (string) — The customer ad set name specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~ad_name` (string) — The ad name specified for the last attributed touch.
- `analytics.~ad_id` (string) — The ad ID specified for the last attributed touch.
- `analytics.~customer_ad_name` (string) — The customer ad name specified for the last attributed touch. Can be specified on links by the client.
- `analytics.~keyword` (string) — The keyword specified for the last attributed touch.
- `analytics.~keyword_id` (string) — The unique ID for the keyword of the last touch.
- `analytics.~customer_keyword` (string) — The customer keyword of the last touch. Can be specified on links by the client.
- `analytics.~placement` (string) — The placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns.
- `analytics.~placement_id` (string) — The ID of the placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns.
- `analytics.~customer_placement` (string) — The customer-specified placement of the last touch, as set with an analytics tag. Actual app or website the ad appears on in display campaigns. Can be specified on links by the client.
- `analytics.~sub_site_name` (string) — Reference to the site where the ad was displayed.
- `analytics.~customer_sub_site_name` (string) — Customer reference to the site where the ad was displayed. Can be specified on links by the client.
- `campaign` (string) — Campaign name.
- `channel` (string) — Deep link channel.
- `data` (object)
- `data.$marketing_title` (string) — You must set the marketing title to see the Branch Link in Branch (you must also have set `type` to 2 during creation).
- `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.
- `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.
- `qr_code_settings` (object) — QR code customization settings for updating the QR code design on an existing link. This object accepts the same styling parameters as the QR Code API.
- `qr_code_settings.image_format` (enum) — The output image format that could be either JPEG or PNG. One of `png`, `jpeg`, `jpg`.
- `qr_code_settings.center_logo_url` (string) — URL to the image you want as a center logo, for example, "https://cdn.branch.io/branch-assets/00000000-og_image.png".
- `qr_code_settings.width` (integer) — Output size of the QR code image. Min 300px. Max 2000px. (Only applicable to JPEG/PNG.)
- `qr_code_settings.margin` (integer) — The number of pixels you want for the margin. Min 1px. Max 20px.
- `qr_code_settings.code_color` (string) — Hex color value of the QR code itself (see https://htmlcolorcodes.com/).
- `qr_code_settings.background_color` (string) — Hex color value of the background of the QR code itself (see https://htmlcolorcodes.com/).
- `qr_code_settings.code_pattern` (enum) — QR code pattern style: 1 = standard, 2 = squares, 3 = circles, 4 = triangles, 5 = diamonds, 6 = hexagons, 7 = octagons. One of `1`, `2`, `3`, `4`, `5`, `6`, `7`.
- `qr_code_settings.finder_pattern` (enum) — The finder pattern shape (top left, top right, and bottom left corners): 1 = square, 2 = rounded rectangle, 3 = circle. One of `1`, `2`, `3`.
- `qr_code_settings.finder_pattern_color` (string) — Hex color value of the finder pattern (see https://htmlcolorcodes.com/).
- `qr_code_settings.background_image_url` (string) — URL to an image to be used as the background behind the QR code.
- `qr_code_settings.code_pattern_url` (string) — Direct link to an image to be used as the code pattern itself on the QR code.
- `qr_code_settings.finder_eye_color` (string) — Hex color value of the finder eye (see https://htmlcolorcodes.com/).
- `qr_code_settings.code_shape` (integer) — Shape of the QR code modules.
- `stage` (string)
- `tags` (array of string) — Social media tags.
- `type` (integer) — Set type to 2 to see the Branch Link in Branch (must also set `$marketing_title`). Note that type=2 is also required to customize a QR code using `qr_code_settings`.

### Responses

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

### Returns

Quick 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"
    },
    "channel": "facebook",
    "feature": "onboarding",
    "campaign": "new product",
    "stage": "new user",
    "tags": [
      "one"
    ],
    "type": 2,
    "duration": 7200,
    "qr_code_settings": {
      "image_format": "png",
      "center_logo_url": "https://cdn.branch.io/branch-assets/00000000-og_image.png",
      "width": 300,
      "margin": 1,
      "code_color": "#000000",
      "background_color": "#FFFFFF",
      "code_pattern": 1,
      "finder_pattern": 1,
      "finder_pattern_color": "#00A3D8",
      "finder_eye_color": "#00A3D8"
    }
  }'
```

### 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."
  }
}
```
