Railhook Transform Preview API

Preview payload transformations and dry-run deliveries

GitHub OpenAPI

Operations 2

POST /api/v1/projects/{projectId}/transform-preview Preview transform #
POST /api/v1/projects/{projectId}/transform-preview/delivery-dry-run Dry-run delivery #

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-transform-preview-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-transform-preview-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook Transform Preview 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: Transform Preview
  description: Preview payload transformations and dry-run deliveries
paths:
  /api/v1/projects/{projectId}/transform-preview:
    post:
      tags:
      - Transform Preview
      summary: Preview transform
      description: Test a payload transform expression against sample input
      operationId: preview
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformPreviewRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TransformPreviewResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/transform-preview/delivery-dry-run:
    post:
      tags:
      - Transform Preview
      summary: Dry-run delivery
      description: 'Simulate a full delivery: transform payload, compute HMAC signature, build headers — without actually sending the request'
      operationId: deliveryDryRun
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveryDryRunRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DeliveryDryRunResponse'
      security:
      - bearerAuth: []
      - apiKey: []
components:
  schemas:
    DeliveryDryRunRequest:
      type: object
      description: 'Request to dry-run a delivery: shows what the endpoint would receive without actually sending'
      properties:
        payload:
          type: string
          description: The event payload JSON to transform
          example:
            type: order.created
            data:
              amount: 100
          minLength: 1
        transformationId:
          type: string
          format: uuid
          description: ID of a saved Transformation to apply (highest priority)
        payloadTemplate:
          type: string
          description: An unsaved template or script to apply. What the Transform Studio sends while you are still editing.
        kind:
          type: string
          description: The language `payloadTemplate` is written in. Omitted means TEMPLATE. A saved transformation brings its own and ignores this.
          enum:
          - TEMPLATE
          - JAVASCRIPT
        customHeaders:
          type: string
          description: Custom headers JSON to merge
          example:
            X-Custom: value
        endpointId:
          type: string
          format: uuid
          description: Endpoint ID to use for HMAC signature computation
        eventType:
          type: string
          description: Event type for X-Event-Type header
          example: order.created
      required:
      - payload
    ConsoleLine:
      type: object
      description: One console.* call a script made
      properties:
        level:
          type: string
          description: log, info, warn, error or debug
          example: log
        message:
          type: string
          description: The arguments, already formatted
    TransformPreviewRequest:
      type: object
      description: Run a transformation against a sample payload without saving or sending anything
      properties:
        inputPayload:
          type: string
          description: The event payload to transform
          minLength: 1
        transformExpression:
          type: string
          description: A bare JSONPath to extract, for the simplest case. Ignored when a template, script or transformation is given.
        template:
          type: string
          description: An unsaved template or script to run. This is what the Transform Studio sends while you are still editing.
        kind:
          type: string
          description: The language `template` is written in. Omitted means TEMPLATE.
          enum:
          - TEMPLATE
          - JAVASCRIPT
        transformationId:
          type: string
          format: uuid
          description: A saved transformation to run instead. Takes priority over `template`, and brings its own kind.
        customHeaders:
          type: string
          description: Headers to merge, as a JSON object. A script sees these as `webhook.headers` and may override them.
        eventType:
          type: string
          description: The event type a script sees as `webhook.eventType`
          example: order.completed
        eventId:
          type: string
          description: The event id a script sees as `webhook.eventId`
        url:
          type: string
          description: The destination URL a script sees as `webhook.url`. Read-only to the script; a transformation cannot redirect a delivery.
      required:
      - inputPayload
    TransformPreviewResponse:
      type: object
      description: What the transformation produced, and what it said while producing it
      properties:
        outputPayload:
          type: string
          description: The body that would be sent, pretty-printed. Null when the run failed or the script cancelled the delivery.
        outputHeaders:
          type: string
          description: 'The headers that would be sent, as a JSON object: the ones you supplied, with anything the script set merged over them'
        success:
          type: boolean
          description: Whether the run produced a payload
        errors:
          type: array
          description: What went wrong, in the order it went wrong
          items:
            type: string
        kind:
          type: string
          description: The language that actually ran
          enum:
          - TEMPLATE
          - JAVASCRIPT
        console:
          type: array
          description: Everything the script logged, oldest first. Always empty for a template, which has no console.
          items:
            $ref: '#/components/schemas/ConsoleLine'
        consoleTruncated:
          type: boolean
          description: True when the script logged more lines than the deployment keeps
        cancelled:
          type: boolean
          description: True when the script asked for the delivery to be dropped
        cancelReason:
          type: string
          description: Why the script cancelled, as the script stated it
        durationMs:
          type: integer
          format: int64
          description: Wall clock spent inside the script, in milliseconds
        errorLine:
          type: integer
          format: int32
          description: The line in the script the failure came from, 1-based, or null when the failure has no location
        errorReason:
          type: string
          description: 'Why the run produced nothing, as a value rather than as prose: SYNTAX, CONTRACT, RUNTIME, TIMEOUT, MEMORY, OUTPUT_TOO_LARGE, SOURCE_TOO_LARGE or UNAVAILABLE. Null when the run succeeded. A client shows its own wording for these; `errors` carries the engine''s, in English.'
          enum:
          - SYNTAX
          - CONTRACT
          - RUNTIME
          - TIMEOUT
          - MEMORY
          - OUTPUT_TOO_LARGE
          - SOURCE_TOO_LARGE
          - UNAVAILABLE
          example: TIMEOUT
    DeliveryDryRunResponse:
      type: object
      description: 'Dry-run delivery result: shows exactly what the endpoint would receive'
      properties:
        transformedPayload:
          type: string
          description: The transformed payload that would be sent as request body
        requestHeaders:
          type: object
          additionalProperties:
            type: string
          description: HTTP headers that would be sent with the request
        signature:
          type: string
          description: The HMAC signature header value (if endpoint provided)
        endpointUrl:
          type: string
          description: The endpoint URL where the payload would be delivered
        success:
          type: boolean
          description: Whether the dry-run completed successfully
        errors:
          type: array
          description: Any errors or warnings encountered during the dry-run
          items:
            type: string
        transformationName:
          type: string
          description: Name of the transformation applied (if any)
        transformationVersion:
          type: integer
          format: int32
          description: Version of the transformation applied (if any)
        transformationKind:
          type: string
          description: The language that actually ran
          enum:
          - TEMPLATE
          - JAVASCRIPT
        console:
          type: array
          description: Everything the script logged, oldest first. Empty for a template.
          items:
            $ref: '#/components/schemas/ConsoleLine'
        cancelled:
          type: boolean
          description: True when the script asked for the delivery to be dropped. Nothing would be sent, and there is no body to sign.
        cancelReason:
          type: string
          description: Why the script cancelled, as the script stated it
        durationMs:
          type: integer
          format: int64
          description: Wall clock spent inside the script, in milliseconds
        errorLine:
          type: integer
          format: int32
          description: The line in the script the failure came from, 1-based, or null when the failure has no location
        errorReason:
          type: string
          description: Why the script produced nothing, as a value rather than as prose. Same set as the transform preview's.
          enum:
          - SYNTAX
          - CONTRACT
          - RUNTIME
          - TIMEOUT
          - MEMORY
          - OUTPUT_TOO_LARGE
          - SOURCE_TOO_LARGE
          - UNAVAILABLE
          example: RUNTIME
  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_…