# Clone Gallery Template

> Copy a gallery template into this workspace.

Requires an API key with the `write` scope.

The copy is named `<name> (Copy)` and keeps the subject, body, type and HTML setting. A template that is published but not yet approved can only be cloned by the workspace that owns it.

## Path Parameters

<ParamField path="slug" type="string" required>The share slug from the gallery link.</ParamField>

## Response

Returns the new template with a `201` status code.

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="id" type="string">Template identifier.</ResponseField>
    <ResponseField name="name" type="string">Name, ending in `(Copy)`.</ResponseField>
    <ResponseField name="subject" type="string">Subject line.</ResponseField>
    <ResponseField name="body" type="string">Body.</ResponseField>
    <ResponseField name="category" type="string">Template type.</ResponseField>
    <ResponseField name="sendAsHtml" type="boolean">Whether the body is sent as HTML.</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601 timestamp.</ResponseField>
    <ResponseField name="updatedAt" type="string">ISO 8601 timestamp.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/templates/clone/k3Jx9aQ2mZc" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
copy = client.templates.clone("k3Jx9aQ2mZc")
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const copy = await client.templates.clone("k3Jx9aQ2mZc");
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {"id": "tpl_def456", "name": "Founder intro (Copy)", "subject": "Quick question, {{firstName}}", "body": "Hi {{firstName}}...", "category": "email", "sendAsHtml": false, "createdAt": "2026-11-04T10:00:00", "updatedAt": "2026-11-04T10:00:00"}
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `write` |
| `404` | `Template not found`: no published template has that slug, or it is not approved and belongs to another workspace |

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
