{
    "info": {
        "_postman_id": "a29d49d8-6d65-4ff0-8c4a-4c9f5514cbb4",
        "name": "Pushfa Webservices",
        "description": "Postman collection for all Pushfa public webservice APIs, including common Web/Android sending, audience management, Profile 360 and RetenX events. Set collection variables (api_public_key, api_private_key, fcm_token, …) before sending requests.\n\nNote: anywhere an `fcm_token` is accepted you may instead pass a `subscriber_id` (UUID) in the same field — it is auto-detected (a UUID is treated as a subscriber id, otherwise as a raw FCM token). In group sends, each entry of `fcm_tokens` may likewise be a token or a subscriber id.\n\nOptional `collapse_id` (string, max 100): notifications sharing the same collapse id replace each other on the device instead of stacking — only the latest is shown. It is applied as the FCM Android `collapse_key` and the WebPush `Topic` header. Supported on every send endpoint below (single, group, lite, alias, subscriber, alias-label, and topic sends).\n\nOptional `silent` (boolean, default false): when true the notification is shown on the device but with no sound and no vibration. Browsers still require the notification to be visible — a fully invisible push is not possible. Supported on every send endpoint below.\n\nOptional `additional_data` (JSON object, Pro): an arbitrary JSON object delivered inside the FCM data block and returned by the notifications read API. Only honored for Pro accounts and when the admin has enabled the feature; otherwise it is dropped.\n\nOptional `platform` (string: all | android | ios | desktop, default all): narrows a group/topic/all send to subscribers on that OS platform, in addition to the `device` (mobile/desktop) filter.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://pushfa.com/api/webservices"
        },
        {
            "key": "topics_url",
            "value": "https://pushfa.com/api/topics"
        },
        {
            "key": "api_public_key",
            "value": "YOUR_PUBLIC_KEY"
        },
        {
            "key": "api_private_key",
            "value": "YOUR_PRIVATE_KEY"
        },
        {
            "key": "fcm_token",
            "value": "USER_FCM_TOKEN"
        },
        {
            "key": "subscriber_id",
            "value": "SUBSCRIBER_ID"
        },
        {
            "key": "topic_uuid",
            "value": "TOPIC_UUID"
        },
        {
            "key": "alias",
            "value": "USER_ALIAS_ID"
        },
        {
            "key": "alias_label",
            "value": "crm_id"
        },
        {
            "key": "notification_id",
            "value": "MESSAGE_RECEPTOR_UUID"
        },
        {
            "key": "collapse_id",
            "value": "promo-banner"
        }
    ],
    "item": [
        {
            "name": "Send Messages",
            "description": "Push Throttling: پس از فعال‌سازی در تنظیمات سرویس، نرخ پیش‌فرض روی هر پیام اعمال می‌شود. اگر Allow Override روشن باشد، پارامتر اختیاری throttle_rate_per_minute (عدد صحیح 1 تا 1000000) را به بدنه هر درخواست ارسال Push اضافه کنید؛ مثال: \"throttle_rate_per_minute\": 500. اگر پارامتر ارسال نشود یا Override مجاز نباشد، نرخ پیش‌فرض سرویس استفاده می‌شود. Throttling گیرنده‌ای را حذف نمی‌کند و فقط زمان ورود ارسال‌ها به صف را توزیع می‌کند.",
            "item": [
                {
                    "name": "Send single message",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"fcm_token\": \"{{fcm_token}}\",\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"title\": \"Pushfa title\",\n  \"body\": \"Pushfa notification body\",\n  \"link_url\": \"https://example.com\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"btn_left\": { \"title\": \"Left button\", \"url\": \"https://example.com/left\" },\n  \"btn_right\": { \"title\": \"Right button\", \"url\": \"https://example.com/right\" },\n  \"get_delivery_status\": true,\n  \"webhook_url\": \"https://example.com/pushfa-webhook\",\n  \"get_click_status\": true,\n  \"sendTime\": \"current\",\n  \"time\": \"2026-06-01 12:30\",\n  \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-single-message",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-single-message"
                            ]
                        }
                    }
                },
                {
                    "name": "Send single lite message",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"fcm_token\": \"{{fcm_token}}\",\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"title\": \"Pushfa title\",\n  \"body\": \"Pushfa notification body\",\n  \"link_url\": \"https://example.com\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"sendTime\": \"current\",\n  \"time\": \"2026-06-01 12:30\",\n  \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-single-lite-message",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-single-lite-message"
                            ]
                        }
                    }
                },
                {
                    "name": "Send group message with reports",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"fcm_tokens\": [\"{{fcm_token}}\"],\n  \"topic\": \"all\",\n  \"device\": \"all\",\n  \"platform\": \"all\",\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"title\": \"Pushfa title\",\n  \"body\": \"Pushfa notification body\",\n  \"link_url\": \"https://example.com\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"btn_left\": { \"title\": \"Left button\", \"url\": \"https://example.com/left\" },\n  \"btn_right\": { \"title\": \"Right button\", \"url\": \"https://example.com/right\" },\n  \"get_delivery_status\": true,\n  \"webhook_url\": \"https://example.com/pushfa-webhook\",\n  \"get_click_status\": true,\n  \"sendTime\": \"current\",\n  \"time\": \"2026-06-01 12:30\",\n  \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-group-message",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-group-message"
                            ]
                        }
                    }
                },
                {
                    "name": "Send group message without report",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"fcm_tokens\": [\"{{fcm_token}}\"],\n  \"topic\": \"all\",\n  \"device\": \"all\",\n  \"platform\": \"all\",\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"title\": \"Pushfa title\",\n  \"body\": \"Pushfa notification body\",\n  \"link_url\": \"https://example.com\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"btn_left\": { \"title\": \"Left button\", \"url\": \"https://example.com/left\" },\n  \"btn_right\": { \"title\": \"Right button\", \"url\": \"https://example.com/right\" },\n  \"sendTime\": \"current\",\n  \"time\": \"2026-06-01 12:30\",\n  \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-group-message-without-report",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-group-message-without-report"
                            ]
                        }
                    }
                },
                {
                    "name": "Send group lite message",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"fcm_tokens\": [\"{{fcm_token}}\"],\n  \"topic\": \"all\",\n  \"device\": \"all\",\n  \"platform\": \"all\",\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"title\": \"Pushfa title\",\n  \"body\": \"Pushfa notification body\",\n  \"link_url\": \"https://example.com\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"sendTime\": \"current\",\n  \"time\": \"2026-06-01 12:30\",\n  \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-group-lite-message",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-group-lite-message"
                            ]
                        }
                    }
                },
                {
                    "name": "Send via user alias id",
                    "request": {
                        "description": "Set smart_targeting=true to send only to the device with the best estimated delivery probability for this Alias. Ties are resolved by delivered count, clicks, last delivery, and recent activity. smart_targeting takes precedence over only_last_device. Historical delivery reports improve ranking accuracy.",
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"alias\": \"{{alias}}\",\n    \"smart_targeting\": true,\n    \"only_last_device\": false,\n    \"device\": \"all\",\n  \"platform\": \"all\",\n    \"api_public_key\": \"{{api_public_key}}\",\n    \"api_private_key\": \"{{api_private_key}}\",\n    \"title\": \"Pushfa title\",\n    \"body\": \"Pushfa notification body\",\n    \"link_url\": \"https://example.com\",\n    \"image_url\": \"https://example.com/image.jpg\",\n    \"btn_left\": {\n        \"title\": \"Left button\",\n        \"url\": \"https://example.com/left\"\n    },\n    \"btn_right\": {\n        \"title\": \"Right button\",\n        \"url\": \"https://example.com/right\"\n    },\n    \"get_delivery_status\": true,\n    \"get_click_status\": true,\n    \"sendTime\": \"current\",\n    \"time\": \"2026-06-01 12:30\",\n    \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-via-user-alias-id",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-via-user-alias-id"
                            ]
                        }
                    }
                },
                {
                    "name": "Send via subscriber id",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"subscriber_ids\": [\"{{subscriber_id}}\"],\n  \"device\": \"all\",\n  \"platform\": \"all\",\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"title\": \"Pushfa title\",\n  \"body\": \"Pushfa notification body\",\n  \"link_url\": \"https://example.com\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"get_delivery_status\": true,\n  \"get_click_status\": true,\n  \"sendTime\": \"current\",\n  \"time\": \"2026-06-01 12:30\",\n  \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-via-subscriber-id",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-via-subscriber-id"
                            ]
                        }
                    }
                },
                {
                    "name": "Send via custom alias (label)",
                    "request": {
                        "description": "Set smart_targeting=true to select one best device independently for every value. Ranking uses estimated delivery probability first, then delivered count, clicks, last delivery, and recent activity. Use identity labels such as crm_id, not group labels such as tier; historical delivery reports improve accuracy.",
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"label\": \"{{alias_label}}\",\n    \"values\": [\n        \"VALUE_1\",\n        \"VALUE_2\"\n    ],\n    \"smart_targeting\": true,\n    \"only_last_device\": false,\n    \"device\": \"all\",\n  \"platform\": \"all\",\n    \"api_public_key\": \"{{api_public_key}}\",\n    \"api_private_key\": \"{{api_private_key}}\",\n    \"title\": \"Pushfa title\",\n    \"body\": \"Pushfa notification body\",\n    \"link_url\": \"https://example.com\",\n    \"image_url\": \"https://example.com/image.jpg\",\n    \"sendTime\": \"current\",\n    \"time\": \"2026-06-01 12:30\",\n    \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-via-alias",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-via-alias"
                            ]
                        }
                    }
                },
                {
                    "name": "Send quickly to topic",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"topic\": \"{{topic_uuid}}\",\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"title\": \"Pushfa title\",\n  \"body\": \"Pushfa notification body\",\n  \"link_url\": \"https://example.com\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"btn_left\": { \"title\": \"Left button\", \"url\": \"https://example.com/left\" },\n  \"btn_right\": { \"title\": \"Right button\", \"url\": \"https://example.com/right\" },\n  \"sendTime\": \"current\",\n  \"time\": \"2026-06-01 12:30\",\n  \"ttl\": 86400,\n  \"collapse_id\": \"{{collapse_id}}\",\n  \"silent\": false,\n  \"additional_data\": { \"order_id\": 42, \"type\": \"promo\" }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/send-quickly-to-topic",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "send-quickly-to-topic"
                            ]
                        }
                    }
                },
                {
                    "name": "Check notification status",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"notification_ids\": [\"{{notification_id}}\"]\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/check-notification-status",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "check-notification-status"
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "Alias Management",
            "item": [
                {
                    "name": "Set user alias (main)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\",\n  \"alias\": \"{{alias}}\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/alias/set",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "alias",
                                "set"
                            ]
                        }
                    }
                },
                {
                    "name": "Delete user alias (main)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/alias/delete",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "alias",
                                "delete"
                            ]
                        }
                    }
                },
                {
                    "name": "Get user alias (main)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/alias/get",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "alias",
                                "get"
                            ]
                        }
                    }
                },
                {
                    "name": "Add custom aliases",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\",\n  \"aliases\": {\n    \"crm_id\": \"CRM-123\",\n    \"tier\": \"gold\"\n  }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/aliases/add",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "aliases",
                                "add"
                            ]
                        }
                    }
                },
                {
                    "name": "Remove custom aliases",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\",\n  \"labels\": [\"crm_id\", \"tier\"]\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/aliases/remove",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "aliases",
                                "remove"
                            ]
                        }
                    }
                },
                {
                    "name": "Get custom aliases",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/aliases/get",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "aliases",
                                "get"
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "Test Users",
            "item": [
                {
                    "name": "Set test user",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/test-user/set",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "test-user",
                                "set"
                            ]
                        }
                    }
                },
                {
                    "name": "Unset test user",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\"\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/test-user/unset",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "test-user",
                                "unset"
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "Topics",
            "item": [
                {
                    "name": "Create topic",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"name\": \"My topic\",\n  \"send_membership_notification\": false,\n  \"allow_js_register\": true,\n  \"allow_js_unregister\": true,\n  \"allow_js_get\": true\n}"
                        },
                        "url": {
                            "raw": "{{topics_url}}/create",
                            "host": [
                                "{{topics_url}}"
                            ],
                            "path": [
                                "create"
                            ]
                        },
                        "description": "Create a new topic for the service and get back its uuid. Requires public + private api key. Only `name` is required; the boolean flags are optional and default to false."
                    }
                },
                {
                    "name": "Subscribe token to topic",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\",\n  \"topic_uuid\": \"{{topic_uuid}}\"\n}"
                        },
                        "url": {
                            "raw": "{{topics_url}}/subscribe",
                            "host": [
                                "{{topics_url}}"
                            ],
                            "path": [
                                "subscribe"
                            ]
                        }
                    }
                },
                {
                    "name": "Unsubscribe token from topic",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\",\n  \"topic_uuid\": \"{{topic_uuid}}\"\n}"
                        },
                        "url": {
                            "raw": "{{topics_url}}/unsubscribe",
                            "host": [
                                "{{topics_url}}"
                            ],
                            "path": [
                                "unsubscribe"
                            ]
                        }
                    }
                },
                {
                    "name": "Get user topics",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"fcm_token\": \"{{fcm_token}}\"\n}"
                        },
                        "url": {
                            "raw": "{{topics_url}}/user-topics",
                            "host": [
                                "{{topics_url}}"
                            ],
                            "path": [
                                "user-topics"
                            ]
                        }
                    }
                },
                {
                    "name": "Get topic members",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"topic_uuid\": \"{{topic_uuid}}\"\n}"
                        },
                        "url": {
                            "raw": "{{topics_url}}/topic-members",
                            "host": [
                                "{{topics_url}}"
                            ],
                            "path": [
                                "topic-members"
                            ]
                        }
                    }
                }
            ]
        },
        {
            "name": "Profile 360 and RetenX",
            "item": [
                {
                    "name": "Create or update subscriber profile",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"external_id\": \"customer-42\",\n  \"aliases\": {\n    \"mobile\": \"09120000000\",\n    \"crm_id\": \"CRM-9182\"\n  },\n  \"properties\": {\n    \"name\": \"سارا\",\n    \"city\": \"تهران\",\n    \"plan\": \"pro\"\n  }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/retention/profiles/upsert",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "retention",
                                "profiles",
                                "upsert"
                            ]
                        },
                        "description": "Creates an SMS-only Profile 360 or updates an existing subscriber by subscriber_id, external_id, or aliases. In Pushfa, external_id means the primary Alias; it is not a separate identifier type."
                    }
                },
                {
                    "name": "Send RetenX event",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"api_public_key\": \"{{api_public_key}}\",\n  \"api_private_key\": \"{{api_private_key}}\",\n  \"event_name\": \"add_to_cart\",\n  \"subscriber_id\": \"{{subscriber_id}}\",\n  \"idempotency_key\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"params\": {\n    \"cart\": {\n      \"id\": \"C-14051\",\n      \"total\": 890000\n    },\n    \"product\": {\n      \"name\": \"کفش ورزشی\",\n      \"url\": \"https://shop.example/cart\"\n    }\n  }\n}"
                        },
                        "url": {
                            "raw": "{{base_url}}/retention/events",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "retention",
                                "events"
                            ]
                        },
                        "description": "Records a backend event used as a RetenX start, exit, or Wait Until event. The event name must be used by an active or paused journey."
                    }
                }
            ]
        }
    ]
}
