Casama AI Attribution API

The attribution API from Casama AI, for attribution.

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 5

GET /v1/attribution/status Whether ad measurement is offered and on here, and the person's credited source #
PUT /v1/me/ads-measurement Turn "Help measure our ads" on or off #
POST /v1/attribution/install Record this install (or browser) and where it came from, after sign-in #
POST /v1/attribution/heard-from The answer to "How did you hear about us?" (or a skip) #
POST /v1/attribution/checkout The person and install that pressed Buy, so the next charge is credited to them #

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-attribution-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-attribution-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Casama Attribution 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: Attribution
paths:
  /v1/attribution/status:
    get:
      operationId: getAttributionStatus
      tags:
      - Attribution
      security:
      - bearerAuth: []
      summary: Whether ad measurement is offered and on here, and the person's credited source
      description: 'The app asks once per session: whether to show "Help measure our ads", whether Meta''s SDK may start on this device, and the frozen acquisition (for RevenueCat''s source fields). The region comes from the request''s country.'
      responses:
        '200':
          description: Status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributionStatus'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/me/ads-measurement:
    put:
      operationId: setAdsMeasurement
      tags:
      - Attribution
      security:
      - bearerAuth: []
      summary: Turn "Help measure our ads" on or off
      description: 'Off: nothing more about this person goes to any ad network, from the server or the app. Checked again when each conversion is delivered.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetAdsMeasurementRequest'
      responses:
        '200':
          description: Status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributionStatus'
        '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'
  /v1/attribution/install:
    post:
      operationId: postAttributionInstall
      tags:
      - Attribution
      security:
      - bearerAuth: []
      summary: Record this install (or browser) and where it came from, after sign-in
      description: Posted once after each sign-in and again when something changes. Stores the install's app and device details, Meta's anonymous id while Meta's SDK runs, Google Play's install referrer and the web landing labels, as touches. Always 204.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostAttributionInstallRequest'
      responses:
        '204':
          description: Recorded (or dropped)
        '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'
  /v1/attribution/heard-from:
    post:
      operationId: postHeardFrom
      tags:
      - Attribution
      security:
      - bearerAuth: []
      summary: The answer to "How did you hear about us?" (or a skip)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostHeardFromRequest'
      responses:
        '204':
          description: Recorded
        '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'
  /v1/attribution/checkout:
    post:
      operationId: postCheckoutIntent
      tags:
      - Attribution
      security:
      - bearerAuth: []
      summary: The person and install that pressed Buy, so the next charge is credited to them
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostCheckoutIntentRequest'
      responses:
        '204':
          description: Recorded
        '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'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    LandingLabels:
      type: object
      properties:
        utm_source:
          type: string
          maxLength: 100
        utm_medium:
          type: string
          maxLength: 100
        utm_campaign:
          type: string
          maxLength: 150
        utm_id:
          type: string
          maxLength: 100
        utm_term:
          type: string
          maxLength: 100
        utm_content:
          type: string
          maxLength: 150
        fbclid:
          type: string
          maxLength: 500
          pattern: ^[A-Za-z0-9_-]+$
        fbclid_at:
          type: integer
          exclusiveMinimum: 0
        ref_host:
          type: string
          maxLength: 253
        landing:
          type: string
          maxLength: 120
        via:
          type: string
          maxLength: 100
    PostAttributionInstallRequest:
      type: object
      properties:
        install_id:
          type: string
          pattern: ^[A-Za-z0-9_-]{8,64}$
        platform:
          $ref: '#/components/schemas/AttributionPlatform'
        distribution:
          type: string
          maxLength: 32
        app_version:
          type: string
          maxLength: 32
        app_package:
          type: string
          maxLength: 100
        os_version:
          type: string
          maxLength: 32
        device_model:
          type: string
          maxLength: 64
        locale:
          type: string
          maxLength: 20
        timezone:
          type: string
          maxLength: 64
        screen_width:
          type: integer
          minimum: 0
          maximum: 20000
        screen_height:
          type: integer
          minimum: 0
          maximum: 20000
        screen_density:
          type: number
          minimum: 0
          maximum: 20
        cpu_cores:
          type: integer
          minimum: 0
          maximum: 1024
        meta_anon_id:
          type: string
          maxLength: 100
          pattern: ^[A-Za-z0-9_:.-]+$
        ios_tracking:
          type: string
          enum:
          - authorized
          - denied
          - restricted
          - not_determined
          description: 'iPhone and iPad: the App Tracking Transparency state when the record was sent'
        ga4_app_instance_id:
          type: string
          maxLength: 64
          pattern: ^[A-Za-z0-9_-]+$
        play_referrer:
          type: string
          maxLength: 2000
        landing:
          $ref: '#/components/schemas/LandingLabels'
      required:
      - install_id
      - platform
    AttributionPlatform:
      type: string
      enum:
      - ios
      - android
      - macos
      - windows
      - linux
      - web
    SetAdsMeasurementRequest:
      type: object
      properties:
        'on':
          type: boolean
      required:
      - 'on'
    AttributionStatus:
      type: object
      properties:
        offered:
          type: boolean
        measure_ads:
          type: boolean
        meta_sdk_allowed:
          type: boolean
        heard_from_asked:
          type: boolean
        acquisition:
          $ref: '#/components/schemas/Acquisition'
      required:
      - offered
      - measure_ads
      - meta_sdk_allowed
      - heard_from_asked
      - acquisition
    PostHeardFromRequest:
      type: object
      properties:
        answer:
          $ref: '#/components/schemas/HeardFrom'
      required:
      - answer
    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
    PostCheckoutIntentRequest:
      type: object
      properties:
        org_id:
          type: string
          format: uuid
        install_id:
          type: string
          pattern: ^[A-Za-z0-9_-]{8,64}$
        product_id:
          type: string
          maxLength: 200
      required:
      - org_id
    Acquisition:
      type:
      - object
      - 'null'
      properties:
        source:
          type: string
        medium:
          type:
          - string
          - 'null'
        campaign:
          type:
          - string
          - 'null'
        ad_set:
          type:
          - string
          - 'null'
        ad:
          type:
          - string
          - 'null'
        network:
          type:
          - string
          - 'null'
        kind:
          type: string
      required:
      - source
      - medium
      - campaign
      - ad_set
      - ad
      - network
      - kind
    HeardFrom:
      type:
      - string
      - 'null'
      enum:
      - instagram
      - facebook
      - tiktok
      - youtube
      - friend
      - search
      - ai_assistant
      - other
      - null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase access token