---
title: "Create Client Template"
method: POST
path: "/api/client_template"
tags: ["Client Template"]
---

# Create Client Template

`POST /api/client_template`

## Request body

- ClientTemplateCreate
  - `name` string, required
  - `template_type` 'clash_subscription' | 'xray_subscription' | 'singbox_subscription' | 'user_agent' | 'grpc_user_agent', required
  - `content` string, required
  - `is_default` boolean

## Response `201`

Successful Response

- ClientTemplateResponse
  - `id` integer, required
  - `name` string, required
  - `template_type` 'clash_subscription' | 'xray_subscription' | 'singbox_subscription' | 'user_agent' | 'grpc_user_agent', required
  - `content` string, required
  - `is_default` boolean, required
  - `is_system` boolean, required

## Other responses

- `401` — Unauthorized Error
- `403` — Forbidden Error
- `422` — Validation Error

---

[API](https://skmtc.dev/socialser/apis/pasarguardapi.md) · [All operations](https://skmtc.dev/socialser/apis/pasarguardapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/socialser/pasarguardapi/revisions/4b082bbcb6c3/schema)
