API Endpoints Reference
Complete reference for all Ping API endpoints.
Base URL
https://ping-api-production.up.railway.app
Webhook (No Auth Required)
Send Notification
POST /v1/send/{token}
Content-Type: application/jsonRequest Body:
JSON
{
"title": "Required title",
"body": "Optional body text",
"priority": "normal",
"callback_url": "https://your-server.com/callback",
"actions": [
{"type": "url", "label": "Button Text", "value": "https://example.com"}
]
}Preview
Required title
just nowOptional body text
Response:
JSON
{"ok": true, "id": "msg_xxxxxxxxxxxx", "muted": false}Callback Polling (Token Auth)
Get Callback Result
GET /v1/callback/{token}/{message_id}Response (pending):
JSON
{"status": "pending"}Response (submitted):
JSON
{
"status": "submitted",
"result": {
"message_id": "msg_xxx",
"channel_id": "ch_xxx",
"timestamp": "2026-01-13T15:30:00Z",
"triggered_by": "approve",
"responses": {}
},
"submitted_at": "2026-01-13T15:30:00Z"
}Authentication
| Endpoint | Method | Description |
|---|---|---|
/v1/auth/apple | POST | Sign in with Apple |
/v1/auth/refresh | POST | Refresh session |
/v1/auth/logout | POST | Sign out |
/v1/auth/logout-all | POST | Sign out all devices |
/v1/auth/me | GET | Get current user |
/v1/auth/user | DELETE | Delete account and all data |
API Keys
| Endpoint | Method | Description |
|---|---|---|
/v1/keys | GET | List all API keys |
/v1/keys | POST | Create new API key |
/v1/keys/:id | DELETE | Revoke API key |
Devices
| Endpoint | Method | Description |
|---|---|---|
/v1/devices | POST | Register device |
/v1/devices/:id | PATCH | Update push token |
Channels
| Endpoint | Method | Description |
|---|---|---|
/v1/channels | GET | List channels |
/v1/channels | POST | Create channel |
/v1/channels/:id | GET | Get channel |
/v1/channels/:id | PATCH | Update channel |
/v1/channels/:id | DELETE | Delete channel |
/v1/channels/:id/regenerate | POST | Regenerate webhook token |
/v1/channels/:id/secret | GET | Get webhook signature secret |
/v1/channels/:id/secret/rotate | POST | Rotate webhook signature secret |
Create Channel
POST /v1/channels
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Deploy Alerts",
"icon": "rocket",
"color": "#3B82F6"
}Update Channel
PATCH /v1/channels/:id
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "New Name",
"muted_until": "2026-01-20T00:00:00Z"
}Messages
| Endpoint | Method | Description |
|---|---|---|
/v1/messages | GET | Get messages |
/v1/messages/:id | DELETE | Delete message |
Get Messages
GET /v1/messages?channel_id=ch_xxx&limit=50&offset=0
Authorization: Bearer <token>Folders
| Endpoint | Method | Description |
|---|---|---|
/v1/folders | GET | List all folders |
/v1/folders | POST | Create folder |
/v1/folders/:id | PATCH | Update folder |
/v1/folders/:id | DELETE | Delete folder |
/v1/folders/reorder | POST | Reorder folders |
Pins
| Endpoint | Method | Description |
|---|---|---|
/v1/pins | GET | Get pinned channels |
/v1/pins | POST | Pin channel |
/v1/pins | DELETE | Unpin channel |
/v1/pins/reorder | POST | Reorder pins |
Subscriptions
| Endpoint | Method | Description |
|---|---|---|
/v1/subscriptions | GET | Get user's subscription & plan |
/v1/subscriptions/apple/verify | POST | Verify Apple IAP transaction |
/v1/subscriptions/apple/webhook | POST | App Store Server Notifications |
Signature Verification (Public)
| Endpoint | Method | Description |
|---|---|---|
/v1/verify/docs | GET | Signature verification documentation |
/v1/verify/generate | POST | Generate a test signature |
/v1/verify/signature | POST | Verify a signature |
Webhook Transformers
| Endpoint | Method | Description |
|---|---|---|
/v1/webhook/railway/:token | POST | Railway deployment webhook |
/v1/webhook/github/:token | POST | GitHub Actions/push webhook |
/v1/webhook/vercel/:token | POST | Vercel deployment webhook |
Error Responses
All endpoints return errors in this format:
JSON
{
"error": "error_code",
"message": "Human-readable description"
}| Error Code | HTTP Status | Description |
|---|---|---|
invalid_json | 400 | Request body isn't valid JSON |
invalid_payload | 400 | Missing required fields or invalid values |
invalid_token | 401 | Invalid or missing authentication |
forbidden | 403 | No permission for this action |
not_found | 404 | Resource not found |
rate_limited | 429 | Too many requests |
internal_error | 500 | Server error |