---
title: "Tạo liên kết (publish lần đầu từ add-in Excel)"
method: POST
path: "/office/links"
tags: ["OfficeLinks"]
---

# Tạo liên kết (publish lần đầu từ add-in Excel)

`POST /office/links`

## Request

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

Body JSON: { name (bắt buộc, ≤ 200), kind (bắt buộc: table | chart | value), sourceApp (excel - mặc định | word | powerpoint),
sourceDocument (≤ 260), sourceRef (vd. "Sheet1!A1:F12" hoặc tên biểu đồ, ≤ 200), payload (bắt buộc, JSON object
≤ OfficeLinkMaxPayloadKb) }. Server sinh id (22 ký tự), version = 1. Mỗi người tối đa OfficeLinkMaxPerUser liên kết.

## Response `201`

Liên kết vừa tạo (không kèm payload)

- FireAntApiModelsOfficeLinksOfficeLinkItem: Một liên kết dữ liệu Office (Excel → Word / PowerPoint) của người dùng hiện tại - không kèm payload (danh sách, kết quả tạo / publish)
  - `id` string: ID công khai của liên kết: 22 ký tự base64url (A-Z a-z 0-9 _ -), phân biệt hoa thường
  - `name` string: Tên liên kết
  - `kind` string: Loại: table | chart | value
  - `sourceApp` string: Ứng dụng nguồn: excel | word | powerpoint
  - `sourceDocument` string: Tài liệu nguồn (tên / URL workbook), null nếu không có
  - `sourceRef` string: Vị trí nguồn: "Sheet1!A1:F12" hoặc tên biểu đồ, null nếu không có
  - `version` integer: Phiên bản snapshot: 1 khi tạo, tăng 1 mỗi lần publish (PUT)
  - `createdAt` string, date-time: Thời điểm tạo (UTC)
  - `updatedAt` string, date-time: Thời điểm publish gần nhất (UTC)

## Other responses

- `400`: Dữ liệu không hợp lệ / vượt giới hạn
- `401`: Chưa đăng nhập
- `413`: Dữ liệu gửi lên quá lớn

## Changes

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

[Operation history](https://skmtc.dev/fireant/apis/fireant-restful-api/changes/office/links/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)
