Casama AI Referrals API

The referrals API from Casama AI, for referrals.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /v1/me/referral Your invite code and link, what you've earned, and who invited you #
POST /v1/me/referral/redeem Enter a friend's invite code (a few days after signing up) #
POST /v1/me/referral/waiting/{id}/let-in Let in a friend who is waiting on your invite (uses one invite) #
GET /v1/referral/preview Who an invite code is from (no sign-in) #

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/casama-ai:casama-ai-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. 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

casama-ai-referrals-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Casama Referrals API
  version: 0.1.0
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://api.casama.ai
tags:
- name: Referrals
paths:
  /v1/me/referral:
    get:
      operationId: getReferral
      tags:
      - Referrals
      security:
      - bearerAuth: []
      summary: Your invite code and link, what you've earned, and who invited you
      responses:
        '200':
          description: Invite friends
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Referral'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/me/referral/redeem:
    post:
      operationId: redeemReferral
      tags:
      - Referrals
      security:
      - bearerAuth: []
      summary: Enter a friend's invite code (a few days after signing up)
      description: 'Errors: 404 referral_not_found, 400 referral_own_code, 409 referral_already, 400 referral_window_closed, 400 referral_mutual, 404 referrals_off, 429 too_many_attempts.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedeemReferralRequest'
      responses:
        '200':
          description: Invite friends
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Referral'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limited
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/me/referral/waiting/{id}/let-in:
    post:
      operationId: letInWaitingFriend
      tags:
      - Referrals
      security:
      - bearerAuth: []
      summary: Let in a friend who is waiting on your invite (uses one invite)
      description: 'They get the “You''re in” email within a few minutes. Errors: 404 not_found (not yours, or no longer waiting), 409 no_invites, 404 waitlist_off.'
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Invite friends
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Referral'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/referral/preview:
    get:
      operationId: previewReferral
      tags:
      - Referrals
      summary: Who an invite code is from (no sign-in)
      parameters:
      - schema:
          type: string
          minLength: 1
          maxLength: 200
        required: true
        name: code
        in: query
      responses:
        '200':
          description: Invite
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralPreview'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limited
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    Problem:
      type: object
      properties:
        type:
          type: string
          example: https://casama.ai/problems/not_found
        title:
          type: string
        status:
          type: integer
        code:
          type: string
          description: Stable error code
          example: not_found
        detail:
          type: string
        instance:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
            - path
            - message
          description: Field errors for validation_failed
      required:
      - type
      - title
      - status
      - code
    Referral:
      type: object
      properties:
        enabled:
          type: boolean
        code:
          type:
          - string
          - 'null'
        link:
          type:
          - string
          - 'null'
        reward_usd:
          type: number
        welcome_usd:
          type: number
        reward_cap:
          type: integer
        invited:
          type: integer
        rewarded:
          type: integer
        pending:
          type: integer
        earned_usd:
          type: number
        invited_by:
          type:
          - object
          - 'null'
          properties:
            name:
              type:
              - string
              - 'null'
            welcome_earned_usd:
              type:
              - number
              - 'null'
          required:
          - name
          - welcome_earned_usd
        redeem_until:
          type:
          - string
          - 'null'
          format: date-time
        invites:
          type: object
          properties:
            total:
              type: integer
            used:
              type: integer
            left:
              type: integer
            unlocked:
              type: boolean
            waiting:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  email_hint:
                    type: string
                  since:
                    type: string
                    format: date-time
                required:
                - id
                - email_hint
                - since
          required:
          - total
          - used
          - left
          - unlocked
      required:
      - enabled
      - code
      - link
      - reward_usd
      - welcome_usd
      - reward_cap
      - invited
      - rewarded
      - pending
      - earned_usd
      - invited_by
      - redeem_until
    RedeemReferralRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          maxLength: 200
      required:
      - code
    ReferralPreview:
      type: object
      properties:
        inviter_name:
          type:
          - string
          - 'null'
        reward_usd:
          type: number
        welcome_usd:
          type: number
      required:
      - inviter_name
      - reward_usd
      - welcome_usd
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase access token