How do you send a push from your own server?
Call the PushFyre push notification API with an API key scoped to one app. The body carries the title, the message, and the channels: Android, iOS, web, WhatsApp, or email. The campaign shows up with the rest of your analytics. Generating a new key revokes the previous one.
What the call can choose
Everyone, one or more segments, or specific device ids. A send time can schedule it. Delivery events can also be posted to a webhook you host.
- POST the send with the app id and API key
- Pass a saved template id when the campaign started from a template
- The title and message are still in the request
What the key is allowed to do
The key belongs to one app. A call with that key cannot send for a different app. Generating a new key revokes the previous one, so you update the server that sends before the old key starts failing. Keep the key in the server environment. Do not put it in the Android, iOS, or web app.
The portal is still where you connect Firebase and Apple, create segments, and read the report. The API is how your server triggers the send. A scheduled time can be included. Delivery events can also be posted to a webhook you host.
Common questions
Does the API replace the portal?
No. The portal is where you create the app, connect Firebase and Apple, and read the report. The API is how your server triggers the send.