Railhook Portal API

What the embedded customer portal calls, authenticated by a portal session

GitHub OpenAPI

Operations 10

GET /api/v1/portal/endpoints/{endpointId} Get portal endpoint #
PUT /api/v1/portal/endpoints/{endpointId} Update portal endpoint #
DELETE /api/v1/portal/endpoints/{endpointId} Delete portal endpoint #
GET /api/v1/portal/endpoints List portal endpoints #
POST /api/v1/portal/endpoints Create portal endpoint #
POST /api/v1/portal/endpoints/{endpointId}/rotate-secret Rotate portal endpoint secret #
POST /api/v1/portal/deliveries/{deliveryId}/retry Retry portal delivery #
GET /api/v1/portal/session Get portal session #
GET /api/v1/portal/deliveries List portal deliveries #
GET /api/v1/portal/deliveries/{deliveryId}/attempts List portal delivery attempts #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/railhook-io:railhook-io-portal-api"
All apis
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.

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.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

railhook-io-portal-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook Portal 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: Portal
  description: What the embedded customer portal calls, authenticated by a portal session
paths:
  /api/v1/portal/endpoints/{endpointId}:
    get:
      tags:
      - Portal
      summary: Get portal endpoint
      operationId: portalGetEndpoint
      parameters:
      - name: endpointId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PortalEndpointResponse'
      security:
      - portalSession: []
    put:
      tags:
      - Portal
      summary: Update portal endpoint
      description: Absent fields are left alone; eventTypes replaces the set
      operationId: portalUpdateEndpoint
      parameters:
      - name: endpointId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalEndpointRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PortalEndpointResponse'
      security:
      - portalSession: []
    delete:
      tags:
      - Portal
      summary: Delete portal endpoint
      operationId: portalDeleteEndpoint
      parameters:
      - name: endpointId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Endpoint deleted
      security:
      - portalSession: []
  /api/v1/portal/endpoints:
    get:
      tags:
      - Portal
      summary: List portal endpoints
      description: The consumer's own endpoints
      operationId: portalListEndpoints
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PortalEndpointResponse'
      security:
      - portalSession: []
    post:
      tags:
      - Portal
      summary: Create portal endpoint
      description: Registers an endpoint for the consumer. The signing secret is in this response only.
      operationId: portalCreateEndpoint
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalEndpointRequest'
        required: true
      responses:
        '201':
          description: Endpoint created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PortalEndpointResponse'
        '402':
          description: The project has reached its plan's endpoint limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - portalSession: []
  /api/v1/portal/endpoints/{endpointId}/rotate-secret:
    post:
      tags:
      - Portal
      summary: Rotate portal endpoint secret
      description: A new signing secret, shown in this response only. The old one keeps verifying for 24 hours.
      operationId: portalRotateEndpointSecret
      parameters:
      - name: endpointId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PortalEndpointResponse'
      security:
      - portalSession: []
  /api/v1/portal/deliveries/{deliveryId}/retry:
    post:
      tags:
      - Portal
      summary: Retry portal delivery
      description: Puts a failed delivery back on its retry ladder for another attempt
      operationId: portalRetryDelivery
      parameters:
      - name: deliveryId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '202':
          description: Retry scheduled
        '409':
          description: An attempt at this delivery is under way
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - portalSession: []
  /api/v1/portal/session:
    get:
      tags:
      - Portal
      summary: Get portal session
      description: The consumer and project this session is for, and the event types it can subscribe to
      operationId: portalGetSession
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PortalSessionInfoResponse'
      security:
      - portalSession: []
  /api/v1/portal/deliveries:
    get:
      tags:
      - Portal
      summary: List portal deliveries
      description: Deliveries to the consumer's endpoints, newest first
      operationId: portalListDeliveries
      parameters:
      - name: endpointId
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - PENDING
          - PROCESSING
          - SUCCESS
          - FAILED
          - DLQ
          - CANCELLED
      - name: page
        in: query
        description: Zero-based page index (0..N)
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - name: size
        in: query
        description: The size of the page to be returned
        required: false
        schema:
          type: integer
          default: 20
          minimum: 1
      - name: sort
        in: query
        description: 'Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.'
        required: false
        schema:
          type: array
          default:
          - createdAt,DESC
          items:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PagePortalDeliveryResponse'
      security:
      - portalSession: []
  /api/v1/portal/deliveries/{deliveryId}/attempts:
    get:
      tags:
      - Portal
      summary: List portal delivery attempts
      description: Every attempt at one delivery, with request and response
      operationId: portalListDeliveryAttempts
      parameters:
      - name: deliveryId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DeliveryAttemptResponse'
      security:
      - portalSession: []
components:
  schemas:
    PortalDeliveryResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        eventId:
          type: string
          format: uuid
        eventType:
          type: string
        endpointId:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - PENDING
          - PROCESSING
          - SUCCESS
          - FAILED
          - DLQ
          - CANCELLED
        attemptCount:
          type: integer
          format: int32
        maxAttempts:
          type: integer
          format: int32
        nextRetryAt:
          type: string
          format: date-time
        lastAttemptAt:
          type: string
          format: date-time
        succeededAt:
          type: string
          format: date-time
        failedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
    SortObject:
      type: object
      properties:
        empty:
          type: boolean
        sorted:
          type: boolean
        unsorted:
          type: boolean
    PageableObject:
      type: object
      properties:
        offset:
          type: integer
          format: int64
        paged:
          type: boolean
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        unpaged:
          type: boolean
    PagePortalDeliveryResponse:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: '#/components/schemas/PortalDeliveryResponse'
        number:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        pageable:
          $ref: '#/components/schemas/PageableObject'
        numberOfElements:
          type: integer
          format: int32
        first:
          type: boolean
        last:
          type: boolean
        empty:
          type: boolean
    PortalEndpointResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
        description:
          type: string
        enabled:
          type: boolean
        eventTypes:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        secret:
          type: string
          description: 'The signing secret: present only in the response that created or rotated it.'
        standardWebhooksSecret:
          type: string
          description: The same secret as a Standard Webhooks library expects it (whsec_…); present only with secret.
    PortalSessionInfoResponse:
      type: object
      properties:
        consumerName:
          type: string
        projectName:
          type: string
        expiresAt:
          type: string
          format: date-time
        allowedOrigin:
          type: string
          description: The origin the portal may be embedded in, or null for any.
        eventTypes:
          type: array
          description: 'Event types an Endpoint can subscribe to: the project''s event catalog when it has one, otherwise the types it has sent recently.'
          items:
            type: string
    PortalEndpointRequest:
      type: object
      properties:
        url:
          type: string
          minLength: 1
        description:
          type: string
          maxLength: 500
          minLength: 0
        enabled:
          type: boolean
        eventTypes:
          type: array
          description: 'The event types this Endpoint receives. Replaces the current set; absent leaves it alone. Wildcards: order.* (one segment), order.** and ** (everything).'
          items:
            type: string
            pattern: ^(\*{1,2}|[a-z][a-z0-9_]*)(\.([a-z][a-z0-9_]*|\*{1,2}))*$
          maxItems: 100
          minItems: 0
      required:
      - url
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        status:
          type: integer
          format: int32
        fieldErrors:
          type: object
          additionalProperties:
            type: string
    DeliveryAttemptResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        deliveryId:
          type: string
          format: uuid
        attemptNumber:
          type: integer
          format: int32
        requestHeaders:
          type: string
        requestBody:
          type: string
        httpStatusCode:
          type: integer
          format: int32
        responseHeaders:
          type: string
        responseBody:
          type: string
        errorMessage:
          type: string
        durationMs:
          type: integer
          format: int32
        createdAt:
          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_…