Railhook Transformations API

Reusable payload transformation templates

GitHub OpenAPI

Operations 9

GET /api/v1/projects/{projectId}/transformations/{id} Get transformation #
PUT /api/v1/projects/{projectId}/transformations/{id} Update transformation #
DELETE /api/v1/projects/{projectId}/transformations/{id} Delete transformation #
GET /api/v1/projects/{projectId}/transformations List transformations #
POST /api/v1/projects/{projectId}/transformations Create transformation #
POST /api/v1/projects/{projectId}/transformations/{id}/versions/{version}/restore Restore a transformation version #
GET /api/v1/projects/{projectId}/transformations/{id}/versions List transformation versions #
GET /api/v1/projects/{projectId}/transformations/{id}/versions/{version} Get one transformation version #
GET /api/v1/projects/{projectId}/transformations/{id}/versions/diff Compare two transformation versions #

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-transformations-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-transformations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook Transformations 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: Transformations
  description: Reusable payload transformation templates
paths:
  /api/v1/projects/{projectId}/transformations/{id}:
    get:
      tags:
      - Transformations
      summary: Get transformation
      description: Returns transformation details
      operationId: getTransformation
      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/TransformationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    put:
      tags:
      - Transformations
      summary: Update transformation
      description: Updates transformation (auto-increments version when template changes)
      operationId: updateTransformation
      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/TransformationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TransformationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    delete:
      tags:
      - Transformations
      summary: Delete transformation
      description: Removes a transformation (subscriptions/destinations referencing it will have transformation_id set to NULL)
      operationId: deleteTransformation
      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: Transformation deleted
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/transformations:
    get:
      tags:
      - Transformations
      summary: List transformations
      description: Returns all transformations for the project
      operationId: listTransformations
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TransformationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    post:
      tags:
      - Transformations
      summary: Create transformation
      description: Creates a reusable payload transformation template
      operationId: createTransformation
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformationRequest'
        required: true
      responses:
        '201':
          description: Transformation created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TransformationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/transformations/{id}/versions/{version}/restore:
    post:
      tags:
      - Transformations
      summary: Restore a transformation version
      description: 'Publishes an earlier template again as a new version. The versions published after it are kept: a restore moves the transformation forward rather than rewinding its history.'
      operationId: restoreTransformationVersion
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: version
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TransformationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/transformations/{id}/versions:
    get:
      tags:
      - Transformations
      summary: List transformation versions
      description: Returns every published version of this transformation's template, newest first, with who published it and when. The templates themselves are omitted — fetch one version to read it.
      operationId: listTransformationVersions
      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:
                type: array
                items:
                  $ref: '#/components/schemas/TransformationVersionResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/transformations/{id}/versions/{version}:
    get:
      tags:
      - Transformations
      summary: Get one transformation version
      description: Returns one published version, including the template it published
      operationId: getTransformationVersion
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: version
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TransformationVersionResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/transformations/{id}/versions/diff:
    get:
      tags:
      - Transformations
      summary: Compare two transformation versions
      description: Returns both templates whole and the list of places they differ, each named by its JSONPath
      operationId: diffTransformationVersions
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: left
        in: query
        required: true
        schema:
          type: integer
          format: int32
      - name: right
        in: query
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TransformationVersionDiffResponse'
      security:
      - bearerAuth: []
      - apiKey: []
components:
  schemas:
    TransformationRequest:
      type: object
      description: Request to create or update a transformation
      properties:
        name:
          type: string
          description: Human-readable name for the transformation
          example: Stripe v2 → CRM v1
          maxLength: 255
          minLength: 0
        description:
          type: string
          description: Description of what this transformation does
          example: Normalizes Stripe payment events to CRM format
          maxLength: 4096
          minLength: 0
        template:
          type: string
          description: 'The transformation itself: a JSON template with ${$.jsonpath} expressions when kind is TEMPLATE, or a JavaScript `function handler(webhook) { ... }` when kind is JAVASCRIPT'
          example:
            event_type: ${$.type}
            amount: ${$.data.amount}
          maxLength: 65536
          minLength: 0
        kind:
          type: string
          description: The language the template is written in. Omitted means TEMPLATE, which is what every transformation was before JavaScript existed.
          enum:
          - TEMPLATE
          - JAVASCRIPT
          example: TEMPLATE
        enabled:
          type: boolean
          description: Whether this transformation is active
          example: true
      required:
      - name
      - template
    TransformationVersionDiffResponse:
      type: object
      description: Two versions of a transformation's template, and what changed between them
      properties:
        transformationId:
          type: string
          format: uuid
        leftVersion:
          type: integer
          format: int32
        rightVersion:
          type: integer
          format: int32
        leftCreatedAt:
          type: string
          format: date-time
        rightCreatedAt:
          type: string
          format: date-time
        leftTemplate:
          type: string
          description: The whole left-hand template, so the caller can render both sides as well as the changes
        rightTemplate:
          type: string
          description: The whole right-hand template
        leftKind:
          type: string
          description: The language the left-hand version was published in
          enum:
          - TEMPLATE
          - JAVASCRIPT
          example: TEMPLATE
        rightKind:
          type: string
          description: The language the right-hand version was published in
          enum:
          - TEMPLATE
          - JAVASCRIPT
          example: JAVASCRIPT
        diffs:
          type: array
          description: 'Field-by-field changes between the two templates. Empty when either side is a JAVASCRIPT version: a script has no fields to compare, so the two texts are diffed line by line instead.'
          items:
            $ref: '#/components/schemas/JsonDiffEntry'
    TransformationResponse:
      type: object
      description: 'A reusable transformation: one mapping, pointed at by any number of subscriptions and destinations'
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        name:
          type: string
          description: Unique within the project
          example: Stripe v2 → CRM v1
        description:
          type: string
          description: What it does and when to use it
        template:
          type: string
          description: 'The transformation itself: a JSON document with ${$.jsonpath} expressions when `kind` is TEMPLATE, or a JavaScript `function handler(webhook)` when it is JAVASCRIPT'
        kind:
          type: string
          description: The language `template` is written in. Every transformation created before JavaScript existed is TEMPLATE, and none were migrated.
          enum:
          - TEMPLATE
          - JAVASCRIPT
          example: TEMPLATE
        version:
          type: integer
          format: int32
          description: Incremented every time the template or the language changes. Each value is a row in the version history, and can be read back and restored.
          example: 3
        enabled:
          type: boolean
          description: A disabled transformation cannot be assigned, and a delivery already pointed at one fails rather than sending the untransformed payload
        subscriptionCount:
          type: integer
          format: int64
          description: How many subscriptions point at this transformation
          example: 2
        destinationCount:
          type: integer
          format: int64
          description: How many incoming destinations point at this transformation
          example: 0
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    TransformationVersionResponse:
      type: object
      description: One published version of a transformation's template
      properties:
        id:
          type: string
          format: uuid
        transformationId:
          type: string
          format: uuid
        version:
          type: integer
          format: int32
          description: The version number this template was published as
          example: 3
        template:
          type: string
          description: The template itself. Omitted from the list of versions — fetch one version to read it.
        kind:
          type: string
          description: The language this version was published in. Restoring it puts the language back as well as the text, so a restore cannot leave a script in a row marked TEMPLATE or the other way round.
          enum:
          - TEMPLATE
          - JAVASCRIPT
          example: TEMPLATE
        current:
          type: boolean
          description: Whether this is the version the transformation is currently using
        restoredFromVersion:
          type: integer
          format: int32
          description: Set when this version was published by restoring an earlier one, naming that earlier version
          example: 1
        createdBy:
          type: string
          format: uuid
          description: The user who published it. Null when it was published with an API key, or the user has since been erased.
        createdByEmail:
          type: string
          description: Email of the user who published it, resolved at read time so an erasure takes the name and leaves the change
        createdAt:
          type: string
          format: date-time
    JsonDiffEntry:
      type: object
      properties:
        path:
          type: string
        type:
          type: string
          enum:
          - ADDED
          - REMOVED
          - CHANGED
        leftValue: {}
        rightValue: {}
  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_…