iOS · Schema

APNs Notification Payload

The JSON body POSTed to /3/device/{deviceToken} on api.push.apple.com. The aps dictionary is reserved by Apple; custom keys may be added at the top level.

iOSAppleMobileApp StorePush NotificationsIn-App PurchasesSubscriptionsAuthenticationWalletDeveloper Platform

Properties

Name Type Description
aps object
View JSON Schema on GitHub

JSON Schema

apns-notification-payload-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/ios/main/json-schema/apns-notification-payload-schema.json",
  "title": "APNs Notification Payload",
  "description": "The JSON body POSTed to /3/device/{deviceToken} on api.push.apple.com. The aps dictionary is reserved by Apple; custom keys may be added at the top level.",
  "type": "object",
  "required": ["aps"],
  "properties": {
    "aps": {
      "type": "object",
      "properties": {
        "alert": {
          "oneOf": [
            { "type": "string" },
            {
              "type": "object",
              "properties": {
                "title": { "type": "string" },
                "subtitle": { "type": "string" },
                "body": { "type": "string" },
                "title-loc-key": { "type": "string" },
                "title-loc-args": { "type": "array", "items": { "type": "string" } },
                "loc-key": { "type": "string" },
                "loc-args": { "type": "array", "items": { "type": "string" } },
                "launch-image": { "type": "string" }
              }
            }
          ]
        },
        "badge": { "type": "integer", "minimum": 0 },
        "sound": {
          "oneOf": [
            { "type": "string" },
            {
              "type": "object",
              "properties": {
                "critical": { "type": "integer", "enum": [0, 1] },
                "name": { "type": "string" },
                "volume": { "type": "number", "minimum": 0, "maximum": 1 }
              }
            }
          ]
        },
        "thread-id": { "type": "string" },
        "category": { "type": "string" },
        "content-available": { "type": "integer", "enum": [0, 1] },
        "mutable-content": { "type": "integer", "enum": [0, 1] },
        "target-content-id": { "type": "string" },
        "interruption-level": {
          "type": "string",
          "enum": ["passive", "active", "time-sensitive", "critical"]
        },
        "relevance-score": { "type": "number", "minimum": 0, "maximum": 1 },
        "filter-criteria": { "type": "string" },
        "stale-date": { "type": "integer" },
        "content-state": { "type": "object", "additionalProperties": true },
        "timestamp": { "type": "integer" },
        "event": {
          "type": "string",
          "enum": ["start", "update", "end"]
        },
        "dismissal-date": { "type": "integer" }
      }
    }
  },
  "additionalProperties": true
}