Railhook Subscriptions API
Event type subscriptions for endpoints
Event type subscriptions for endpoints
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/railhook-io:railhook-io-subscriptions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Railhook Subscriptions API
description: 'Send webhooks to the endpoints your customers register, and receive webhooks from any provider, with every attempt on record.
## What you can do
- **Outgoing**: post an event once; Railhook delivers it, signed, to every subscribed endpoint and retries on its own (1m → 24h, 7 attempts). What never arrives lands in Failed Messages.
- **Incoming**: give each provider its own ingress URL; Railhook verifies the signature and forwards the event to your destinations.
- **Replay**: send past events again with Time Machine.
## Authentication
- **API key** (`X-API-Key` header): project-scoped calls, including sending events. What the SDKs use.
- **Bearer token**: account and organization calls made on behalf of a signed-in user.
- **Portal session** (`Authorization: Bearer rhp_…`): the `/api/v1/portal/**` calls the embedded customer portal makes for one Consumer. Opened by your backend with an API key.
Guides: /docs/'
contact:
name: Railhook
url: https://github.com/vadymkykalo/railhook
license:
name: MIT
url: https://opensource.org/licenses/MIT
version: 1.0.0
servers:
- url: '{baseUrl}'
description: Your Railhook installation — the same origin the dashboard runs on
variables:
baseUrl:
description: Scheme and host of your installation, without a trailing slash
default: http://localhost:8080
security:
- bearerAuth: []
tags:
- name: Subscriptions
description: Event type subscriptions for endpoints
paths:
/api/v1/projects/{projectId}/subscriptions/{id}:
get:
tags:
- Subscriptions
summary: Get subscription
description: Returns subscription details
operationId: getSubscription
parameters:
- name: projectId
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/SubscriptionResponse'
security:
- bearerAuth: []
- apiKey: []
put:
tags:
- Subscriptions
summary: Update subscription
description: Updates subscription configuration
operationId: updateSubscription
parameters:
- name: projectId
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionRequest'
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/SubscriptionResponse'
security:
- bearerAuth: []
- apiKey: []
delete:
tags:
- Subscriptions
summary: Delete subscription
description: Removes a subscription
operationId: deleteSubscription
parameters:
- name: projectId
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'204':
description: Subscription deleted
security:
- bearerAuth: []
- apiKey: []
patch:
tags:
- Subscriptions
summary: Patch subscription
description: Partially updates subscription (e.g., toggle ordering)
operationId: patchSubscription
parameters:
- name: projectId
in: path
required: true
schema:
type: string
format: uuid
- name: id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionRequest'
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/SubscriptionResponse'
security:
- bearerAuth: []
- apiKey: []
/api/v1/projects/{projectId}/subscriptions:
get:
tags:
- Subscriptions
summary: List subscriptions
description: Returns all subscriptions for the project
operationId: listSubscriptions
parameters:
- name: projectId
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/SubscriptionResponse'
security:
- bearerAuth: []
- apiKey: []
post:
tags:
- Subscriptions
summary: Create subscription
description: Subscribes an endpoint to specific event types
operationId: createSubscription
parameters:
- name: projectId
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionRequest'
required: true
responses:
'201':
description: Subscription created
content:
'*/*':
schema:
$ref: '#/components/schemas/SubscriptionResponse'
security:
- bearerAuth: []
- apiKey: []
components:
schemas:
SubscriptionRequest:
type: object
properties:
endpointId:
type: string
format: uuid
eventType:
type: string
minLength: 1
pattern: ^(\*{1,2}|[a-z][a-z0-9_]*)(\.([a-z][a-z0-9_]*|\*{1,2}))*$
enabled:
type: boolean
orderingEnabled:
type: boolean
maxAttempts:
type: integer
format: int32
maximum: 20
minimum: 1
timeoutSeconds:
type: integer
format: int32
maximum: 60
minimum: 1
retryDelays:
type: string
retryableStatuses:
type: string
maxLength: 255
minLength: 0
payloadTemplate:
type: string
customHeaders:
type: string
transformationId:
type: string
format: uuid
required:
- endpointId
- eventType
SubscriptionResponse:
type: object
properties:
id:
type: string
format: uuid
projectId:
type: string
format: uuid
endpointId:
type: string
format: uuid
eventType:
type: string
enabled:
type: boolean
orderingEnabled:
type: boolean
maxAttempts:
type: integer
format: int32
timeoutSeconds:
type: integer
format: int32
retryDelays:
type: string
retryableStatuses:
type: string
payloadTemplate:
type: string
customHeaders:
type: string
transformationId:
type: string
format: uuid
transformationName:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
securitySchemes:
bearerAuth:
type: http
description: JWT token obtained from /api/v1/auth/login
scheme: bearer
bearerFormat: JWT
apiKey:
type: apiKey
description: Project API key for event ingestion
name: X-API-Key
in: header
platformAdminToken:
type: apiKey
description: Cluster-operator credential (PLATFORM_ADMIN_TOKEN env var), independent of tenant org membership — required for cross-tenant admin endpoints
name: X-Platform-Admin-Token
in: header
portalSession:
type: http
description: Portal session token, returned once by POST /api/v1/projects/{projectId}/consumers/{consumerId}/portal-sessions
scheme: bearer
bearerFormat: rhp_…