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

# Update Link

> Update an existing link's properties

Update properties of an existing link including URL, password, and expiration settings.

**Request:**

```bash cURL theme={null}
curl -X PUT 'https://api.taap.it/v1/links/link_987654321' \
  -H 'Authorization: Bearer taapit_your_api_key_here' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Updated Marketing Link",
    "description": "Updated description for campaign",
    "original_url": "https://example.com/updated-url",
    "code": "updated-code",
    "app": "UpdatedApp",
    "app_logo": "https://example.com/new-logo.png",
    "android_link": "updatedapp://open?url=https://example.com",
    "ios_link": "updatedapp://open?url=https://example.com",
    "windows_link": "ms-windows-store://pdp/?productid=9NBLGGH987654",
    "macos_link": "macappstore://itunes.apple.com/app/updatedapp/id987654321",
    "whatsapp_message": "Check out this updated link!",
    "metadata": {
      "title": "Updated Product",
      "description": "Check out our updated product",
      "favicon": "https://example.com/new-favicon.ico",
      "social_image": "https://example.com/new-social-image.jpg"
    },
    "qr_code_options": {
      "size": 250,
      "color": "#FF0000",
      "background_color": "#FFFFFF",
      "logo": "https://example.com/new-logo.png",
      "logo_size": 60,
      "error_correction_level": "H"
    },
    "utm_name": "updated_campaign",
    "utm_source": "social",
    "utm_medium": "facebook",
    "utm_campaign": "updated2024",
    "utm_term": "updated_marketing",
    "utm_content": "updated_cta_button",
    "utm_template_id": "template_456",
    "referrer": "https://facebook.com",
    "password": "newpassword123",
    "password_description": "Enter new password to access link",
    "excluded_countries": [
      {
        "code": "CA",
        "label": "Canada",
        "phone": "+1",
        "suggested": false,
        "lang": "en",
        "continent": "North America"
      }
    ],
    "has_public_stat": false,
    "enable_conversion_tracking": true,
    "is_archived": false,
    "expiration_date": "2024-06-30T23:59:59Z",
    "expiration_click_count": 500,
    "pixel_id": "pixel_789123456"
  }'
```

**Response:**

```json theme={null}
{
  "id": "link_987654321",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T11:00:00Z",
  "project_id": "project_123456789",
  "domain_id": "domain_987654321",
  "pixel_id": "pixel_789123456",
  "original_url": "https://example.com/updated-url",
  "name": "Updated Marketing Link",
  "description": "Updated description for campaign",
  "code": "updated-code",
  "app": "UpdatedApp",
  "app_logo": "https://example.com/new-logo.png",
  "android_link": "updatedapp://open?url=https://example.com",
  "ios_link": "updatedapp://open?url=https://example.com",
  "windows_link": "ms-windows-store://pdp/?productid=9NBLGGH987654",
  "macos_link": "macappstore://itunes.apple.com/app/updatedapp/id987654321",
  "whatsapp_message": "Check out this updated link!",
  "metadata": {
    "title": "Updated Product",
    "description": "Check out our updated product",
    "favicon": "https://example.com/new-favicon.ico",
    "social_image": "https://example.com/new-social-image.jpg"
  },
  "qr_code_options": {
    "size": 250,
    "color": "#FF0000",
    "background_color": "#FFFFFF",
    "logo": "https://example.com/new-logo.png",
    "logo_size": 60,
    "error_correction_level": "H"
  },
  "utm_name": "updated_campaign",
  "utm_source": "social",
  "utm_medium": "facebook",
  "utm_campaign": "updated2024",
  "utm_term": "updated_marketing",
  "utm_content": "updated_cta_button",
  "utm_template_id": "template_456",
  "referrer": "https://facebook.com",
  "password": "newpassword123",
  "password_description": "Enter new password to access link",
  "excluded_countries": [
    {
      "code": "CA",
      "label": "Canada",
      "phone": "+1",
      "suggested": false,
      "lang": "en",
      "continent": "North America"
    }
  ],
  "has_public_stat": false,
  "enable_conversion_tracking": true,
  "is_archived": false,
  "expiration_date": "2024-06-30T23:59:59Z",
  "expiration_click_count": 500,
  "clicks": 42
}
```

## Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token for API authentication. Format: `Bearer YOUR_API_KEY`
</ParamField>

## Path Parameters

<ParamField path="link_id" type="string" required>
  Unique identifier for the link
</ParamField>

## Request Body

All parameters are optional for updates. Only include the fields you want to update.

### Core Parameters

<ParamField body="name" type="string">
  Updated name for the link
</ParamField>

<ParamField body="description" type="string">
  Updated description for the link
</ParamField>

<ParamField body="original_url" type="string">
  Updated URL to be shortened. Supports http, https, mailto, tel, sms, whatsapp, tg, skype schemes.
</ParamField>

<ParamField body="code" type="string">
  Updated short code for the link
</ParamField>

<ParamField body="pixel_id" type="string">
  Updated tracking pixel ID to associate with this link
</ParamField>

<ParamField body="project_id" type="string">
  Updated project ID to associate with this link
</ParamField>

### Deep Linking Parameters

<ParamField body="app" type="string">
  Updated name of the mobile app for deep linking
</ParamField>

<ParamField body="app_logo" type="string">
  Updated URL to the app logo image
</ParamField>

<ParamField body="android_link" type="string">
  Updated Android deep link URL (e.g., myapp\://open?url=...)
</ParamField>

<ParamField body="ios_link" type="string">
  Updated iOS deep link URL (e.g., myapp\://open?url=...)
</ParamField>

<ParamField body="windows_link" type="string">
  Updated Windows deep link URL (e.g., ms-windows-store://...)
</ParamField>

<ParamField body="macos_link" type="string">
  Updated macOS deep link URL (e.g., macappstore://...)
</ParamField>

<ParamField body="whatsapp_message" type="string">
  Updated pre-filled message for WhatsApp sharing
</ParamField>

### Metadata Parameters

<ParamField body="metadata" type="object">
  Updated link metadata for website previews

  <Expandable title="Metadata properties">
    <ParamField body="title" type="string">
      Updated page title for link previews
    </ParamField>

    <ParamField body="description" type="string">
      Updated page description for link previews
    </ParamField>

    <ParamField body="favicon" type="string">
      Updated URL to favicon image
    </ParamField>

    <ParamField body="social_image" type="string">
      Updated URL to social media preview image
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="qr_code_options" type="object">
  Updated QR code generation options

  <Expandable title="QR Code options">
    <ParamField body="size" type="integer">
      Updated QR code size in pixels
    </ParamField>

    <ParamField body="color" type="string">
      Updated QR code color (hex format, e.g., #000000)
    </ParamField>

    <ParamField body="background_color" type="string">
      Updated QR code background color (hex format, e.g., #ffffff)
    </ParamField>

    <ParamField body="logo" type="string">
      Updated URL to logo image to embed in QR code
    </ParamField>

    <ParamField body="logo_size" type="integer">
      Updated logo size in pixels
    </ParamField>

    <ParamField body="error_correction_level" type="string">
      Updated error correction level (L, M, Q, H)
    </ParamField>
  </Expandable>
</ParamField>

### UTM Parameters

<ParamField body="utm_name" type="string">
  Updated UTM campaign name
</ParamField>

<ParamField body="utm_source" type="string">
  Updated UTM source (e.g., email, social, google)
</ParamField>

<ParamField body="utm_medium" type="string">
  Updated UTM medium (e.g., newsletter, post, cpc)
</ParamField>

<ParamField body="utm_campaign" type="string">
  Updated UTM campaign identifier
</ParamField>

<ParamField body="utm_term" type="string">
  Updated UTM term (keywords)
</ParamField>

<ParamField body="utm_content" type="string">
  Updated UTM content (e.g., cta\_button, banner)
</ParamField>

<ParamField body="utm_template_id" type="string">
  Updated UTM template identifier
</ParamField>

<ParamField body="referrer" type="string">
  Updated referrer URL
</ParamField>

### Security & Access Parameters

<ParamField body="password" type="string">
  Updated password to protect the link (requires plan feature)
</ParamField>

<ParamField body="password_description" type="string">
  Updated description shown when password is required
</ParamField>

<ParamField body="excluded_countries" type="array">
  Updated array of countries to exclude from accessing the link

  <Expandable title="Excluded country properties">
    <ParamField body="code" type="string" required>
      Country code (ISO 3166-1 alpha-2)
    </ParamField>

    <ParamField body="label" type="string" required>
      Country name
    </ParamField>

    <ParamField body="phone" type="string" required>
      Country phone code
    </ParamField>

    <ParamField body="suggested" type="boolean">
      Whether this country is suggested for exclusion
    </ParamField>

    <ParamField body="lang" type="string">
      Primary language code
    </ParamField>

    <ParamField body="continent" type="string">
      Continent name
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="has_public_stat" type="boolean">
  Updated setting for whether link statistics are publicly accessible
</ParamField>

### Conversion Tracking Parameters

<ParamField body="enable_conversion_tracking" type="boolean">
  Updated setting for whether conversion tracking is enabled on this link
</ParamField>

### Status Parameters

<ParamField body="is_archived" type="boolean">
  Updated archive status of the link
</ParamField>

### Expiration Parameters

<ParamField body="expiration_date" type="string">
  Updated ISO 8601 datetime when link expires (requires plan feature)
</ParamField>

<ParamField body="expiration_click_count" type="integer">
  Updated maximum number of clicks before link expires (requires plan feature)
</ParamField>
