---
title: "Thêm hoặc sửa một cụm từ trong từ điển"
method: POST
path: "/admin/ir/lexicon"
tags: ["IRAdmin"]
---

# Thêm hoặc sửa một cụm từ trong từ điển

`POST /admin/ir/lexicon`

## Request

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

## Query parameters

- `lexiconId` integer, required

## Request body

- FireAntApiModelsIRIRLexiconItem: Mục trong từ điển cảm xúc
  - `lexiconId` integer: ID
  - `phrase` string: Cụm từ
  - `polarity` integer: Điểm cực (-100..100)
  - `weight` number, double: Trọng số
  - `category` string: Nhóm chủ đề
  - `severity` integer: Mức nghiêm trọng
  - `isActive` boolean: Đang bật
  - `createdBy` string: Người tạo
  - `createdDate` string, date-time: Ngày tạo

## Response `200`

OK

- object

## Changes

- **2026-09-25** `a481789cd81c`: 1 info
  - endpoint added

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