# API 方法参考索引

import { Badge } from '@astrojs/starlight/components';

Pushwoosh 提供了包含 100 多种 API 方法的庞大库，这些方法按发送通知、管理用户和跟踪分析等各种功能进行了分类。




## 消息传递 API v2

统一的 API，取代了整个 `/create*Message` 系列（推送、电子邮件、SMS、Kakao）。请参阅[概述](/zh/developer/api-reference/messaging-api-v2/)和[迁移指南](/zh/developer/api-reference/messaging-api-v2/migration-from-v1/)。

|    <div style="width:250px"></div>                                                            |                                                                                                     |
|-------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)             | 通过任何渠道创建并发送单条消息。取代 `/createMessage`、`/createTargetedMessage`、`/createEmailMessage`、`/createSMSMessage`、`/createKakaoMessage`。 |
| [`Cancel`](/zh/developer/api-reference/messaging-api-v2/cancel/)             | 在消息送达前取消先前创建的消息。与来自 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/) 的 `message_code` 一起使用。 |
| [`Update`](/zh/developer/api-reference/messaging-api-v2/update/)             | 用新的定义（完全替换）替换仍在计划中的消息。与来自 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/) 的 `message_code` 一起使用。 |

## SMTP 网关

通过标准 SMTP 提交事务性电子邮件，而不是直接调用 API。网关使用您的应用程序代码和 API 令牌进行身份验证，然后将每条消息转发到 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。请参阅 [SMTP 网关参考](/zh/developer/api-reference/smtp-gateway/)。

## 消息 API


|    <div style="width:250px"></div>                                                            |                                                                                                     |
|-------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [`createMessage`](/zh/developer/api-reference/messages-api#createmessage) <Badge text="已弃用" variant="caution" size="small" />   | 创建新的推送通知。请改用 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。 |
| [`deleteMessage`](/zh/developer/api-reference/messages-api#deletemessage)   | 删除已计划的消息。                                                                                    |
| [`getMessageDetails`](/zh/developer/api-reference/messages-api#getmessagedetails) | 检索消息详情。                                                                             |
| [`createTargetedMessage`](/zh/developer/api-reference/messages-api#createtargetedmessage) <Badge text="已弃用" variant="caution" size="small" /> | 创建新的定向推送通知。请改用带有 `transactional` 类型的 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。 |
| [`getPushHistory`](/zh/developer/api-reference/messages-api#getpushhistory) <Badge text="已弃用" variant="caution" size="small" /> | 使用 [`/messages:list`](/zh/developer/api-reference/statistics-api/message-statistics-api/#messageslist) 检索包含详细数据的消息历史记录。 |
| [`cancelMessage`](/zh/developer/api-reference/messages-api#cancelmessage)   | 取消已计划的消息。                                                                                   |


## 预设 API

|                 <div style="width:250px"></div>                                              |                                                                                     |
|------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| [`createPreset`](/zh/developer/api-reference/presets-api#createpreset)      | 创建新的预设。                                                                          |
| [`getPreset`](/zh/developer/api-reference/presets-api#getpreset)            | 检索指定推送预设的参数。                                            |
| [`listPresets`](/zh/developer/api-reference/presets-api/#listpresets)       | 检索为应用创建的预设列表。                                              |
| [`deletePreset`](/zh/developer/api-reference/presets-api#deletepreset)      | 从您的账户中删除预设。                                                           |


## 设备 API

|                <div style="width:250px"></div>                                               |                                                                                                    |
|-------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [`registerDevice`](/zh/developer/api-reference/device-api#registerdevice)   | 为应用程序注册设备。                                                                         |
| [`unregisterDevice`](/zh/developer/api-reference/device-api#unregisterdevice) | 移除设备的推送令牌。                                                                               |
| [`deleteDevice`](/zh/developer/api-reference/device-api#deletedevice) | 删除指定应用程序中的设备及其所有相关数据。                                           |
| [`setTags`](/zh/developer/api-reference/device-api#settags)                 | 为设备设置标签值。                                                                                |
| [`getTags`](/zh/developer/api-reference/device-api#gettags)                 | 检索特定设备的标签及其对应值。                                           |
| [`setBadge`](/zh/developer/api-reference/device-api#setbadge)               | 将设备的当前角标值发送到 Pushwoosh。                                                        |
| [`applicationOpen`](/zh/developer/api-reference/device-api#applicationopen)  | 注册应用打开事件。                                                                                    |
| [`pushStat`](/zh/developer/api-reference/device-api#pushstat)               | 注册推送打开事件。                                                                                    |
| [`messageDeliveryEvent`](/zh/developer/api-reference/device-api#messagedeliveryevent) | 为设备注册推送送达事件。                                                      |

## 受众 API


|    <div style="width:250px"></div>                                                            |                                                                                                     |
|-------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [`bulkSetTags`](/zh/developer/api-reference/audience-api/#bulksettags) |         为多个设备设置标签值。                                                               |
| [`bulkSetTags Status`](/zh/developer/api-reference/audience-api/#bulksettags-status) | 返回 bulkSetTags 操作的状态。  |
| [`bulkRegisterDevice`](/zh/developer/api-reference/audience-api/#bulkregisterdevice)   |     在单个请求中注册多个设备，包括每个设备的可选标签值。 |
| [`bulkRegisterDevice Status`](/zh/developer/api-reference/audience-api/#bulkregisterdevice-status)   |     使用请求 ID 检索批量设备注册请求的状态和结果。 |
| [`bulkUnregisterDevice`](/zh/developer/api-reference/audience-api/#bulkunregisterdevice)   |     在单个请求中注销多个设备。  |
| [`bulkUnregisterDevice Status`](/zh/developer/api-reference/audience-api/#bulkunregisterdevice-status)   |     使用请求 ID 检索批量设备注销请求的状态和结果。  |




## 标签 API

|                       <div style="width:250px"></div>                                         |                                                                                 |
|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| [`addTag`](/zh/developer/api-reference/tags#addtag)                      | 在您的账户中创建标签。                                                              |
| [`deleteTag`](/zh/developer/api-reference/tags#deletetag)                | 移除标签及其所有相关信息。                                              |
| [`listTags`](/zh/developer/api-reference/tags#listtags)                  | 检索账户上的标签列表。                                                    |                                      |



## 分段 (筛选器) API

|                         <div style="width:250px"></div>                                       |                                                                                              |
|-------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| [`createFilter`](/zh/developer/api-reference/segmentation-filters-api#createfilter) | 创建新的分段。                                                                     |
| [`listFilters`](/zh/developer/api-reference/segmentation-filters-api/#listfilters)  | 返回可用分段及其条件的列表。                             |
| [`deleteFilter`](/zh/developer/api-reference/segmentation-filters-api#deletefilter) | 删除现有分段。                                                             |
| [`exportSegment`](/zh/developer/api-reference/segmentation-filters-api#exportsegment) | 计划一个请求以导出与分段条件匹配的订阅者。                  |
| [`exportSegment Results`](/zh/developer/api-reference/segmentation-filters-api#exportsegment-results) | 检索 exportSegment 结果的 CSV 链接。                           |



## 以用户为中心的 API

|                       <div style="width:250px"></div>                                           |                                                     |
|--------------------------------------------------------------------|----------------------------------------------------------------|
| [`registerUser`](/zh/developer/api-reference/user-centric-api#registeruser) | 将外部 User ID 与指定设备关联。           |
| [`deleteUser`](/zh/developer/api-reference/user-centric-api#deleteuser) | 删除用户以及与指定 User ID 关联的所有设备。 |
| [`postEvent`](/zh/developer/api-reference/user-centric-api#postevent)  | 在应用内调用事件。                                |



## 事件 API

|                        <div style="width:250px"></div>                                   |                          |
|------------------------------------------------------------------|--------------------------------------|
| [`createEvent`](/zh/developer/api-reference/events#createevent)       | 为应用创建事件。        |



## 应用程序 API

|                           <div style="width:250px"></div>                                               |                                                    |
|---------------------------------------------------------------------------|-----------------------------------------------------------------|
| [`createApplication`](/zh/developer/api-reference/applications#createapplication) | 在账户上创建新的应用程序。                      |
| [`updateApplication`](/zh/developer/api-reference/applications#updateapplication) | 更新应用程序设置。                              |
| [`deleteApplication`](/zh/developer/api-reference/applications#deleteapplication) | 从账户中删除应用。                              |
| [`getApplication`](/zh/developer/api-reference/applications#getapplication)   | 获取有关应用的详细信息。                                    |
| [`getApplications`](/zh/developer/api-reference/applications#getapplications) | 检索账户上的应用程序列表。              |
| [`getApplicationFile`](/zh/developer/api-reference/applications#getapplicationfile) | 检索与应用相关的配置文件。         |
| [`setApplicationPlatformStatus`](/zh/developer/api-reference/applications#setapplicationplatformstatus) | 更改应用的平台状态。 |


## 营销活动 API

|                            <div style="width:250px"></div>                                        |                           |
|-------------------------------------------------------------------|------------------------------------------|
| [`createCampaign`](/zh/developer/api-reference/campaigns#createcampaign) | 创建新的推送营销活动。            |
| [`deleteCampaign`](/zh/developer/api-reference/campaigns#deletecampaign) | 删除特定的营销活动。          |
| [`getCampaigns`](/zh/developer/api-reference/campaigns#getcampaigns)   | 检索应用的营销活动列表。 |



## 应用配置 API

|    <div style="width:250px"></div>                      |                                                                                              |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`configureApplication for iOS`](/zh/developer/api-reference/app-configuration#configureapplication-for-ios)         | 为应用配置 iOS 平台。                                                                         |
| [`configureApplication for Android`](/zh/developer/api-reference/app-configuration#configureapplication-for-android) | 为应用配置 Android 平台。                                                                     |
| [`configureApplication for Mac OS X`](/zh/developer/api-reference/app-configuration#configureapplication-for-mac-os-x) | 为应用配置 macOS 平台。                                                                       |
| [`configureApplication for Windows`](/zh/developer/api-reference/app-configuration#configureapplication-for-windows) | 为应用配置 Windows 平台。                                                                     |
| [`configureApplication for Amazon`](/zh/developer/api-reference/app-configuration#configureapplication-for-amazon)   | 为应用配置 Amazon 平台。                                                                      |
| [`configureApplication for Chrome`](/zh/developer/api-reference/app-configuration#configureapplication-for-chrome)   | 为应用配置 Chrome 平台。                                                                      |
| [`configureApplication for Safari`](/zh/developer/api-reference/app-configuration#configureapplication-for-safari)   | 为应用配置 Safari 平台。                                                                      |
| [`configureApplication for Firefox`](/zh/developer/api-reference/app-configuration#configureapplication-for-firefox) | 为应用配置 Firefox 平台。                                                                     |
| [`configureApplication for Email`](/zh/developer/api-reference/app-configuration#configureapplication-for-email)     | 为应用配置 Email 平台。                                                                       |



## 电子邮件 API

|                  <div style="width:250px"></div>                      |                                                                                                |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`createEmailMessage`](/zh/developer/api-reference/email-api#createemailmessage) <Badge text="已弃用" variant="caution" size="small" /> | 创建电子邮件消息。请改用带有 `platforms: ["EMAIL"]` 和 [`email_payload`](/zh/developer/api-reference/messaging-api-v2/email-payload-reference/) 的 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。 |
| [`registerEmail`](/zh/developer/api-reference/email-api#registeremail)           | 为应用注册电子邮件地址。                                                                          |
| [`deleteEmail`](/zh/developer/api-reference/email-api#deleteemail)               | 从您的数据库中删除电子邮件地址。                                                                     |
| [`setEmailTags`](/zh/developer/api-reference/email-api#setemailtags)             | 为指定的电子邮件地址设置标签值。                                                                 |
| [`registerEmailUser`](/zh/developer/api-reference/email-api#registeremailuser)   | 将外部 User ID 与指定的电子邮件地址关联。                                                   |



## 测试设备 API

|                <div style="width:250px"></div>                       |                                                                                                |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`createTestDevice`](/zh/developer/api-reference/test-devices#createtestdevice)  | 为应用程序注册测试设备。                                                                     |
| [`listTestDevices`](/zh/developer/api-reference/test-devices#listtestdevices)    | 检索为应用程序注册的所有测试设备。                                                       |



## 消息收件箱 API

|                <div style="width:250px"></div>                       |                                                                                                 |
|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`getInboxMessages`](/zh/developer/api-reference/message-inbox/#getinboxmessages) | 检索指定 HWID 的收件箱消息列表。                                                       |
| [`inboxStatus`](/zh/developer/api-reference/message-inbox#inboxstatus)             | 更新特定收件箱消息的状态。                                                                  |



## 统计 API
### 消息统计
|     <div style="width:250px"></div>  |  |
|----------------------------------------------|--------------------------------------------------------------------------------------------------|
| [`messages:list`](/zh/developer/api-reference/statistics-api/message-statistics-api/#messageslist) | 检索已发送消息的列表。 |
| [`totalsByIntervals`](/zh/developer/api-reference/statistics-api/message-statistics-api/#totalsbyintervals) | 提供按小时汇总的指标和转化数据。 |
| [`getMessageLog`](/zh/developer/api-reference/statistics-api/message-statistics-api/#getmessagelog) | 检索有关已发送消息的详细信息。 |
| [`linksInteractions`](/zh/developer/api-reference/statistics-api/message-statistics-api/#emailslinksinteractions) | 提供有关电子邮件链接点击的统计信息。 |
| [`linksInteractionsDevices`](/zh/developer/api-reference/statistics-api/message-statistics-api/#emailslinksinteractionsdevices) | 列出点击电子邮件中链接的用户。 |
| [`bouncedEmails`](/zh/developer/api-reference/statistics-api/message-statistics-api/#bouncedemails) | 提供有关电子邮件退回、投诉和退回原因的信息。 |

### 应用程序和订阅者统计
|      <div style="width:250px"></div>  |  |
|----------------------------------------------|--------------------------------------------------------------------------------------------------|
| [`getApplicationSubscribersStats`](/zh/developer/api-reference/statistics-api/application-subscriber-statistics/#getapplicationsubscribersstats) | 检索应用的订阅者统计信息，按设备类型分组。 |
| [`getAppStats`](/zh/developer/api-reference/statistics-api/application-subscriber-statistics/#getappstats) | 检索特定时间段的应用统计信息。 |
| [`getSubscribersStatistics`](/zh/developer/api-reference/statistics-api/application-subscriber-statistics/#getsubscribersstatistics) | 检索特定时间段的订阅者统计信息。 |

### 营销活动统计
|     <div style="width:250px"></div>   |  |
|----------------------------------------------|--------------------------------------------------------------------------------------------------|
| [`getCampaignStats`](/zh/developer/api-reference/statistics-api/campaign-statistics/) | 检索特定时间段的营销活动统计信息。 |

### 事件和标签统计
|     <div style="width:250px"></div>   |  |
|----------------------------------------------|--------------------------------------------------------------------------------------------------|
| [`getEventStatistics`](/zh/developer/api-reference/statistics-api/events-and-tags-statistics/#geteventstatistics) | 检索在特定时间段内事件被触发的次数。 |
| [`getTagStats`](/zh/developer/api-reference/statistics-api/events-and-tags-statistics/#gettagstats) | 检索特定标签的统计信息。 |


## iOS 实时活动 API

|                <div style="width:250px"></div>                 |                                                                                             |
|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`startLiveActivity`](/zh/developer/api-reference/ios-live-activities-api#startliveactivity) | 创建新的 iOS 实时活动。                                                                                 |
| [`updateLiveActivity`](/zh/developer/api-reference/ios-live-activities-api#updateliveactivity) | 更新现有的 iOS 实时活动。                                                                           |


## Apple Wallet PassKit API

|                <div style="width:250px"></div>                 |                                                                                             |
|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`Apple Wallet PassKit API`](/zh/developer/api-reference/apple-wallet-passkit-api/) | 用于在 Pushwoosh 中管理 Apple Wallet 通行证和相关配置的参考。 |


## Google Wallet API

|                <div style="width:250px"></div>                 |                                                                                             |
|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`Create a pass`](/zh/developer/api-reference/google-wallet-api/#create-a-pass) | 在 Google Wallet 中创建通行证并返回一个保存链接。 |
| [`Validate a pass`](/zh/developer/api-reference/google-wallet-api/#validate-a-pass) | 检查通行证配置而不创建它。 |
| [`Update a pass`](/zh/developer/api-reference/google-wallet-api/#update-a-pass) | 更新现有通行证。Google 会将更改发送到已保存的设备。 |
| [`Get a save link`](/zh/developer/api-reference/google-wallet-api/#get-a-save-link) | 为现有通行证返回一个“添加到 Google Wallet”的保存链接。 |
| [`Get a pass`](/zh/developer/api-reference/google-wallet-api/#get-a-pass) | 返回单个存储的通行证。 |
| [`List passes`](/zh/developer/api-reference/google-wallet-api/#list-passes) | 返回应用程序的分页通行证列表。 |
| [`Set pass state`](/zh/developer/api-reference/google-wallet-api/#set-pass-state) | 激活或使通行证失效。 |
| [`Delete a pass`](/zh/developer/api-reference/google-wallet-api/#delete-a-pass) | 使 Google 中的通行证失效并删除其 Pushwoosh 记录。 |
| [`Get configuration`](/zh/developer/api-reference/google-wallet-api/#get-configuration) | 返回应用程序的 Google Wallet 配置状态。 |
| [`Templates`](/zh/developer/api-reference/google-wallet-api/#templates) | 列出通行证模板或获取一个作为起点。 |


## Customer Journey API

|                          <div style="width:250px"></div>                                                             |                                    |
|------------------------------------------------------------------------------------------|--------------------------------------------------|
| [`Lifecycle`](/zh/developer/api-reference/customer-journey-api/lifecycle/) | 通过其 UUID 启动、暂停、完成、草稿或归档一个 Journey。 |
| [`Create and update`](/zh/developer/api-reference/customer-journey-api/create-update/) | 创建新的 Journey 定义或替换现有定义。 |
| [`Start by API`](/zh/developer/api-reference/customer-journey-api/start-by-api/) | 将用户注入正在运行的 Journey 的 API 入口点。 |
| [`Get Journey stats`](/zh/developer/api-reference/customer-journey-api/statistics/) | 通过其 ID 获取特定 Journey 的统计数据。 |
| [`Remove users from journeys`](/zh/developer/api-reference/customer-journey-api/drop-users/) | 从所有或选定的活动 Journey 中移除一个或多个用户。 |


## 计划请求 API

|                        <div style="width:250px"></div>                                |                                     |
|--------------------------------------------------------------|--------------------------------------------------|
| [`getResults`](/zh/developer/api-reference/scheduled-requests#getresults) | 检索计划请求的结果。    |



## SMS API

|                      <div style="width:250px"></div>                                        |                  |
|-------------------------------------------------------------------|-------------------------------|
| [`createSMSMessage`](/zh/developer/api-reference/sms#createsmsmessage) <Badge text="已弃用" variant="caution" size="small" /> | 创建新的 SMS 消息。请改用带有 `platforms: ["SMS"]` 的 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。 |



## WhatsApp API

|                 <div style="width:250px"></div>                      |                                                                                              |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`createWhatsAppMessage`](/zh/developer/api-reference/whatsapp#createwhatsappmessage) <Badge text="已弃用" variant="caution" size="small" /> | 创建新的 WhatsApp 消息。请改用带有 `platforms: ["WHATS_APP"]` 的 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。 |

## LINE API

|                 <div style="width:250px"></div>                      |                                                                                              |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`createLineMessage`](/zh/developer/api-reference/line-api/) <Badge text="已弃用" variant="caution" size="small" /> | 创建新的 LINE 消息。请改用带有 `platforms: ["LINE"]` 的 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。 |

## Kakao API

|                 <div style="width:250px"></div>                      |                                                                                              |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [`createKakaoMessage`](/zh/developer/api-reference/kakao/#createkakaomessage) <Badge text="已弃用" variant="caution" size="small" /> | 使用经批准的模板发送 Kakao 消息。请改用带有 `platforms: ["KAKAO"]` 的 [`Notify`](/zh/developer/api-reference/messaging-api-v2/notify/)。 |

## 地理区域 API

|  <div style="width:250px"></div>           |  |
|-------------------------|-------------|
| [`getNearestZone`](/zh/developer/api-reference/geozones#getnearestzone) | 检索最近的地理区域的参数及其距离。还记录设备位置以用于地理推送通知。 |
| [`addGeoZone`](/zh/developer/api-reference/geozones#addgeozone) | 将地理区域添加到特定应用。 |
| [`updateGeoZone`](/zh/developer/api-reference/geozones#updategeozone) | 更新地理区域属性，如名称、状态、内容和范围。 |
| [`deleteGeoZone`](/zh/developer/api-reference/geozones#deletegeozone) | 从应用中删除地理区域。 |
| [`addGeoZoneCluster`](/zh/developer/api-reference/geozones#addgeozonecluster) | 将地理区域集群添加到应用。 |
| [`deleteGeoZoneCluster`](/zh/developer/api-reference/geozones#deletegeozonecluster) | 从应用中删除地理区域集群。 |
| [`listGeoZones`](/zh/developer/api-reference/geozones#listgeozones) | 检索应用的地理区域列表。 |
| [`listGeoZoneClusters`](/zh/developer/api-reference/geozones#listgeozoneclusters) | 检索应用的地理区域集群列表。 |