Railhook Consumers API

Your own users, their endpoints, and the portal sessions you open for them

GitHub OpenAPI

Operations 8

GET /api/v1/projects/{projectId}/consumers/{consumerId} Get consumer #
PUT /api/v1/projects/{projectId}/consumers/{consumerId} Update consumer #
DELETE /api/v1/projects/{projectId}/consumers/{consumerId} Delete consumer #
GET /api/v1/projects/{projectId}/consumers List consumers #
POST /api/v1/projects/{projectId}/consumers Create consumer #
POST /api/v1/projects/{projectId}/consumers/{consumerId}/portal-sessions Create portal session #
DELETE /api/v1/projects/{projectId}/consumers/{consumerId}/portal-sessions Revoke portal sessions #
GET /api/v1/projects/{projectId}/consumers/{consumerId}/endpoints List consumer endpoints #

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-consumers-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-consumers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook Consumers 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: Consumers
  description: Your own users, their endpoints, and the portal sessions you open for them
paths:
  /api/v1/projects/{projectId}/consumers/{consumerId}:
    get:
      tags:
      - Consumers
      summary: Get consumer
      operationId: getConsumer
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: consumerId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ConsumerResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    put:
      tags:
      - Consumers
      summary: Update consumer
      operationId: updateConsumer
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: consumerId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsumerRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ConsumerResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    delete:
      tags:
      - Consumers
      summary: Delete consumer
      description: Deletes the consumer, deletes its endpoints and ends its portal sessions
      operationId: deleteConsumer
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: consumerId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Consumer deleted
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/consumers:
    get:
      tags:
      - Consumers
      summary: List consumers
      description: Returns the project's consumers; externalId narrows it to one
      operationId: listConsumers
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: externalId
        in: query
        description: Your own id for the user
        required: false
        schema:
          type: string
      - 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/PageConsumerResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    post:
      tags:
      - Consumers
      summary: Create consumer
      description: Registers one of your users, identified by your own id
      operationId: createConsumer
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsumerRequest'
        required: true
      responses:
        '201':
          description: Consumer created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ConsumerResponse'
        '409':
          description: A consumer with this externalId already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/consumers/{consumerId}/portal-sessions:
    post:
      tags:
      - Consumers
      summary: Create portal session
      description: Opens the customer portal for this consumer. The response carries the token once; only its hash is stored.
      operationId: createPortalSession
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: consumerId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalSessionRequest'
      responses:
        '201':
          description: Session created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PortalSessionResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    delete:
      tags:
      - Consumers
      summary: Revoke portal sessions
      description: Ends every open portal session of this consumer
      operationId: revokePortalSessions
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: consumerId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Sessions revoked
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/consumers/{consumerId}/endpoints:
    get:
      tags:
      - Consumers
      summary: List consumer endpoints
      description: The endpoints registered for this consumer
      operationId: listConsumerEndpoints
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: consumerId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EndpointResponse'
      security:
      - bearerAuth: []
      - apiKey: []
components:
  schemas:
    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
    PageConsumerResponse:
      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/ConsumerResponse'
        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
    PortalSessionResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        consumerId:
          type: string
          format: uuid
        url:
          type: string
          description: The portal, ready to open or to put in an iframe's src. The token travels in the fragment, which a browser never sends to a server.
        token:
          type: string
          description: The bearer token for /api/v1/portal/**. Shown once; only its hash is stored.
        allowedOrigin:
          type: string
        expiresAt:
          type: string
          format: date-time
    PortalSessionRequest:
      type: object
      properties:
        ttlMinutes:
          type: integer
          format: int32
          description: How long the session lasts, in minutes. Defaults to 60.
          maximum: 1440
          minimum: 1
        allowedOrigin:
          type: string
          description: The origin of the page that embeds the portal, e.g. https://app.example.com. When set, the portal refuses to render inside any other page.
          example: https://app.example.com
          pattern: ^(https://[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*|http://(?:localhost|127\.0\.0\.1))(?::[0-9]{1,5})?$
    ConsumerResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        externalId:
          type: string
        name:
          type: string
        endpointCount:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        status:
          type: integer
          format: int32
        fieldErrors:
          type: object
          additionalProperties:
            type: string
    ConsumerRequest:
      type: object
      properties:
        externalId:
          type: string
          description: Your own identifier for this user, unique within the project — typically the user or tenant id in your database.
          maxLength: 255
          minLength: 0
        name:
          type: string
          description: 'Shown at the top of the portal. Absent: the externalId on create, unchanged on update.'
          maxLength: 255
          minLength: 0
      required:
      - externalId
    EndpointResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        consumerId:
          type: string
          format: uuid
        url:
          type: string
        description:
          type: string
        enabled:
          type: boolean
        rateLimitPerSecond:
          type: integer
          format: int32
        allowedSourceIps:
          type: string
        mtlsEnabled:
          type: boolean
        verificationStatus:
          type: string
        verificationAttemptedAt:
          type: string
          format: date-time
        verificationCompletedAt:
          type: string
          format: date-time
        verificationSkipReason:
          type: string
        failingSince:
          type: string
          format: date-time
        consecutiveFailures:
          type: integer
          format: int32
        autoDisabledAt:
          type: string
          format: date-time
        autoDisabledReason:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        secret:
          type: string
        signatureScheme:
          type: string
          enum:
          - LEGACY
          - STANDARD
          - BOTH
        standardWebhooksSecret:
          type: string
  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_…