Ranla Events API

Custom events that trigger transactional automations

GitHub OpenAPI

Operations 1

POST /events Ingest a custom event for automations #

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/ranla-ai:ranla-ai-events-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

ranla-ai-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ranla Events API
  version: 0.12.0
  description: 'Transactional email API for developers.

    Auth: `Authorization: Bearer rnl_…` or `stx_…` (or dashboard session cookie for integrations).

    Production base URL: https://api.ranla.ai'
servers:
- url: https://api.ranla.ai
  description: Production
tags:
- name: Events
  description: Custom events that trigger transactional automations
paths:
  /events:
    post:
      operationId: triggerEvent
      summary: Ingest a custom event for automations
      description: 'Starts a run on every active automation whose trigger matches the event name, resumes

        runs waiting for this event, and cancels runs for the same person whose automation lists

        it in `trigger.cancel_on_events`. An automation that matches but declines to enroll the

        same person again (`trigger.once_per_contact` or `trigger.cooldown_days`) is counted in

        `skipped_enrollments` and explained in `enrollment_skips`.'
      tags:
      - Events
      security:
      - bearerAuth: []
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          type: string
          maxLength: 256
        description: 'Optional idempotency key for replay-safe retries. Keys are kept for 24 hours;

          after that the same key is accepted as a new event. Use it to collapse retries,

          not to make an event fire once per person.

          '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerEventRequest'
            examples:
              userCreated:
                value:
                  name: user.created
                  user_id: user_123
                  email: user@example.com
                  data:
                    name: Ada Lovelace
      responses:
        '202':
          description: Event accepted for automation processing, with counts of runs started, resumed, cancelled, and skipped
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerEventResponse'
        '400':
          description: Invalid event payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Idempotency conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - message
          properties:
            message:
              type: string
            code:
              $ref: '#/components/schemas/ErrorCode'
            upgrade_url:
              type: string
              description: Dashboard path to upgrade when code is plan_limit or domain_limit
            details:
              description: 'Optional structured details. For send blocks this may include `suppressed` (global suppression list) or `category_unsubscribed` plus `category` and `email_id` (category opt-out).

                '
    EnrollmentSkip:
      type: object
      required:
      - automation_id
      - reason
      - prior_run_id
      - prior_run_at
      properties:
        automation_id:
          type: string
        reason:
          type: string
          enum:
          - once_per_contact
          - cooldown
          description: '`once_per_contact` — the person already had a run on this automation.

            `cooldown` — the person had a run on this automation within the last `cooldown_days` days.

            '
        prior_run_id:
          type: string
          description: The earlier run that blocked this enrollment
        prior_run_at:
          type: string
          format: date-time
          description: When that earlier run was created
    EventRecord:
      type: object
      required:
      - id
      - name
      - user_id
      - email
      - data
      - source
      - created_at
      properties:
        id:
          type: string
        name:
          type: string
        user_id:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
          format: email
        data:
          type: object
          additionalProperties: true
        source:
          type: string
          enum:
          - api
          - dashboard
          - on_site
          - posthog
          - mixpanel
          - amplitude
          description: 'Where the event came from: `api` (`POST /events` with an API key), `dashboard`,

            `on_site` (an on-site message on your website captured an email address), or

            `posthog`, `mixpanel`, `amplitude` (synced from a connected product-analytics account).

            '
        created_at:
          type: string
          format: date-time
    TriggerEventResponse:
      type: object
      required:
      - event
      - matched_automations
      - resumed_runs
      - cancelled_runs
      - skipped_enrollments
      properties:
        event:
          $ref: '#/components/schemas/EventRecord'
        matched_automations:
          type: integer
          description: 'Active automations whose trigger matched and that started a run for this event.

            Automations that matched but declined to enroll this person again are counted in

            `skipped_enrollments` instead.

            '
        resumed_runs:
          type: integer
          description: Waiting runs resumed by this event (`wait_for_event` steps)
        cancelled_runs:
          type: integer
          description: Active runs cancelled because this event matched `trigger.cancel_on_events`
        skipped_enrollments:
          type: integer
          description: 'Automations whose trigger matched but that did not enroll this person again because

            of `trigger.once_per_contact` or `trigger.cooldown_days`. 0 when none were skipped.

            '
        enrollment_skips:
          type: array
          description: One entry per skipped enrollment. Omitted when `skipped_enrollments` is 0.
          items:
            $ref: '#/components/schemas/EnrollmentSkip'
    TriggerEventRequest:
      type: object
      properties:
        name:
          type: string
          description: 'Canonical event name (alias: `type`)'
        type:
          type: string
          description: Alias for name
        user_id:
          type: string
        userId:
          type: string
          description: Alias for user_id
        email:
          type: string
          format: email
        data:
          type: object
          additionalProperties: true
          description: 'Event payload. Automations see it as sent. The stored event (and the `event` in the response) has credential values redacted to `"REDACTED"`: keys such as `password`, `secret`, `otp`, `api_key`, keys ending in `token`, `code` on login or verification events, and secret query parameters inside URL values.

            Sign-up source context (all optional) ties a conversion to where the person came from: `id` (your user or subscription id; repeats of the same event are recorded once), `visitor_id` (the `stx_vid` cookie), `gclid` / `gbraid` / `wbraid` (the ad click, from the `rnl_ad` cookie), `came_from` (your own word for the source, shown as written), `signup_method`, `invited: true` (a teammate joining an existing account: a seat, not a sign-up, no conversion) and `internal: true` (your own team or a test: no conversion).'
      anyOf:
      - required:
        - name
      - required:
        - type
    ErrorCode:
      type: string
      description: Machine-readable error code
      enum:
      - validation_error
      - unauthorized
      - forbidden
      - not_found
      - conflict
      - plan_limit
      - domain_limit
      - idempotency_conflict
      - rate_limited
      - upstream_error
      - not_configured
      - internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Ranla API key prefixed with `rnl_` or `stx_`