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

# Update referral link

> Update an existing referral link

## Endpoint

```
PUT https://api.partnero.com/v1/partner_referral_links/{id}
```

## Path Parameters

| Parameter | Type   | Required | Description     |
| --------- | ------ | -------- | --------------- |
| `id`      | string | Yes      | Current link ID |

## Request Body

| Parameter | Type   | Required | Description          |
| --------- | ------ | -------- | -------------------- |
| `key`     | string | Yes      | New key for the link |

## Request

```bash cURL theme={null}
curl --location --request PUT 'https://api.partnero.com/v1/partner_referral_links/ref_456' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "ref_789"
  }'
```

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "ref_789",
      "key": "ref_789",
      "url": "https://partnero.com?aff=ref_789",
      "default": false,
      "is_additional": false,
      "direct_tracking": false,
      "direct_tracking_redirect": false,
      "direct_tracking_redirect_url": null
    },
    "status": 1
  }
  ```
</ResponseExample>
