Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Percher Alerts API
version: 1.0.0
description: AI-native hosting platform. Deploy apps via CLI, MCP, or API — live at name.percher.run.
contact:
url: https://percher.app
servers:
- url: https://api.percher.run
description: Production
- url: http://localhost:3000
description: Local development
tags:
- name: Alerts
paths:
/alerts/preferences:
get:
tags:
- Alerts
summary: Get the user's alert preferences
description: Returns boolean flags for email channels (crash, deploy-fail, domain expiry, weekly summary) plus the current webhook URL and a `hasWebhookSecret` boolean. The signing secret itself is never returned here — only on PUT when a new URL is saved.
security:
- bearer: []
responses:
'200':
description: Alert preferences (secret omitted)
content:
application/json: {}
'401':
description: Unauthorized
operationId: getAlertsPreferences
x-operation-id-source: derived
put:
tags:
- Alerts
summary: Update alert preferences
description: 'Upserts the user''s preferences. If `webhookUrl` is set (or changed), a new HMAC-SHA256 signing secret is generated and returned once in the response as `webhookSecret`. It is never shown again — the user must copy it into their receiver. Subsequent saves without a URL change keep the existing secret; saving a different URL rotates it; clearing the URL clears the secret.
Webhook payload format (POST to the configured URL):
- Body: `{ type, id, timestamp, data }` (JSON)
- Headers: `X-Percher-Event`, `X-Percher-Delivery`, `X-Percher-Timestamp`, `X-Percher-Signature: sha256=`
- Signature = HMAC-SHA256(secret, `${timestamp}.${body}`)
- Event types: `deploy.failed`, `deploy.succeeded`, `app.crashed`, `app.unhealthy`, `app.recovered`, `domain.expiring`, `security.finding`'
security:
- bearer: []
requestBody:
content:
application/json: {}
responses:
'200':
description: Updated preferences. If a new secret was generated, it is included as `webhookSecret`.
content:
application/json: {}
'400':
description: Validation error
'401':
description: Unauthorized
operationId: putAlertsPreferences
x-operation-id-source: derived
components:
securitySchemes:
exportPreparation:
type: http
scheme: bearer
bearerFormat: pce_<43 base64url characters>
description: Separate preparation capability. An account API/OAuth token or operation ID is not a preparation credential.
bearer:
type: http
scheme: bearer
description: API token from `percher login`
internalSecret:
type: apiKey
in: header
name: X-Internal-Secret
description: Internal service secret