> ## 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.

<Card title="Try API Request" icon="rectangle-api" horizontal href="https://www.postman.com/airbridge-engineering/workspace/airbridge-api/request/22395869-fd5cd6d3-1056-4214-973d-60cbd2ea1b2c" />

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

<h2 id="update-tracking-links-routing-request">
  Request
</h2>

***

<h3 id="update-tracking-links-routing-headers">
  Headers
</h3>

<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>

<h3 id="update-tracking-links-routing-path-params">
  Path Params
</h3>

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

<h3 id="update-tracking-links-routing-body-params">
  Body Params
</h3>

<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>
  </Expandable>
</ParamField>

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

  <Expandable title="child attributes">
    <ParamField body="fallbackPaths.android" type="enum">
      Redirect android user to `google-play`, `airpage` or http(s) url

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

    <ParamField body="fallbackPaths.ios" type="enum">
      Redirect iOS user to `itunes-appstore`, `airpage` or http(s) url

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

    <ParamField body="fallbackPaths.desktop" type="enum">
      Redirect desktop user to `google-play`, `itunes-appstore` or http(s) url

      | Value             | Description                       |
      | ----------------- | --------------------------------- |
      | `google-play`     | Landing in the Google Play Store. |
      | `itunes-appstore` | Landing in the App Store.         |
      | `airpage`         | Landing in the airpage.           |
      | `{http_url}`      | Landing in the 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>

<h2 id="update-tracking-links-routing-response">
  Response
</h2>

***

### 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>
