Ranla Conversions API

Report that a conversion goal happened. Each conversion is attributed to the last campaign or automation email that touched the person — by click id when you have one, otherwise by their most recent click, open, or send inside the goal's attribution window. Only a `revenue` goal stores an amount; `visit`, `feedback`, `waitlist`, and `qualify` are count-only.

GitHub OpenAPI

Operations 2

POST /conversions Record a conversion #
GET /conversions List conversions #

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-conversions-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-conversions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ranla Conversions 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: Conversions
  description: 'Report that a conversion goal happened. Each conversion is attributed to

    the last campaign or automation email that touched the person — by click

    id when you have one, otherwise by their most recent click, open, or send

    inside the goal''s attribution window. Only a `revenue` goal stores an

    amount; `visit`, `feedback`, `waitlist`, and `qualify` are count-only.'
paths:
  /conversions:
    post:
      operationId: createConversion
      summary: Record a conversion
      tags:
      - Conversions
      description: 'Idempotent on `(goal, external_id)` — send the same `external_id` twice

        and the second call returns the first conversion with `duplicate: true`,

        so a retried webhook can never double-count.


        Identify the person with whichever of `click_id`, `contact_id`, or

        `email` you have. `click_id` is the `stx_cid` value carried on links in

        campaign email and stored by the tracking script; it is the strongest

        signal and skips the lookup entirely. Recording a conversion never

        creates a contact.


        Omit `goal` to use the account''s primary goal.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversionRequest'
      responses:
        '200':
          description: Conversion recorded, or an existing one returned unchanged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversionResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Conversion goal not found, and no primary goal is configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: listConversions
      summary: List conversions
      tags:
      - Conversions
      security:
      - bearerAuth: []
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: cursor
        in: query
        schema:
          type: string
      - name: goal
        in: query
        schema:
          type: string
        description: Filter by goal key
      - name: goal_id
        in: query
        schema:
          type: string
      - name: campaign_id
        in: query
        schema:
          type: string
        description: Only conversions attributed to this campaign
      - name: automation_id
        in: query
        schema:
          type: string
        description: Only conversions attributed to this automation
      - name: email
        in: query
        schema:
          type: string
          format: email
      responses:
        '200':
          description: Conversion list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListConversionsResponse'
        '400':
          description: Invalid cursor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          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).

                '
    CreateConversionRequest:
      type: object
      description: Identify the person with at least one of `click_id`, `contact_id`, or `email`.
      properties:
        goal:
          type: string
          description: Goal key. Defaults to the account's primary goal.
        goal_id:
          type: string
        click_id:
          type: string
          description: The `stx_cid` value carried on campaign links.
        contact_id:
          type: string
        email:
          type: string
          format: email
        value_cents:
          type: integer
          minimum: 0
          description: 'Amount in minor units (cents). Defaults to the goal''s default value.

            Ignored (stored as 0) on count-only goals: `visit`, `feedback`,

            `waitlist`, `qualify`. Named `value_cents` so `49` cannot be

            mistaken for $49.

            '
        currency:
          type: string
          description: 3-letter ISO code. Defaults to the goal's currency.
        external_id:
          type: string
          description: 'Your own id for this conversion (charge id, order number). Makes the

            call idempotent for the goal.

            '
        occurred_at:
          type: string
          format: date-time
          description: Defaults to now. Attribution is measured back from this time.
    ConversionResponse:
      type: object
      required:
      - conversion
      - duplicate
      properties:
        conversion:
          $ref: '#/components/schemas/Conversion'
        duplicate:
          type: boolean
          description: 'True when this `external_id` was already recorded for the goal — the

            existing conversion is returned unchanged and nothing was written.

            '
    Conversion:
      type: object
      required:
      - id
      - goal_id
      - contact_id
      - email
      - value_cents
      - currency
      - external_id
      - source
      - occurred_at
      - attributed_campaign_id
      - attributed_variant_id
      - attributed_recipient_id
      - attributed_automation_id
      - attributed_run_id
      - attribution_kind
      - ad_gclid
      - ad_gbraid
      - ad_wbraid
      - created_at
      properties:
        id:
          type: string
        goal_id:
          type: string
        contact_id:
          type: string
          nullable: true
          description: Null when no contact matched; the email is kept either way.
        email:
          type: string
          format: email
          nullable: true
        value_cents:
          type: integer
          description: 'Minor units of `currency`. Always 0 unless the goal is `revenue`

            (`visit`, `feedback`, `waitlist`, and `qualify` are count-only).

            '
        currency:
          type: string
        external_id:
          type: string
          nullable: true
        source:
          type: string
          enum:
          - api
          - script
          - event
        occurred_at:
          type: string
          format: date-time
        attributed_campaign_id:
          type: string
          nullable: true
        attributed_variant_id:
          type: string
          nullable: true
        attributed_recipient_id:
          type: string
          nullable: true
        attributed_automation_id:
          type: string
          nullable: true
          description: 'The automation credited with the conversion, when the winning touch was an email

            that automation sent. Null otherwise (including when a campaign is credited).

            '
        attributed_run_id:
          type: string
          nullable: true
          description: The automation run that sent that email. Null unless `attributed_automation_id` is set.
        attribution_kind:
          $ref: '#/components/schemas/AttributionKind'
        ad_gclid:
          type: string
          nullable: true
          description: 'Google Ads click id (`gclid`) tied to the conversion: the ad click the tracking script

            saw in the browser when it reported the conversion, otherwise the ad click that first

            brought the contact in. Null when there is none.

            '
        ad_gbraid:
          type: string
          nullable: true
          description: Google Ads `gbraid` click id, used instead of `gclid` for iOS app-to-web clicks. Same sourcing as `ad_gclid`.
        ad_wbraid:
          type: string
          nullable: true
          description: Google Ads `wbraid` click id, used instead of `gclid` for web-to-web clicks where no cross-site identifier can be set. Same sourcing as `ad_gclid`.
        created_at:
          type: string
          format: date-time
    AttributionKind:
      type: string
      enum:
      - click
      - open
      - send
      - none
      description: 'How the conversion was tied to a campaign or automation, strongest first.

        Reported so you can discount weak attribution rather than treat every

        conversion as earned: `click` came from a click id or a clicked email,

        `open` and `send` from the last campaign or automation email that reached

        the person inside the goal''s window, and `none` means the conversion is

        unattributed.

        '
    ListConversionsResponse:
      type: object
      required:
      - data
      - has_more
      - next_cursor
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Conversion'
        has_more:
          type: boolean
        next_cursor:
          type: string
          nullable: true
    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_`