Ranla Domains API

The Domains API from Ranla — 2 operation(s) for domains.

GitHub OpenAPI

Operations 6

GET /domains List sending domains #
POST /domains Add a sending domain #
GET /domains/{id} Get a domain and DNS records #
POST /domains/{id} Verify domain DNS or apply DNS via Cloudflare, Vercel, or GoDaddy #
PATCH /domains/{id} Update domain tracking and TLS preferences #
DELETE /domains/{id} Delete a domain #

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-domains-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-domains-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ranla Domains 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: Domains
paths:
  /domains:
    get:
      operationId: listDomains
      summary: List sending domains
      tags:
      - Domains
      security:
      - bearerAuth: []
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
        description: Maximum number of domains to return (1–100)
      - name: cursor
        in: query
        schema:
          type: string
        description: Opaque cursor for the next page
      - name: inbound_enabled
        in: query
        schema:
          type: boolean
        description: Filter by whether inbound receiving is enabled for the domain
      responses:
        '200':
          description: Domain list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDomainsResponse'
        '400':
          description: Invalid cursor, or `inbound_enabled` is not `true` or `false`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createDomain
      summary: Add a sending domain
      tags:
      - Domains
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDomainRequest'
      responses:
        '200':
          description: Domain created with DNS records to add
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDomainResponse'
        '400':
          description: Invalid domain name, or `inbound_enabled` is not a boolean
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Plan domain limit reached (when billing is enabled)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Domain limit reached (1 on the Free plan). Upgrade at /settings/billing.
                  code: domain_limit
                  upgrade_url: /settings/billing
        '409':
          description: Domain already added to this workspace, or already owned by another workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Domain already belongs to another workspace. Remove it from that workspace or contact support to claim it.
                  code: conflict
                  details:
                    reason: domain_claim_required
                    domain: example.com
                    instructions:
                    - Ask an admin of the workspace that has it to remove the domain if you still have access.
                    - If you own the domain but no longer control the original workspace, contact support and include proof of DNS control.
  /domains/{id}:
    get:
      operationId: getDomain
      summary: Get a domain and DNS records
      tags:
      - Domains
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Domain id or domain name
        schema:
          type: string
      responses:
        '200':
          description: Domain detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainDetailResponse'
        '401':
          description: Missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    post:
      operationId: domainAction
      summary: Verify domain DNS or apply DNS via Cloudflare, Vercel, or GoDaddy
      description: '`verify` checks public DNS, registers the domain on the mail server, and returns the

        domain detail plus `verified`, `checks`, and signing status. `apply` writes the DNS

        records at Cloudflare, GoDaddy, or Vercel and returns a per-record `results` list plus

        the full `records` set it applied.'
      tags:
      - Domains
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Domain id or domain name
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - action
              properties:
                action:
                  type: string
                  enum:
                  - verify
                  - apply
                provider:
                  type: string
                  enum:
                  - cloudflare
                  - godaddy
                  - vercel
                  description: Required when action is apply
                credentials:
                  $ref: '#/components/schemas/RemoteApplyDnsCredentials'
      responses:
        '200':
          description: Domain verified, or DNS apply results
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/VerifyDomainResponse'
                - $ref: '#/components/schemas/ApplyDomainDnsResponse'
        '400':
          description: 'DNS not fully ready yet (propagation — response includes pending:true, checks, and records), the mail server has not confirmed DKIM or return-path readiness yet (response includes mail_server_signing), missing provider credentials, or an invalid action or provider

            '
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/VerifyDomainErrorResponse'
                - $ref: '#/components/schemas/SimpleErrorResponse'
        '401':
          description: Missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '502':
          description: 'The mail server''s DNS records for the domain are not ready yet, domain registration on the mail server failed, the mail server could not confirm signing readiness, or the DNS provider API returned an error during apply

            '
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/VerifyDomainErrorResponse'
                - $ref: '#/components/schemas/SimpleErrorResponse'
        '503':
          description: Credentials encryption key not configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    patch:
      operationId: updateDomain
      summary: Update domain tracking and TLS preferences
      tags:
      - Domains
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        description: Domain id or domain name
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDomainRequest'
      responses:
        '200':
          description: Domain settings updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainDetailResponse'
        '400':
          description: Invalid JSON or settings payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '401':
          description: Missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    delete:
      operationId: deleteDomain
      summary: Delete a domain
      description: 'Removes the domain from the account and revokes its sending authorization.

        If mail-server teardown fails, the domain row is kept and the API returns 502.'
      tags:
      - Domains
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Domain deleted
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                properties:
                  ok:
                    type: boolean
        '401':
          description: Missing or invalid API key / session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '502':
          description: Failed to revoke sending authorization upstream
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
components:
  schemas:
    SimpleErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
    ApplyDomainDnsResponse:
      type: object
      required:
      - provider
      - domain
      - results
      - records
      properties:
        provider:
          type: string
          enum:
          - cloudflare
          - godaddy
          - vercel
        domain:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/ApplyDnsRecordResult'
        records:
          type: array
          description: The full record set that was applied — the sending records, plus the inbound MX record when inbound receiving is enabled.
          items:
            $ref: '#/components/schemas/DnsRecord'
    DomainTrackingDns:
      type: object
      required:
      - required
      - host
      - target
      - ok
      properties:
        required:
          type: boolean
          description: True when open or click tracking is enabled for this domain.
        host:
          type: string
          nullable: true
          description: Customer CNAME host (e.g. ps.example.com) when tracking is required.
        target:
          type: string
          nullable: true
          description: Tracking CNAME target when tracking is required.
        ok:
          type: boolean
          nullable: true
          description: Whether tracking DNS is live; null when tracking is disabled.
    DnsRecord:
      type: object
      required:
      - type
      - host
      - value
      - purpose
      properties:
        type:
          type: string
          enum:
          - TXT
          - CNAME
          - MX
          example: TXT
          description: 'DNS record type. The return path is always a single `CNAME`, set to DNS only (not

            proxied). Publish no other records on the return-path host.

            '
        host:
          type: string
        value:
          type: string
          description: Record content. For MX records, the mail server hostname (priority is in `priority`).
        priority:
          type: integer
          description: MX preference when `type` is `MX` (lower is preferred).
        purpose:
          type: string
          description: Human-readable purpose (`Domain ownership`, `DKIM`, `Return path`, `SPF`, `DMARC`, `Open/click tracking`, `Inbound receiving`)
    ApplyDnsRecordResult:
      type: object
      required:
      - purpose
      - host
      - action
      properties:
        purpose:
          type: string
        host:
          type: string
        action:
          type: string
          enum:
          - created
          - updated
          - unchanged
          - merged
        detail:
          type: string
    DomainDetailResponse:
      type: object
      required:
      - domain
      - records
      - analysis
      - inbound_records
      - inbound_note
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
        analysis:
          $ref: '#/components/schemas/DomainDnsAnalysis'
        inbound_records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
        inbound_note:
          type: string
        inbound_configured:
          type: boolean
        inbound_pending:
          type: boolean
        inbound_error:
          type: string
          nullable: true
        tracking_dns:
          $ref: '#/components/schemas/DomainTrackingDns'
        tracking_error:
          type: string
          nullable: true
          description: Present when tracking preferences were saved but delivery-side tracking provisioning failed. Customer-facing message; internal failure details are logged server-side.
        tls_error:
          type: string
          nullable: true
          description: Present when TLS mode was saved but delivery-side TLS provisioning failed. Customer-facing message; internal failure details are logged server-side.
    ListDomainsResponse:
      type: object
      required:
      - domains
      - has_more
      - next_cursor
      properties:
        domains:
          type: array
          items:
            $ref: '#/components/schemas/Domain'
        has_more:
          type: boolean
        next_cursor:
          type: string
          nullable: true
    RemoteApplyDnsCredentials:
      type: object
      properties:
        apiToken:
          type: string
          description: Inline Cloudflare API token instead of the stored dashboard integration
        zoneId:
          type: string
          description: Optional Cloudflare zone id when using an inline token
        cloudflareApiToken:
          type: string
          description: Alias for apiToken
        cloudflareZoneId:
          type: string
          description: Alias for zoneId
        apiKey:
          type: string
          description: GoDaddy API key
        apiSecret:
          type: string
          description: GoDaddy API secret
        godaddyApiKey:
          type: string
          description: Alias for apiKey
        godaddyApiSecret:
          type: string
          description: Alias for apiSecret
        vercelApiToken:
          type: string
          description: Alias for apiToken when provider is vercel
        vercelTeamId:
          type: string
          description: Optional Vercel team id for team-scoped DNS
        teamId:
          type: string
          description: Inline Vercel team id (alias for vercelTeamId)
    VerifyDomainResponse:
      type: object
      required:
      - domain
      - records
      - verified
      - inbound_records
      - inbound_note
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
        analysis:
          $ref: '#/components/schemas/DomainDnsAnalysis'
        inbound_records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
        inbound_note:
          type: string
        tracking_dns:
          $ref: '#/components/schemas/DomainTrackingDns'
        verified:
          type: boolean
        auto:
          type: boolean
        mail_server_registered:
          type: boolean
          description: Whether the domain is registered on the mail server. Always true on a successful verify.
        checks:
          type: object
          description: Public DNS checks. DMARC is reported but does not block verification.
          properties:
            ownership:
              type: boolean
            spf:
              type: boolean
            dkim:
              type: boolean
            dmarc:
              type: boolean
            return_path:
              type: boolean
        inbound_configured:
          type: boolean
        inbound_pending:
          type: boolean
        inbound_error:
          type: string
          nullable: true
        signing_ready:
          type: boolean
          description: True when the mail server will DKIM-sign with this domain's key (not the shared pool fallback).
        mail_server_signing:
          $ref: '#/components/schemas/MailServerSigningStatus'
    CreateDomainRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          example: example.com
        inbound_enabled:
          type: boolean
          description: Request inbound receiving for the domain as soon as verification succeeds.
        inboundEnabled:
          type: boolean
          description: Alias for inbound_enabled.
    DomainDmarcAnalysis:
      type: object
      required:
      - host
      - configured
      - record
      - policy
      - rua
      - guidance
      properties:
        host:
          type: string
        configured:
          type: boolean
        record:
          type: string
          nullable: true
        policy:
          type: string
          nullable: true
          description: Parsed DMARC `p=` policy when present (`none`, `quarantine`, or `reject`)
        rua:
          type: array
          items:
            type: string
        guidance:
          type: string
    DomainBimiAnalysis:
      type: object
      required:
      - host
      - configured
      - record
      - location
      - authority
      - requires_dmarc_enforcement
      - guidance
      properties:
        host:
          type: string
        configured:
          type: boolean
        record:
          type: string
          nullable: true
        location:
          type: string
          nullable: true
          description: Parsed BIMI `l=` logo URL when present
        authority:
          type: string
          nullable: true
          description: Parsed BIMI `a=` VMC URL when present
        requires_dmarc_enforcement:
          type: boolean
          description: True when BIMI is unlikely to work until DMARC is set to p=quarantine or p=reject
        guidance:
          type: string
    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
    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).

                '
    MailServerSigningStatus:
      type: object
      description: Mail-server delivery DNS statuses recorded when verify re-checks the domain.
      properties:
        dkim_ok:
          type: boolean
        return_path_ok:
          type: boolean
        dkim_status:
          type: string
          nullable: true
        return_path_status:
          type: string
          nullable: true
    CreateDomainResponse:
      type: object
      required:
      - domain
      - records
      - inbound_records
      - inbound_note
      properties:
        domain:
          $ref: '#/components/schemas/Domain'
        records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
        inbound_records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
        inbound_note:
          type: string
        mail_server_dns_synced:
          type: boolean
          description: Whether mail-server DKIM/return-path records were synced into the response records
        mail_server_dns_error:
          type: string
          description: Present when mail-server DNS sync failed; ownership/SPF/DMARC records are still returned
    Domain:
      type: object
      required:
      - id
      - name
      - status
      - created_at
      - verified_at
      - open_tracking
      - click_tracking
      - tls_mode
      - inbound_enabled
      - inbound_status
      - inbound_error
      properties:
        id:
          type: string
        name:
          type: string
          example: example.com
        status:
          type: string
          enum:
          - pending
          - verified
          - failed
        created_at:
          type: string
          format: date-time
        verified_at:
          type: string
          format: date-time
          nullable: true
        open_tracking:
          type: boolean
          description: Open tracking preference for this domain.
        click_tracking:
          type: boolean
          description: Click tracking preference for this domain.
        tls_mode:
          type: string
          enum:
          - opportunistic
          - enforced
          description: Preferred outbound TLS behavior for this domain.
        inbound_enabled:
          type: boolean
          description: True when Ranla should accept inbound mail for this domain.
        inbound_status:
          type: string
          enum:
          - disabled
          - pending
          - active
          - error
          description: '`pending` before verification, `active` once inbound receiving is configured, or `error` when setup fails.'
        inbound_error:
          type: string
          nullable: true
          description: Why inbound setup failed when `inbound_status` is `error`. Verify the domain again to retry.
    VerifyDomainErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
        pending:
          type: boolean
          description: 'True when public DNS is not fully ready yet (propagation). Clients should show a per-record checklist and keep retrying — this is not a hard failure.

            '
        checks:
          type: object
          properties:
            ownership:
              type: boolean
            spf:
              type: boolean
            dkim:
              type: boolean
            dmarc:
              type: boolean
            return_path:
              type: boolean
        mail_server_signing:
          $ref: '#/components/schemas/MailServerSigningStatus'
        records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
    UpdateDomainRequest:
      type: object
      description: 'Tracking and TLS settings are persisted immediately in Ranla.

        Preferences are stored on the domain immediately when updated.

        '
      properties:
        open_tracking:
          type: boolean
        openTracking:
          type: boolean
          description: Alias for open_tracking
        click_tracking:
          type: boolean
        clickTracking:
          type: boolean
          description: Alias for click_tracking
        tls_mode:
          type: string
          enum:
          - opportunistic
          - enforced
        tlsMode:
          type: string
          enum:
          - opportunistic
          - enforced
          description: Alias for tls_mode
        inbound_enabled:
          type: boolean
          description: Enable or disable inbound receiving for this domain.
        inboundEnabled:
          type: boolean
          description: Alias for inbound_enabled
    DomainDnsAnalysis:
      type: object
      required:
      - dmarc
      - bimi
      properties:
        dmarc:
          $ref: '#/components/schemas/DomainDmarcAnalysis'
        bimi:
          $ref: '#/components/schemas/DomainBimiAnalysis'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Ranla API key prefixed with `rnl_` or `stx_`