---
title: "Tạo chiến dịch thông báo"
method: POST
path: "/ir/{symbol}/campaigns"
tags: ["IROfficialAccount"]
---

# Tạo chiến dịch thông báo

`POST /ir/{symbol}/campaigns`

## Request

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

## Path parameters

- `symbol` string, required

## Request body

- FireAntApiModelsIRIRCampaignChangeRequest: Tạo chiến dịch thông báo
  - `type` 1 | 2: Loại (1 = Push, 2 = Email)
  - `title` string, required: Tiêu đề thông báo
  - `body` string, required: Nội dung
  - `targetType` 1 | 2 | 3: Đối tượng nhận (1 = SymbolFollowers, 2 = OaFollowers, 3 = EventRegistrants)
  - `linkPostId` integer: Bài viết mở khi bấm vào
  - `linkRoute` string: Đường dẫn trong ứng dụng
  - `scheduledDate` string, date-time: Thời điểm hẹn gửi (bỏ trống = gửi ngay)

## Response `200`

OK

- FireAntApiModelsIRIRCampaignItem
  - `campaignId` integer: ID chiến dịch
  - `companyId` integer: ID công ty
  - `type` 1 | 2: Loại (1 = Push, 2 = Email)
  - `title` string: Tiêu đề thông báo
  - `body` string: Nội dung
  - `targetType` 1 | 2 | 3: Đối tượng nhận (1 = SymbolFollowers, 2 = OaFollowers, 3 = EventRegistrants)
  - `linkPostId` integer: Bài viết sẽ mở khi bấm vào
  - `linkRoute` string: Đường dẫn trong ứng dụng
  - `scheduledDate` string, date-time: Thời điểm hẹn gửi
  - `status` 0 | 1 | 2 | 3 | 4 | 5: Trạng thái (0 = Draft, 1 = Scheduled, 2 = Sending, 3 = Sent, 4 = Failed, 5 = Cancelled)
  - `sendMethod` 0 | 1 | 2: Cách gửi thực tế. Gửi qua topic thì SentCount là số thiết bị đang đăng ký topic tại thời điểm gửi, không phải số máy xác nhận đã nhận. (0 = NotSent, 1 = PerUser, 2 = Topic)
  - `targetCount` integer: Số người thuộc đối tượng nhận
  - `reachableCount` integer: Số người thực sự nhận được: chỉ tính người còn thiết bị hoạt động trong 180 ngày. Luôn nhỏ hơn TargetCount và đây mới là con số cam kết được với khách hàng.
  - `sentCount` integer: Số đã gửi thành công
  - `failedCount` integer: Số gửi lỗi
  - `postEngagement24h` integer: Lượt tương tác trên bài đích trong 24 giờ sau khi gửi. Hệ thống không đo được số người bấm vào thông báo nên không có chỉ số đó.
  - `hangfireJobId` string: Mã công việc nền
  - `quotaConsumed` boolean: Đã trừ hạn mức
  - `lastError` string: Lỗi gần nhất
  - `createdBy` string: Người tạo
  - `createdDate` string, date-time: Ngày tạo
  - `sentDate` string, date-time: Thời điểm gửi

## Changes

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

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