Kagura AI Referrals API

Referral program (Issue #1470): the caller's own referral code and standing, plus code redemption. Session auth only, and the whole surface 404s unless the deployment sets ENABLE_REFERRALS.

GitHub OpenAPI

Operations 2

GET /api/v1/referrals/me Get My Referral #
POST /api/v1/referrals/redeem Redeem Referral #

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/kagura-ai-com:kagura-ai-com-referrals-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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

kagura-ai-com-referrals-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Kagura Memory Cloud Referrals API
  description: Universal AI Memory Platform - Remote MCP Server + Web Management
  version: 0.158.1
tags:
- name: Referrals
  description: 'Referral program (Issue #1470): the caller''s own referral code and standing, plus code redemption. Session auth only, and the whole surface 404s unless the deployment sets ENABLE_REFERRALS.'
paths:
  /api/v1/referrals/me:
    get:
      tags:
      - Referrals
      summary: Get My Referral
      description: 'Return the caller''s referral code and standing, minting a code on first call.


        Args:

        user: Authenticated session user.

        db: Database session.


        Returns:

        The caller''s referral summary.'
      operationId: get_my_referral_api_v1_referrals_me_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralSummaryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/referrals/redeem:
    post:
      tags:
      - Referrals
      summary: Redeem Referral
      description: 'Redeem a referral code and credit both parties.


        Refusals are 400s with a ``REFERRAL-*`` error code (see

        ``utils/exceptions.py``); they are deliberately uniform so probing a code

        reveals nothing about whether it exists or who owns it. A workspace row to

        credit that another transaction still holds after the ``NOWAIT`` tries is

        a 409 ``RES-002``: nothing was paid and the client retries (#2443).


        Args:

        payload: The submitted code.

        user: Authenticated session user (the invitee).

        db: Database session.


        Returns:

        The created grant.'
      operationId: redeem_referral_api_v1_referrals_redeem_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedeemRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralGrantResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ReferralGrantResponse:
      properties:
        id:
          title: Id
        granted_at:
          title: Granted At
        referrer_bonus_memories:
          title: Referrer Bonus Memories
        referred_bonus_memories:
          title: Referred Bonus Memories
        revoked_at:
          title: Revoked At
      type: object
      required:
      - id
      - granted_at
      - referrer_bonus_memories
      - referred_bonus_memories
      - revoked_at
      title: ReferralGrantResponse
      description: 'A ledger row as seen by the user who earned it.


        Inherits ``TZAwareBaseModel`` (not ``BaseModel``) because it carries

        datetimes: the naive-UTC columns must serialize with a ``Z`` suffix or JS

        clients read them as local time.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RedeemRequest:
      properties:
        code:
          type: string
          maxLength: 24
          minLength: 1
          title: Code
      type: object
      required:
      - code
      title: RedeemRequest
      description: A referral code submitted by a newly-signed-up user.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ReferralSummaryResponse:
      properties:
        code:
          type: string
          title: Code
        max_grants:
          type: integer
          title: Max Grants
        used_grants:
          type: integer
          title: Used Grants
        remaining_grants:
          type: integer
          title: Remaining Grants
        referee_reward_memories:
          type: integer
          title: Referee Reward Memories
        referrer_reward_memories:
          type: integer
          title: Referrer Reward Memories
        earned_memories:
          type: integer
          title: Earned Memories
      type: object
      required:
      - code
      - max_grants
      - used_grants
      - remaining_grants
      - referee_reward_memories
      - referrer_reward_memories
      - earned_memories
      title: ReferralSummaryResponse
      description: 'The inviter''s own standing.


        Reward amounts are included because the user is being asked to share a link

        — they need to know what they and their invitee get. This is not the same as

        exposing them publicly: the route requires a session.'