Ranla Ranla Commands API

Ranla's own ` ` commands (`campaign list`, `segment create`, `page propose`, …) and the approval cards for the ones that need sign-off. The same rules apply as in the app.

GitHub OpenAPI

Operations 9

GET /growth/commands List Ranla's commands #
POST /growth/commands Run one of Ranla's commands #
GET /growth/brain What Ranla thinks with #
PUT /growth/brain Add a model key #
PATCH /growth/brain Switch, set the fallback, or check a key again #
DELETE /growth/brain Remove a model key #
GET /growth/approvals List approvals waiting #
GET /growth/approvals/{messageId} Read one approval card #
POST /growth/approvals/{messageId} Approve or reject a card #

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-ranlacommands-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-ranlacommands-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ranla Commands 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: RanlaCommands
  description: 'Ranla''s own ` ` commands (`campaign list`, `segment create`,

    `page propose`, …) and the approval cards for the ones that need

    sign-off. The same rules apply as in the app.'
paths:
  /growth/commands:
    get:
      operationId: listRanlaCommands
      summary: List Ranla's commands
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      description: 'The ` ` commands Ranla runs in chat, one line per noun with

        the fields a write takes. `help ` (POST) returns each verb''s full

        input schema. Needs a full-scope key.'
      responses:
        '200':
          description: The command index
          content:
            application/json:
              schema:
                type: object
                required:
                - index
                properties:
                  index:
                    type: string
                    description: 'One line per noun: `- <noun>: <verbs> — <fields>`.'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    post:
      operationId: runRanlaCommand
      summary: Run one of Ranla's commands
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      description: 'Runs ` ` with `input`, under the same rules as in the app:

        the workspace''s roles, the hire for anything that sends or runs on its

        own, the command''s input schema, and credits for a write. A command

        that sends, publishes or spends is not run: it is parked as an approval

        card and answered `202` with `pendingApproval`. `help ` returns

        that noun''s verbs and their input schemas.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RanlaCommandRequest'
      responses:
        '200':
          description: The command ran (or `help <noun>`)
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/RanlaCommandResult'
                - $ref: '#/components/schemas/RanlaCommandHelp'
        '202':
          description: Parked for approval; nothing has changed yet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RanlaCommandPending'
        '400':
          description: Unknown command or invalid input. The message lists the valid nouns, verbs or fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '402':
          description: Out of credits for a write
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '403':
          description: The workspace role or the hire does not allow it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '422':
          description: The command refused (its message says why); nothing changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
  /growth/brain:
    get:
      operationId: getRanlaBrain
      summary: What Ranla thinks with
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      description: 'Included (Ranla''s own models), or the workspace''s own OpenRouter,

        Anthropic, OpenAI or Google key. A saved key is never returned: only

        its last four characters.'
      responses:
        '200':
          description: The brain and the providers a key can be added for
          content:
            application/json:
              schema:
                type: object
                required:
                - brain
                - providers
                properties:
                  brain:
                    $ref: '#/components/schemas/RanlaBrain'
                  providers:
                    type: array
                    items:
                      type: object
                      properties:
                        provider:
                          type: string
                          enum:
                          - openrouter
                          - anthropic
                          - openai
                          - google
                        label:
                          type: string
                        keyUrl:
                          type: string
                        keyPlaceholder:
                          type: string
                        models:
                          type: object
                          properties:
                            large:
                              type: string
                            small:
                              type: string
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    put:
      operationId: addRanlaBrainKey
      summary: Add a model key
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      description: 'Tests the key with one tiny call on the provider, then saves it

        encrypted and makes it the one Ranla thinks with. Model calls on it are

        billed by the provider and take no credits. On a dashboard session only

        the workspace owner can add a key.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - provider
              - apiKey
              properties:
                provider:
                  type: string
                  enum:
                  - openrouter
                  - anthropic
                  - openai
                  - google
                apiKey:
                  type: string
      responses:
        '200':
          description: Saved
          content:
            application/json:
              schema:
                type: object
                required:
                - brain
                properties:
                  brain:
                    $ref: '#/components/schemas/RanlaBrain'
        '400':
          description: Unknown provider or no key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '403':
          description: Only the workspace owner can add a key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '422':
          description: The key failed its test call (not valid, no credit, rate limited, or no access to the model)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    patch:
      operationId: updateRanlaBrain
      summary: Switch, set the fallback, or check a key again
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                choice:
                  type: string
                  enum:
                  - included
                  - openrouter
                  - anthropic
                  - openai
                  - google
                  description: Included, or a provider whose key is already saved.
                fallbackToIncluded:
                  type: boolean
                  description: When the key fails, think on Included (and use credits) instead of stopping.
                recheck:
                  type: boolean
                  description: Run the test call again on a saved key.
                provider:
                  type: string
                  enum:
                  - openrouter
                  - anthropic
                  - openai
                  - google
                  description: Which key to check again. Default is the one in use.
      responses:
        '200':
          description: The brain after the change
          content:
            application/json:
              schema:
                type: object
                required:
                - brain
                properties:
                  brain:
                    $ref: '#/components/schemas/RanlaBrain'
                  working:
                    type: boolean
                  message:
                    type: string
        '409':
          description: No saved key for that provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    delete:
      operationId: removeRanlaBrainKey
      summary: Remove a model key
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      description: If it was the key in use, Ranla goes back to Included.
      parameters:
      - name: provider
        in: query
        required: true
        schema:
          type: string
          enum:
          - openrouter
          - anthropic
          - openai
          - google
      responses:
        '200':
          description: Removed
          content:
            application/json:
              schema:
                type: object
                required:
                - brain
                properties:
                  brain:
                    $ref: '#/components/schemas/RanlaBrain'
  /growth/approvals:
    get:
      operationId: listRanlaApprovals
      summary: List approvals waiting
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      description: Cards waiting for sign-off, from any thread. Answer one with `POST /growth/approvals/{messageId}`.
      responses:
        '200':
          description: Pending approval cards
          content:
            application/json:
              schema:
                type: object
                required:
                - approvals
                properties:
                  approvals:
                    type: array
                    items:
                      $ref: '#/components/schemas/RanlaApproval'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
  /growth/approvals/{messageId}:
    parameters:
    - name: messageId
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: getRanlaApproval
      summary: Read one approval card
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      responses:
        '200':
          description: The card
          content:
            application/json:
              schema:
                type: object
                required:
                - approval
                properties:
                  approval:
                    $ref: '#/components/schemas/RanlaApproval'
        '404':
          description: Not waiting for a decision (already answered, or unknown)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
    post:
      operationId: decideRanlaApproval
      summary: Approve or reject a card
      tags:
      - RanlaCommands
      security:
      - bearerAuth: []
      description: 'The same answer as Approve or Decline in the app, with the same checks:

        the role needed for the card, and the hire to approve anything that

        sends. With `sync: true` the call waits for what approving runs and

        returns its outcome as JSON; otherwise it streams. Payout runs move

        money and are decided by a signed-in person in the app, never by a key.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - decision
              properties:
                decision:
                  type: string
                  enum:
                  - approve
                  - reject
                sync:
                  type: boolean
                  description: Wait and return JSON instead of a stream.
      responses:
        '200':
          description: Answered. With `sync`, what Ranla did next.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RanlaApprovalOutcome'
        '402':
          description: Approving this card needs Ranla hired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '403':
          description: The role (or a key, for payout runs) may not decide it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '404':
          description: Not waiting for a decision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '409':
          description: Ranla is mid-turn in that thread; try again shortly
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '500':
          description: Approved, but what it ran failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RanlaApprovalOutcome'
components:
  schemas:
    SimpleErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
    RanlaApproval:
      type: object
      required:
      - messageId
      - summary
      properties:
        messageId:
          type: string
        threadId:
          type: string
        threadTitle:
          type:
          - string
          - 'null'
        toolName:
          type:
          - string
          - 'null'
        kind:
          type:
          - string
          - 'null'
        summary:
          type: string
        detail:
          type:
          - string
          - 'null'
        actionId:
          type: string
          description: For a page card, the id `page get` reads its plan or draft by.
        next:
          type: string
        url:
          type: string
          format: uri
          description: Where to decide it in the app.
        createdAt:
          type: string
          format: date-time
    RanlaCommandPending:
      type: object
      required:
      - pendingApproval
      properties:
        result:
          type: object
          additionalProperties: true
        pendingApproval:
          type: object
          required:
          - messageId
          - summary
          - threadId
          properties:
            messageId:
              type: string
              description: Approve or reject it with `POST /growth/approvals/{messageId}`.
            summary:
              type: string
            threadId:
              type: string
            url:
              type: string
              format: uri
              description: Where to decide it in the app.
        next:
          type: string
    RanlaCommandHelp:
      type: object
      required:
      - noun
      - commands
      properties:
        noun:
          type: string
        commands:
          type: object
          additionalProperties:
            type: object
            description: The verb's input JSON Schema.
    RanlaCommandRequest:
      type: object
      required:
      - command
      properties:
        command:
          type: string
          description: '`<noun> <verb>`, such as `campaign list`, or `help <noun>`.'
          example: campaign list
        input:
          type: object
          additionalProperties: true
          description: The command's fields (see `help <noun>`).
        threadId:
          type: string
          description: Ranla thread to record it in. Defaults to the workspace's main conversation, where any approval card shows up.
    RanlaBrain:
      type: object
      required:
      - choice
      - fallbackToIncluded
      - keys
      properties:
        choice:
          type: string
          enum:
          - included
          - openrouter
          - anthropic
          - openai
          - google
        fallbackToIncluded:
          type: boolean
        keys:
          type: array
          items:
            type: object
            required:
            - provider
            - hint
            - addedAt
            properties:
              provider:
                type: string
                enum:
                - openrouter
                - anthropic
                - openai
                - google
              hint:
                type: string
                description: The key's last four characters. The key itself is never returned.
              addedAt:
                type: string
                format: date-time
              lastOkAt:
                type: string
                format: date-time
                nullable: true
              failure:
                type: object
                nullable: true
                properties:
                  kind:
                    type: string
                    enum:
                    - invalid
                    - no_credit
                    - rate_limited
                    - no_model
                  since:
                    type: string
                    format: date-time
                  retryAt:
                    type: string
                    format: date-time
                    nullable: true
    RanlaCommandResult:
      type: object
      required:
      - result
      properties:
        result:
          type: object
          additionalProperties: true
          description: What the command returned, with `content` as its data.
    RanlaApprovalOutcome:
      type: object
      properties:
        text:
          type: string
          description: What Ranla said after the decision (with `sync`).
        tools:
          type: array
          items:
            type: object
            additionalProperties: true
        artifacts:
          type: array
          items:
            type: object
            additionalProperties: true
        pendingApproval:
          type: object
          description: Another card the run parked, if any.
          additionalProperties: true
        approval:
          type: object
          description: When the decision needed no run (a decline, a payout run).
          additionalProperties: true
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Ranla API key prefixed with `rnl_` or `stx_`