---
title: "Like Template"
method: POST
path: "/api/templates/{template_id}/like"
tags: ["templates"]
---

# Like Template

`POST /api/templates/{template_id}/like`

Like or unlike a template

Args:
    template_id: ID of the template to like/unlike

Returns:
    Current like status and total likes

Raises:
    HTTPException: If template not found

## Path parameters

- `template_id` string, required

## Response `200`

Successful Response

- LikeResponse — Like/unlike response
  - `liked` boolean, required — Whether the template is liked
  - `likes` integer, required — Total number of likes

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.net/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xorbitsai/xagent/revisions/33e4ba4936ad/schema)
