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

Supported HTTP Methods: PUT, PATCH

Update the Open Graph of the tracking link.

<Card title="Try API Request" icon="rectangle-api" horizontal href="https://www.postman.com/airbridge-engineering/workspace/airbridge-api/request/22395869-7a210890-a01a-475c-b526-9616a3ea49f4" />

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

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

***

<h3 id="update-tracking-links-open-graph-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-open-graph-path-params">
  Path Params
</h3>

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

<h3 id="update-tracking-links-open-graph-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="title" type="string" required>
  `og.description` of the tracking link
</ParamField>

<ParamField body="description" type="string" required>
  `og:image` of the tracking link
</ParamField>

<ParamField body="imageUrl" type="string" required />

<ParamField body="ogTag.websiteCrawl" type="enum">
  `og:image` for tracking link

  | Value     | Description                                                                                                                                                                                                                                                                                                                                                                                 |
  | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `desktop` | When the tracking link is shared, the social media platform directly crawls the Open Graph of the desktop URL specified in fallbackPaths and uses it for the social share preview. Dynamic URLs are also supported, and any change to the Open Graph is reflected automatically from the next time the link is shared. The values set for title, description, and imageUrl will be ignored. |
</ParamField>

<ParamField body="ogTag.useDefault" type="boolean">
  Enable the Social Share preview default values set in the Airbridge dashboard.
  Note. Other parameter values in the og tag will be ignored.
</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/og-tag' \
    -H 'Accept-Language: ko' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {AIRBRIDGE-API-TOKEN}' \
    -d '{
    "idType": "id",
    "title": "30% Off Winter Apparel for 3 Days Only",
    "description": "Get great deals on apparel to keep you warm this winter",
    "imageUrl": "https://static.airbridge.io/images/2021_airbridge_og_tag.png"
  }'
  ```
</RequestExample>

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

***

### 200

### 400

The image URL used an incorrect URL type.

### 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 400 theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
  {
    "instance": [
      {
        "loc": [
          "imageUrl"
        ],
        "msg": "Invalid URL",
        "type": "validation_error"
      }
    ],
    "detail": "invalid_request",
    "status": 400,
    "title": "Bad Request",
    "traceId": "1-67c6a5e8-1f93748e2c8c732e71767b98",
    "type": "about:blank"
  }
  ```

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