Skip to content
Docs

API reference

Base URL, authentication, formats, errors, limits, and discovery files for the public Opush HTTP API.

The Opush API is plain HTTP. You can call it with curl, any HTTP library, or a no-code tool that sends webhooks. The push endpoints use the common push URL format, so existing clients and integrations work too.

Base URL

https://opu.sh

All endpoints on this page sit at the root of opu.sh. Enterprise deployments run on their own host, which may include a path prefix such as https://opush.example.com/api. Put the prefix in front of every path. See Enterprise.

Endpoints

AreaEndpointsReference
Push/{device_key}, /push, /c/{push_key}Push
Questions/ask, /ask/{question_id}Ask
Escalation alerts/alerts/{alert_id}Alerts
Heartbeats/hb/{check_id}Heartbeats
Status pages/s/{slug}, status.json, feed.atom, badge.svgStatus pages
MCP/mcp, /mcp/{device_key}MCP server
Health/healthz, /ping, /infoBelow

The /v1 API is private. The Opush apps and web console use it, and it isn't covered here.

Authentication

Most endpoints use a secret in the URL instead of a header. Whoever has the URL can use it, so treat each one like a password.

SecretWhere you get itWhat it allows
Device key (YOUR_KEY, 22 characters)Your push URL in the app or web consoleSend pushes and questions to that device, use /mcp/{device_key}
Channel keyThe channel's push URLSend pushes to a team channel
Check IDA heartbeat's check-in URLCheck in for that heartbeat
Question ID (q_…)The /ask responseRead or cancel that question
Alert ID (al_…)The push response with escalateRead or cancel that alert

None of these give access to your account. If a URL leaks, replace it. The old one stops working right away:

  • Device key: in the app, on the device's push URL (the web console can't change a device's key).
  • Channel key: on the channel's page, in the app or the web console (the channel owner).
  • Check ID: delete the heartbeat and create a new one. A check ID can't be changed.
  • Question and alert IDs stop working on their own when the question or alert ends.

For account access, such as reading monitors or posting status page incidents, use MCP with OAuth or a token (Authorization: Bearer omt_…).

Public status pages need no authentication at all.

Enterprise servers

An enterprise server can also require HTTP Basic Auth on push and /ask. Send Authorization: Basic …. If it does, send MCP tokens in the X-Opush-Token header instead.

Requests

Push and /ask accept parameters in three ways:

  • Query string: ?title=Hello&group=ci. Good for GET and simple tools.
  • Form: application/x-www-form-urlencoded or multipart/form-data.
  • JSON: Content-Type: application/json. Best for code. Numbers and booleans can be real JSON types.

Text must be UTF-8. URL-encode values in paths and query strings.

Responses

Push endpoints

Push endpoints answer in the push response format. The HTTP status always matches code.

{
  "code": 200,
  "message": "success",
  "timestamp": 1793546000,
  "data": { "escalation": { "alert_id": "al_…", "status_url": "https://opu.sh/alerts/al_…" } }
}
FieldMeaning
codeSame as the HTTP status
messagesuccess, another short status like scheduled, or an English error message
timestampServer time in Unix seconds
dataOnly present when there is something to report

Errors use the same shape, for example { "code": 400, "message": "failed to get device token: device key not found", "timestamp": 1793546000 }.

Other endpoints

/ask and /alerts return plain JSON objects. Their errors look like this:

{ "error": { "code": "not_found", "message": "Question not found." } }

code is a stable machine-readable string. message is for developers and can change.

Formats

  • Field names use snake_case.
  • Times are RFC 3339 strings in UTC, like 2026-11-04T09:30:00Z. The timestamp in push responses is Unix seconds.
  • IDs have a prefix (q_, al_, sch_) and are otherwise opaque. Don't parse them.

Errors

StatusMeaning
400Bad request: unknown key, invalid parameter, or broken JSON. Read message.
401Authentication required (MCP without a token, or an enterprise server with Basic Auth)
403Not allowed: the account was suspended, or a plan limit was reached. Read message
404Not found
413The push is larger than 4096 bytes
429Too many requests. Wait for Retry-After
500Delivery failed. Try again later
503The device can't be reached, or the server is busy

Rate limits

When you go over a limit, you get 429 with a Retry-After header in seconds. When the server is briefly busy, you can get 503 with Retry-After too.

  • Each device can receive a limited number of pushes per minute.
  • A batch push can include a limited number of device keys.
  • How many pushes, texts, calls, and monitors you get depends on your plan. See Pricing.

Don't hard-code limits. Retry after the time the server tells you.

Versioning

  • Push endpoints keep the same URL format, parameters and responses.
  • Changes are additive: new fields, new endpoints, new values. Ignore fields you don't know, and handle unknown values in fields like status.
  • The MCP server supports protocol versions 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05.

Health checks

EndpointResponse
GET /healthzPlain text ok
GET /ping{ "code": 200, "message": "pong", "timestamp": … }
GET /info{ "version": "…", "build": "", "arch": "workers", "commit": "", "devices": 0 }, the server info format push clients expect. The official server doesn't share its device count.

CORS

CORS is enabled for /mcp, the discovery files below, and status page JSON (status.json), so browser code on any site can call them.

Push, /ask, and /alerts don't send CORS headers. Call them from a server, a script, or a backend function, not from browser code on another site. That also keeps your device key out of public web pages.

Discovery

Opush publishes machine-readable files so AI agents and tools can find the API on their own. All of them allow CORS.

FileWhat it describes
/.well-known/api-catalogThe API catalog (RFC 9727, application/linkset+json): MCP and the API, with links to docs and status
/.well-known/mcp/server-card.jsonThe MCP Server Card: tools, sign-in methods, and the endpoint. Also at /.well-known/mcp.json
/.well-known/oauth-protected-resourceOAuth protected resource metadata (RFC 9728), also at /.well-known/oauth-protected-resource/mcp
/.well-known/oauth-authorization-serverOAuth authorization server metadata (RFC 8414)
curl https://opu.sh/.well-known/mcp/server-card.json