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

# Clone a payment link

` POST /payment-links/{id}/duplicate `

Clone a payment link

## Servers

- ` https://platform-api.anyspend.com/api/v1 ` — Current server

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` apiKeyBearer `: ` http `

  - HTTP scheme: ` bearer `

  - API key passed as Bearer token. Keys start with `asp_`.

### Alternative 2

- ` apiKeyHeader `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key passed via X-API-Key header.

## Parameters

### ` id ` (path, required)

- ` value `: type ` string `

## Responses

### ` 201 ` — Cloned payment link

## Request examples

### cURL

```curl
curl -X POST 'https://platform-api.anyspend.com/api/v1/payment-links/string/duplicate' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://platform-api.anyspend.com/api/v1/payment-links/string/duplicate', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

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

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://platform-api.anyspend.com/api/v1/payment-links/string/duplicate', headers=headers)
print(response.json())
```