Railhook PII Masking API

PII masking rules for payload sanitization

GitHub OpenAPI

Operations 6

PUT /api/v1/projects/{projectId}/pii-rules/{ruleId} Update PII masking rule #
DELETE /api/v1/projects/{projectId}/pii-rules/{ruleId} Delete PII masking rule #
GET /api/v1/projects/{projectId}/pii-rules List PII masking rules #
POST /api/v1/projects/{projectId}/pii-rules Create PII masking rule #
POST /api/v1/projects/{projectId}/pii-rules/seed-defaults Seed default rules #
POST /api/v1/projects/{projectId}/pii-rules/preview Preview sanitized payload #

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-pii-masking-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-pii-masking-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook PII Masking 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: PII Masking
  description: PII masking rules for payload sanitization
paths:
  /api/v1/projects/{projectId}/pii-rules/{ruleId}:
    put:
      tags:
      - PII Masking
      summary: Update PII masking rule
      description: Updates an existing masking rule
      operationId: updatePiiRule
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PiiMaskingRuleRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PiiMaskingRuleResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    delete:
      tags:
      - PII Masking
      summary: Delete PII masking rule
      description: Deletes a masking rule
      operationId: deletePiiRule
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Rule deleted
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/pii-rules:
    get:
      tags:
      - PII Masking
      summary: List PII masking rules
      description: Returns all masking rules for the project
      operationId: listPiiRules
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PiiMaskingRuleResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    post:
      tags:
      - PII Masking
      summary: Create PII masking rule
      description: Creates a new masking rule for the project
      operationId: createPiiRule
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PiiMaskingRuleRequest'
        required: true
      responses:
        '201':
          description: Rule created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PiiMaskingRuleResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/pii-rules/seed-defaults:
    post:
      tags:
      - PII Masking
      summary: Seed default rules
      description: Creates default built-in PII masking rules (email, phone, card)
      operationId: seedDefaults
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Default rules seeded
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PiiMaskingRuleResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/pii-rules/preview:
    post:
      tags:
      - PII Masking
      summary: Preview sanitized payload
      description: Applies current PII rules to a sample payload and returns the result
      operationId: previewSanitization
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: string
      security:
      - bearerAuth: []
      - apiKey: []
components:
  schemas:
    PiiMaskingRuleResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        ruleType:
          type: string
          enum:
          - BUILTIN
          - CUSTOM
        patternName:
          type: string
        jsonPath:
          type: string
        maskStyle:
          type: string
          enum:
          - FULL
          - PARTIAL
          - HASH
        enabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PiiMaskingRuleRequest:
      type: object
      properties:
        patternName:
          type: string
          maxLength: 100
          minLength: 0
        jsonPath:
          type: string
          maxLength: 500
          minLength: 0
        maskStyle:
          type: string
          enum:
          - FULL
          - PARTIAL
          - HASH
        enabled:
          type: boolean
      required:
      - maskStyle
      - patternName
  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_…