Notification Configuration
Send a Notification covers the basics: a single message. This page documents the full request body so you can add a severity type, a custom title, images, and structured JSON.
All fields are sent in the JSON body of the same request:
POST https://api.pushmark.app/<channel_hash>
Request body fields
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
message | string or JSON object/array | Yes | — | The notification payload. A plain string, or structured JSON (see String vs JSON messages). |
type | string | No | log | Severity. One of info, success, warning, error, log. |
title | string | No | Pushmark | Alert title shown above the message. |
images | string[] | No | [] | Image URLs surfaced in the app. |
A fully configured request:
curl -X POST "https://api.pushmark.app/YOUR_CHANNEL_HASH" \
-H "Content-Type: application/json" \
-d '{
"message": "Checkout API error rate passed 5% in the last 10 minutes.",
"type": "error",
"title": "Checkout alert"
}'
Notification types
The type field controls the severity styling of the notification. It accepts one of five values and defaults to log when omitted:
infosuccesswarningerrorlog
Any other value is rejected with a 400 error.
{
"message": "Nightly backup uploaded successfully.",
"type": "success"
}
Title
By default the app shows Pushmark as the notification title. Set title to show your own:
{
"message": "Deploy finished in 38s.",
"title": "Production deploy",
"type": "success"
}
String vs JSON messages
message can be a plain string or structured JSON. Pushmark auto-detects the format: if the value starts with { or [ it is treated as JSON (payloadType: "json"), otherwise it is treated as a string (payloadType: "string").
A string message:
{
"message": "CPU usage is back to normal."
}
A structured JSON message — the app renders it in a structured view rather than a single line:
{
"type": "success",
"message": {
"status": "ok",
"branch": "main",
"duration": 42
}
}
Structured JSON example
A richer payload, for example a build/deploy report:
curl -X POST "https://api.pushmark.app/YOUR_CHANNEL_HASH" \
-H "Content-Type: application/json" \
-d '{
"type": "success",
"message": {
"build": {
"status": "success",
"branch": "main",
"commit": "a1b2c3d",
"duration": 38,
"passed": true,
"coverage": 94.7,
"steps": ["install", "lint", "test", "deploy"]
},
"server": {
"region": "us-east-1",
"cpu": 12,
"memory": 74,
"healthy": true,
"replicas": 3
},
"metrics": { "p50": 120, "p95": 340, "p99": 980, "errors": 0 }
}
}'
Images
Include image URLs to surface them in the app alongside the notification:
{
"type": "success",
"title": "Visual regression passed",
"message": "Snapshot diff is clean.",
"images": [
"https://example.com/screenshots/home.png",
"https://example.com/screenshots/checkout.png"
]
}
Response
A successful request is accepted for delivery and returns 202 Accepted:
{
"message": "Notification queued",
"total_count": 1,
"master_id": 123,
"status": "PENDING"
}
Errors return a matching status code with an error field:
{
"error": "invalid type. Must be one of: info, warning, success, error, log"
}
Common cases: 400 for an empty body, invalid JSON, or an invalid type; 404 for an unknown channel; 429 when the channel's rate limit is exceeded (the response also includes retry_after and reset_time).
Multi-language examples
A configured, structured-JSON send across languages:
- cURL
- JavaScript
- Python
- Swift
curl -X POST "https://api.pushmark.app/YOUR_CHANNEL_HASH" \
-H "Content-Type: application/json" \
-d '{
"type": "success",
"title": "Deploy",
"message": { "branch": "main", "duration": 38, "passed": true }
}'
await fetch('https://api.pushmark.app/YOUR_CHANNEL_HASH', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
type: 'success',
title: 'Deploy',
message: { branch: 'main', duration: 38, passed: true },
}),
});
import requests
requests.post(
"https://api.pushmark.app/YOUR_CHANNEL_HASH",
json={
"type": "success",
"title": "Deploy",
"message": {"branch": "main", "duration": 38, "passed": True},
},
)
let url = URL(string: "https://api.pushmark.app/YOUR_CHANNEL_HASH")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try! JSONSerialization.data(withJSONObject: [
"type": "success",
"title": "Deploy",
"message": ["branch": "main", "duration": 38, "passed": true]
])
URLSession.shared.dataTask(with: request).resume()
What to read next
- Back to Send a Notification for the basic flow.
- Go to AI Agents and MCP to send notifications from AI agents over MCP.