Railhook Organizations API

Organization member management

GitHub OpenAPI

Operations 13

GET /api/v1/orgs/{orgId} Get organization #
PUT /api/v1/orgs/{orgId} Update organization #
DELETE /api/v1/orgs/{orgId} Delete organization (GDPR) #
GET /api/v1/orgs/{orgId}/members List members #
POST /api/v1/orgs/{orgId}/members Add member #
POST /api/v1/orgs/{orgId}/members/{userId}/suspend Suspend member #
POST /api/v1/orgs/{orgId}/members/{userId}/reinstate Reinstate member #
POST /api/v1/orgs/{orgId}/members/{userId}/invite Re-issue invite #
POST /api/v1/orgs/{orgId}/members/accept-invite Accept invite #
DELETE /api/v1/orgs/{orgId}/members/{userId} Remove member #
PATCH /api/v1/orgs/{orgId}/members/{userId} Change member role #
GET /api/v1/orgs List user organizations #
GET /api/v1/orgs/{orgId}/export Export organization data (GDPR Article 20) #

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-organizations-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-organizations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook Organizations 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: Organizations
  description: Organization member management
paths:
  /api/v1/orgs/{orgId}:
    get:
      tags:
      - Organizations
      summary: Get organization
      description: Returns organization details
      operationId: getOrganization
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    put:
      tags:
      - Organizations
      summary: Update organization
      description: Updates organization details (owner only)
      operationId: updateOrganization
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    delete:
      tags:
      - Organizations
      summary: Delete organization (GDPR)
      description: Permanently deletes the organization and all associated data. This action is irreversible. Owner only.
      operationId: deleteOrganization
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Organization deleted
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs/{orgId}/members:
    get:
      tags:
      - Organizations
      summary: List members
      description: Returns all members of the organization
      operationId: getMembers
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MemberResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    post:
      tags:
      - Organizations
      summary: Add member
      description: Invites a user to the organization
      operationId: addMember
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddMemberRequest'
        required: true
      responses:
        '201':
          description: Member added
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MemberResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs/{orgId}/members/{userId}/suspend:
    post:
      tags:
      - Organizations
      summary: Suspend member
      description: 'Suspends a member: the membership and its role are kept, the member is refused access, and their current sessions end immediately'
      operationId: suspendMember
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Member suspended
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MemberResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs/{orgId}/members/{userId}/reinstate:
    post:
      tags:
      - Organizations
      summary: Reinstate member
      description: Lifts a suspension, restoring the member's access in the role they kept
      operationId: reinstateMember
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Member reinstated
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MemberResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs/{orgId}/members/{userId}/invite:
    post:
      tags:
      - Organizations
      summary: Re-issue invite
      description: Issues a fresh invite token for a member whose invite is still pending, replacing the previous one and restarting its 48-hour expiry. The accept-invite link is returned so an owner can pass it on when email delivery is not configured.
      operationId: reissueInvite
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Invite re-issued
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MemberResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs/{orgId}/members/accept-invite:
    post:
      tags:
      - Organizations
      summary: Accept invite
      description: Accepts an organization membership invite using the invite token
      operationId: acceptInvite
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: token
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Invite accepted
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MemberResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs/{orgId}/members/{userId}:
    delete:
      tags:
      - Organizations
      summary: Remove member
      description: Removes a member from the organization
      operationId: removeMember
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Member removed
      security:
      - bearerAuth: []
      - apiKey: []
    patch:
      tags:
      - Organizations
      summary: Change member role
      description: Updates a member's role to DEVELOPER or VIEWER. OWNER cannot be assigned here (409); API_KEY is not a human role and is never granted to a member.
      operationId: changeMemberRole
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeMemberRoleRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MemberResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs:
    get:
      tags:
      - Organizations
      summary: List user organizations
      description: Returns all organizations the user belongs to
      operationId: getUserOrganizations
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/orgs/{orgId}/export:
    get:
      tags:
      - Organizations
      summary: Export organization data (GDPR Article 20)
      description: Exports all organization data in machine-readable JSON format. Includes organization info, members, projects, endpoints, subscriptions, incoming sources/destinations, API keys (metadata only), and audit logs. No decrypted secrets are included. Owner only.
      operationId: exportOrganizationData
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Data export as JSON
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GdprExportDto'
        '403':
          description: Forbidden — requires OWNER role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - bearerAuth: []
      - apiKey: []
components:
  schemas:
    OrganizationResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        createdAt:
          type: string
          format: date-time
    AuditLogData:
      type: object
      properties:
        action:
          type: string
        resourceType:
          type: string
        resourceId:
          type: string
          format: uuid
        status:
          type: string
        clientIp:
          type: string
        createdAt:
          type: string
          format: date-time
    GdprExportDto:
      type: object
      properties:
        exportVersion:
          type: string
        exportedAt:
          type: string
          format: date-time
        organization:
          $ref: '#/components/schemas/OrganizationData'
        members:
          type: array
          items:
            $ref: '#/components/schemas/MemberData'
        projects:
          type: array
          items:
            $ref: '#/components/schemas/ProjectData'
        auditLogs:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogData'
        auditLogsTruncated:
          type: boolean
        auditLogsTotal:
          type: integer
          format: int64
    MemberData:
      type: object
      properties:
        userId:
          type: string
          format: uuid
        email:
          type: string
        fullName:
          type: string
        role:
          type: string
        status:
          type: string
        joinedAt:
          type: string
          format: date-time
    ChangeMemberRoleRequest:
      type: object
      properties:
        role:
          type: string
          enum:
          - OWNER
          - DEVELOPER
          - VIEWER
          - API_KEY
      required:
      - role
    SubscriptionData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        endpointId:
          type: string
          format: uuid
        eventType:
          type: string
        enabled:
          type: boolean
        orderingEnabled:
          type: boolean
        maxAttempts:
          type: integer
          format: int32
        timeoutSeconds:
          type: integer
          format: int32
        createdAt:
          type: string
          format: date-time
    IncomingSourceData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        providerType:
          type: string
        verificationMode:
          type: string
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        destinations:
          type: array
          items:
            $ref: '#/components/schemas/IncomingDestinationData'
    IncomingDestinationData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
        authType:
          type: string
        enabled:
          type: boolean
        maxAttempts:
          type: integer
          format: int32
        timeoutSeconds:
          type: integer
          format: int32
        createdAt:
          type: string
          format: date-time
    EndpointData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
        description:
          type: string
        enabled:
          type: boolean
        mtlsEnabled:
          type: boolean
        rateLimitPerSecond:
          type: integer
          format: int32
        createdAt:
          type: string
          format: date-time
    ProjectData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        createdAt:
          type: string
          format: date-time
        endpoints:
          type: array
          items:
            $ref: '#/components/schemas/EndpointData'
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionData'
        incomingSources:
          type: array
          items:
            $ref: '#/components/schemas/IncomingSourceData'
        apiKeys:
          type: array
          items:
            $ref: '#/components/schemas/ApiKeyData'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        status:
          type: integer
          format: int32
        fieldErrors:
          type: object
          additionalProperties:
            type: string
    MemberResponse:
      type: object
      properties:
        userId:
          type: string
          format: uuid
        email:
          type: string
        role:
          type: string
          enum:
          - OWNER
          - DEVELOPER
          - VIEWER
          - API_KEY
        status:
          type: string
          enum:
          - INVITED
          - ACTIVE
          - DISABLED
        createdAt:
          type: string
          format: date-time
        inviteExpiresAt:
          type: string
          format: date-time
        inviteUrl:
          type: string
    AddMemberRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          minLength: 1
        role:
          type: string
          enum:
          - OWNER
          - DEVELOPER
          - VIEWER
          - API_KEY
      required:
      - email
      - role
    OrganizationData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        billingEmail:
          type: string
        plan:
          type: string
        billingStatus:
          type: string
        createdAt:
          type: string
          format: date-time
    UpdateOrganizationRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 2
      required:
      - name
    ApiKeyData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        keyPrefix:
          type: string
        scope:
          type: string
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        lastUsedAt:
          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_…