Share alerts with the team — safely
Send alerts to a topic; everyone who joined the topic in the app gets them on their phone. A single-select choice renders as buttons on the push, so acknowledging is one tap.
bash
sp task -t oncall --title "🚨 API latency p99 > 1s" \
-c "us-east-1 degraded since 14:02;Ack,Escalate,Ignore"python
from simplepush import Client, ChoiceInput
client = Client(api_token="YOUR_API_TOKEN")
client.send_task(
topic="oncall",
title="🚨 API latency p99 > 1s",
content="us-east-1 degraded since 14:02",
inputs=[ChoiceInput(options=["Ack", "Escalate", "Ignore"])],
)ts
import { Client } from '@simplepush/sdk'
const client = new Client({ apiToken: 'YOUR_API_TOKEN' })
await client.sendTask({
topic: 'oncall',
title: '🚨 API latency p99 > 1s',
content: 'us-east-1 degraded since 14:02',
inputs: [{ type: 'choice', options: ['Ack', 'Escalate', 'Ignore'], required: true }],
})bash
curl -X POST https://api.simplepu.sh/v1/tasks \
-H "API-Token: $SP_API_TOKEN" \
-H "Topic: oncall" \
-H "Title: 🚨 API latency p99 > 1s" \
-H "Choice-Input: us-east-1 degraded since 14:02;Ack,Escalate,Ignore"The topic value is the capability: anyone who knows it can join and receive. Pick an unguessable value and share it with the team.
Only the bot should send
By default every topic holder can also publish. To restrict sending, write-protect the topic in the app under the topic's settings. Everyone still receives, but publishing then requires the sender token the app issues, presented via the Topic-Auth-Token header (or the topicAuthToken field on the JSON endpoints):
bash
curl -X POST https://api.simplepu.sh/v1/tasks \
-H "API-Token: $SP_API_TOKEN" \
-H "Topic: oncall" \
-H "Topic-Auth-Token: $SENDER_TOKEN" \
-H "Title: 🚨 API latency p99 > 1s" \
-H "Choice-Input: us-east-1 degraded since 14:02;Ack,Escalate,Ignore"A publish without a valid token is rejected with 401 write_protection_token_required. See Write-protected topics for details.