> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.templated.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Listing Templates via API

# Listing Templates via API

Retrieve your templates programmatically.

## Endpoint

```
GET https://api.templated.io/v1/templates
```

## Basic Request

```bash
curl https://api.templated.io/v1/templates \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response

```json
{
  "templates": [
    {
      "id": "abc123-def456",
      "name": "Social Media Post",
      "width": 1080,
      "height": 1080,
      "thumbnail": "https://...",
      "createdAt": "2026-01-10T10:00:00Z",
      "updatedAt": "2026-01-11T15:30:00Z"
    },
    {
      "id": "xyz789-uvw012",
      "name": "Business Card",
      "width": 1050,
      "height": 600,
      "thumbnail": "https://...",
      "createdAt": "2026-01-05T08:00:00Z",
      "updatedAt": "2026-01-05T08:00:00Z"
    }
  ]
}
```

## Query Parameters

| Parameter | Description |
| ---- |
| `folder` | Filter by folder ID |
| `external_id` | Filter by external ID (embedded editor sessions) |
| `limit` | Max results (default 100) |
| `offset` | Pagination offset |

### Example with Filters

```bash
curl "https://api.templated.io/v1/templates?folder=folder-id&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Getting Template Details

Fetch a specific template with layer information:

```
GET https://api.templated.io/v1/templates/{templateId}
```

```bash
curl https://api.templated.io/v1/templates/abc123-def456 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Response includes full layer details for integration planning.

## Use Cases

* **Build template selectors** in your app
* **Validate template IDs** before rendering
* **Sync templates** with your database
* **Show users** their available templates