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

# Update Link

> Update an existing short link's destination, title, or metadata

## Request

### Headers

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

### Path Parameters

<ParamField path="identifier" type="string" required>
  The link's slug (e.g., `my-link`) or system domain composite (e.g., `mybouncy.link__my-link`).

  Use the `slug` field returned by [GET /v1/links](/api-reference/links/list-links).
</ParamField>

### Body

<ParamField body="destination" type="string">
  New destination URL where the short link should redirect. Must be a valid HTTP or HTTPS URL.

  **Example:** `https://example.com/new-page`
</ParamField>

<ParamField body="title" type="string">
  Updated title for SEO and social media sharing

  **Example:** `Updated Summer Sale 2026`
</ParamField>

<ParamField body="description" type="string">
  Updated description for SEO and social media cards

  **Example:** `Now 60% off everything!`
</ParamField>

<ParamField body="tags" type="array">
  Updated array of tags

  **Example:** `["marketing", "summer", "60-percent-off"]`
</ParamField>

<ParamField body="googleTags" type="object">
  Google Analytics tracking configuration
</ParamField>

<ParamField body="metaPixel" type="object">
  Meta Pixel tracking configuration
</ParamField>

<ParamField body="seo" type="object">
  Full SEO metadata object override (ignored if `title` or `description` are also provided)
</ParamField>

<ParamField body="behavior" type="string">
  Redirect behavior. One of: `conservative`, `aggressive`, `basic`, `non-meta`, `experimental`, `experimental2`
</ParamField>

<ParamField body="geoRules" type="array">
  Array of geographic filtering rules
</ParamField>

<ParamField body="languageRules" type="array">
  Array of language-based filtering rules
</ParamField>

<ParamField body="alternateBackUrl" type="string">
  Traffic recovery URL for when the primary destination is unavailable
</ParamField>

<Note>
  You cannot update the `slug` or `domain` after creation. Create a new link if you need a different slug.
</Note>

## Response

<ResponseField name="success" type="boolean">
  Whether the operation succeeded
</ResponseField>

<ResponseField name="id" type="string">
  Unique identifier for the link
</ResponseField>

<ResponseField name="message" type="string">
  Success message
</ResponseField>

<ResponseField name="updatedFields" type="array">
  List of fields that were updated
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://api.bouncy.ai/v1/links/my-slug \
    -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "destination": "https://example.com/updated-page",
      "title": "Updated Title",
      "tags": ["updated", "marketing"]
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.bouncy.ai/v1/links/my-slug',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        destination: 'https://example.com/updated-page',
        title: 'Updated Title',
        tags: ['updated', 'marketing']
      })
    }
  );

  const result = await response.json();
  console.log(result.message);
  ```

  ```python Python theme={null}
  import requests

  response = requests.put(
      'https://api.bouncy.ai/v1/links/my-slug',
      headers={
          'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'destination': 'https://example.com/updated-page',
          'title': 'Updated Title',
          'tags': ['updated', 'marketing']
      }
  )

  result = response.json()
  print(result['message'])
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "id": "my-slug",
    "message": "Link updated successfully",
    "updatedFields": ["destination", "title", "tags"]
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "Not Found",
    "message": "Deeplink not found"
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "Bad Request",
    "message": "The destination URL must be a valid HTTP or HTTPS URL",
    "field": "destination"
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "error": "Forbidden",
    "message": "You do not have permission to modify this deeplink"
  }
  ```
</ResponseExample>
