> ## Documentation Index
> Fetch the complete documentation index at: https://help.airbridge.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Tracking Link's Routing

Supported HTTP Methods: PUT, PATCH

Update the destination and fallback path for the Tracking Link.

```text PATCH theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
https://api.airbridge.io/v1/tracking-links/{id}/routing
```

## Request

***

### Headers

<ParamField header="Accept-Language" type="string">
  You can specify the language to use for API requests and responses. It follows the ISO-639-1 format.
</ParamField>

<ParamField header="Content-Type" type="string">
  Represents the media type of the resource. Defaults to `application/json`.
</ParamField>

<ParamField header="Authorization" type="string">
  The key value to use for API requests. Instructions for getting API keys are in "[how to generate API Keys](/en/references/introduction#authorization)".
</ParamField>

### Path Params

<ParamField path="id" type="string" required>
  The ID of the Tracking Link.
</ParamField>

### Body Params

<ParamField body="idType" type="string">
  The format of the tracking link identifier. The default setting is `id`

  \- `id`: The identifier of a generic tracking link. It can be obtained via the list get API.
  \- `shortId`: Short link ID. A short link is a tracking link in short link format.
  \- `trackingTemplateId`: ID of the tracking link template.
</ParamField>

<ParamField body="deeplinkUrl" type="string">
  Configure the Deeplink URL for redirect.

  If `deeplinkUrl` is missing or null, the deeplink setting is not configured.

  Example format: **`URLScheme://path?key=value`**

  If an invalid deeplinkUrl is used, the deep link may not work properly and **could result in unexpected behavior or issues.**
</ParamField>

<ParamField body="deeplinkOption" type="object">
  <Expandable title="child attributes">
    <ParamField body="deeplinkOption.showAlertForInitialDeeplinkingIssue" type="boolean">
      Stopover page

      true : active

      false : inactive
    </ParamField>

    <ParamField body="deeplinkOption.useCustomAirpage" type="boolean">
      Whether to use the custom Airpage.

      true : Use the custom Airpage for the user's browser language, or the default custom Airpage if there is no page for that language.

      false : Do not use the custom Airpage.

      If not passed, the app's default custom Airpage setting is applied.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="fallbackPaths" type="object">
  Configure the redirect path by platform when deep linking doesn't redirect as intended.

  Only https URLs are supported when you enter a URL directly.

  <Expandable title="child attributes">
    <ParamField body="fallbackPaths.android" type="enum">
      Redirect android user to `google-play` or an https URL

      | Value | Description |
      | - | - |
      | `google-play` | Landing in the Google Play Store. |
      | `{https_url}` | Landing in the `https` URL. |
    </ParamField>

    <ParamField body="fallbackPaths.ios" type="enum">
      Redirect iOS user to `itunes-appstore` or an https URL

      | Value | Description |
      | - | - |
      | `itunes-appstore` | Landing in the App Store. |
      | `{https_url}` | Landing in the `https` URL. |
    </ParamField>

    <ParamField body="fallbackPaths.desktop" type="enum">
      Redirect desktop user to `google-play`, `itunes-appstore` or an https URL

      | Value | Description |
      | - | - |
      | `google-play` | Landing in the Google Play Store. |
      | `itunes-appstore` | Landing in the App Store. |
      | `{https_url}` | Landing in the `https` URL. |
    </ParamField>

    <ParamField body="fallbackPaths.option" type="object">
      Set option of `fallback`.

      <Expandable title="child attributes">
        <ParamField body="fallbackPaths.option.iosCustomProductPageId" type="string">
          The ppid from the Custom Product Page in the Apple App Store.
        </ParamField>

        <ParamField body="fallbackPaths.option.googlePlayCustomStoreListing" type="string">
          The Custom Store Listing listing value for the Google Play Store.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```shellscript Request theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  curl -X PATCH 'https://api.airbridge.io/v1/tracking-links/10000/routing' \
    -H 'Accept-Language: ko' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
    -d '{
    "idType": "id",
    "deeplinkOption": {
      "showAlertForInitialDeeplinkingIssue": true
    }
  }'
  ```
</RequestExample>

## Response

***

### 200

### 404

There is an error in the field provided, or there is no such resource.

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {}
  ```

  ```json 404 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {
    "type": "about:blank",
    "title": "Not Found",
    "detail": "Resource not found.",
    "status": 404,
    "traceId": "1-6450a21d-2b02e4d533589b625d875399"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.