---
title: "Publish Trigger - APN"
method: POST
path: "/trigger/publish"
tags: ["Trigger"]
---

# Publish Trigger - APN

`POST /trigger/publish`

Use this endpoint to publish push notifications via APN to targeted app users. This API supports both real-time and scheduled notifications and allows callback configuration for delivery status updates.

## Headers

- `api-key` string, required
- `Content-Type` string, required

## Request body

- object
  - `data` object, required — Contains an arry of trigger objects.
    - `triggers` object[], required — Trigger array of objects
      - `tags` string[] — A set of labels or identifiers that help categorize and filter the trigger event. Tags can be used for reporting, analytics, or downstream segmentation logic. Usage Guideline: You may pass up to 15 tags in a single trigger. Each tags should be a string with a maximum length of 75 characters. Tags should be meaningful identifiers like 'product_launch', 'flash_sale', or 'user_engagement'.
      - `channel` 'apn', required — Channel name to send through: APN
      - `channel_config` object — Channel-specific configuration like App IDs
        - `app_ids` string[], required — Specifies the App IDs to which the notification should be delivered. Each App ID represents a registered application (iOS or Android) on which the push message should appear. This helps route the message to the correct app instance across platforms.
        - `ttl` integer, required — TTL(Time to Live) defines how long(in seconds) the notification should be retained for delivery if the target device is offline. The actual behavior on TTL expiry depeends on the underlying delivery system.
      - `content` object — Defines the message content for the push notification, including template type, landing behavior, OS-specific elements, title, and description.
        - `template_type` 'Simple', required — The message template format. Only 'Simple' is supported as per current API spec.
        - `landing_page_type` 'home' | 'deeplink' | 'url', required — Specifies the redirection behavior on click. Determines whether users land on the app homepage, a deep link, or an external URL.
        - `landing_page_url` string, uri, required — The URL or deep link to open when the user taps the notification.
        - `title` string — The title text shown in the push notification. This is labeled as “APN Title” in the schema. Either 'title' or 'description' must be provided — at least one of the two is required. If description is omitted, 'title' becomes mandatory, and vice versa.
        - `description` string — Body text shown in the push message. Either 'title' or 'description' must be provided. The schema does not enforce mutual exclusivity, but documentation and logic should enforce that at least one is present.
        - `os` object[], required — OS-specific metadata. One object per platform: Android and/or iOS.
          - `os_name` 'android' | 'ios', required — Specifies the operating system to which this push content configuration applies. This is a required field within each object in the 'os' array. Only 'android' and 'ios' are accepted values.
          - `subtitle` string — Optional subtitle text to be displayed in the push notification. This can be used to supplement the title with additional context or highlight.
      - `audience_details` object — Contains details about the target audience for the notification. You must specify the type of contact, the attribute used for identification, and the values for that attribute.
        - `contact_type` 'contact_master' | 'identified' | 'anonymous', required — Defines the category of the recipient. Use 'contact_master' for unified contact profiles, 'identified' for known identities (e.g., mobile/email), and 'anonymous' for temporary identifiers.
        - `contact_attribute` string, required — The attribute type used to identify the user (For example, 'identity', 'token'). This must align with the contact type selected.
        - `attribute_value` string[], required — The values corresponding to the selected contact attribute. This is typically a list of identities like phone numbers, email addresses, or tokens.
      - `schedule_details` object — Specifies when the notification should be sent. If omitted, the message is assumed to be sent immediately.
        - `schedule_type` string, required — Indicates the schedule behavior. Common values may include now or a datetime-based strategy. Specific allowed values are not defined in the schema but should be agreed upon with your backend system. This is madatory only if 'schedule_details' is present.
  - `notify_callback` object, required — Notify and Callback
    - `callback` object[], required — Callback
      - `url` string — Webhook URL
      - `method` 'GET' | 'POST' | 'DELETE' — HTTP Method
      - `headers` object — Headers
        - `Content-Type` string, required
        - `Authorization` string, required
        - `<Custom-Key-Name>` string, required
        - `X-API-UUID` string, required
      - `body_params` object, required — Payload Body Object
        - `key` string, required
      - `query_params` object — GET Query Params
      - `webhook_id` integer — Existing Webhook ID

## Response `200`

- object
  - `request_id` string, required
  - `code` integer, required
  - `status` string, required
  - `description` string, required

## Other responses

- `400`
- `x-400:Publish Trigger - APN - Failed - Validation - Invalid Value Type`
- `x-400:Publish Trigger - APN - Failed - Validation - Invalid Value`
- `x-200:Publish Trigger - APN - Success`

---

[API](https://skmtc.dev/netcorecloud/apis/contacts-api.md) · [All operations](https://skmtc.dev/netcorecloud/apis/contacts-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netcorecloud/contacts-api/revisions/2878cfd0ee01/schema)
