Skip to main content

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

FieldTypeRequiredDefaultNotes
messagestring or JSON object/arrayYesThe notification payload. A plain string, or structured JSON (see String vs JSON messages).
typestringNologSeverity. One of info, success, warning, error, log.
titlestringNoPushmarkAlert title shown above the message.
imagesstring[]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:

  • info
  • success
  • warning
  • error
  • log

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 -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 }
}'