---
title: "Chia sẻ mẫu cho người dùng (theo tên đăng nhập)"
method: POST
path: "/me/excel/templates/{templateId}/shares"
tags: ["MyExcelTemplates"]
---

# Chia sẻ mẫu cho người dùng (theo tên đăng nhập)

`POST /me/excel/templates/{templateId}/shares`

## Request

- Base URL: `https://api.fireant.vn`
- URL: `https://api.fireant.vn/me/excel/templates/{templateId}/shares`
- Auth: OAuth 2
  - Implicit: `https://accounts.fireant.vn/connect/authorize`
  - Scopes: `user-data-write`
- TypeScript: <https://skmtc.dev/fireant/apis/fireant-restful-api/docs/me/excel/templates/:templateId/shares/post.ts> (a function with typed inputs; its response is checked against the schema)

Tên đăng nhập phải tồn tại, không gồm chính bạn / chủ sở hữu; người đã được chia sẻ bị bỏ qua.
Mỗi mẫu tối đa ExcelTemplateMaxSharesPerTemplate người (mặc định 100).

## Path parameters

- `templateId` integer, required

## Request body

- FireAntApiModelsExcelTemplatesExcelTemplateShareRequest: Yêu cầu chia sẻ mẫu cho danh sách người dùng (theo tên đăng nhập)
  - `userNames` string[]: Tên đăng nhập của người nhận (phải tồn tại, không gồm chính bạn; tối đa 100 / lần)

## Response `200`

Toàn bộ danh sách chia sẻ

- FireAntApiModelsExcelTemplatesExcelTemplateShareItem[]
  - `userName` string: Tên đăng nhập
  - `name` string: Tên hiển thị (null nếu không tra được)
  - `avatar` string: URL ảnh đại diện (null nếu không tra được)
  - `sharedDate` string, date-time: Thời điểm chia sẻ

## Other responses

- `400`: Tên không tồn tại / tự chia sẻ / vượt giới hạn
- `403`: Không có quyền
- `404`: Không tồn tại

## Changes

- **2026-10-10** `300cfd8b632c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fireant/apis/fireant-restful-api/changes/me/excel/templates/:templateId/shares/post.md)

---

[API](https://skmtc.dev/fireant/apis/fireant-restful-api.md) - [All operations](https://skmtc.dev/fireant/apis/fireant-restful-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fireant/apis/fireant-restful-api/revisions/c9b3aa855f95?raw)
