JustPush.io
  • Introduction
  • New? Start Here
  • The Glossary
  • USER MANUAL
    • Getting Started
    • API Key
    • JustPush Email
  • OBJECTS
    • Messages
      • Title
      • Topic
      • Message
      • Priority
      • Sounds
      • Images
      • Acknowledgements
      • Buttons
      • Button Groups
      • Expiry TTL
    • Topics
      • Title
      • Avatar
  • DEV TOOLS
    • API reference
      • Messages
      • Topics
    • OpenAPI
    • Rapid API
    • Postman
    • SDKs
    • Changelog
Powered by GitBook
On this page
  • Requirements
  • Frequently Asked Questions
  1. OBJECTS
  2. Messages

Topic

The topic field routes your message to the correct topic channel. You can provide a topic title or a topic token, and JustPush.io will figure out where to deliver it—or create the topic on the fly.

When sending a push message, the topic field tells JustPush.io which topic the message belongs to. You have two ways to identify the topic:

  • topic – A plain-text title (e.g., "Server Alerts"), which will be slugified.

  • topic_token – A secure, unique identifier for direct delivery.

Here’s what happens under the hood:

  1. If a matching topic is found for the user (by token or title), the message is routed there.

  2. If multiple topics match, we fall back to the user’s default topic.

  3. If no topic exists and you supplied a title, we’ll create it for you.

  4. If no topic or token is provided, we use the default topic (if it exists).

This means your messages are always delivered—either to an existing topic or a freshly minted one.

Requirements

Attribute
Data Type
Validation Criteria

topic

string

text


Frequently Asked Questions

What if both topic and topic_token are provided?

We prioritize the topic_token. If it’s valid, it wins. Otherwise, we fall back to the slugified topic.

Can topics be created automatically?

Yes! If you provide a topic name that doesn’t exist yet, and the user has permission, we’ll create it.

What format should the topic field be in?

Just a plain string—e.g., "Critical Alerts". We'll slugify it automatically (e.g., critical-alerts).

Can I just always use the topic_token?

Sure! Tokens are a more precise and secure way to target existing topics.

PreviousTitleNextMessage

Last updated 1 month ago