Casama AI Files API

The files API from Casama AI, for files.

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 9

POST /v1/file-keys Create a read-only File Provider key (cfk_…) shown once, for browsing and… #
GET /v1/file-keys List your read-only File Provider keys #
DELETE /v1/file-keys/{id} Revoke a read-only File Provider key (sign-out) #
POST /v1/orgs/{id}/files/export Routines and skills as Markdown files, zipped #
POST /v1/orgs/{id}/files/import Create and update routines and skills from files (dry_run shows what would… #
GET /v1/orgs/{id}/git-sync Get git sync #
PUT /v1/orgs/{id}/git-sync Set git sync #
DELETE /v1/orgs/{id}/git-sync Delete git sync #
POST /v1/orgs/{id}/git-sync/run Sync on the worker's next minute #

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-files-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-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Casama Files 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: Files
paths:
  /v1/file-keys:
    post:
      operationId: createFileKey
      tags:
      - Files
      security:
      - bearerAuth: []
      summary: Create a read-only File Provider key (cfk_…) shown once, for browsing and…
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileKeyCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileKeyCreated'
        '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'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
    get:
      operationId: listFileKeys
      tags:
      - Files
      security:
      - bearerAuth: []
      summary: List your read-only File Provider keys
      responses:
        '200':
          description: File keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileKeyList'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/file-keys/{id}:
    delete:
      operationId: deleteFileKey
      tags:
      - Files
      security:
      - bearerAuth: []
      summary: Revoke a read-only File Provider key (sign-out)
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedFileKey'
        '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'
  /v1/orgs/{id}/files/export:
    post:
      operationId: exportWorkspaceFiles
      tags:
      - Files
      security:
      - bearerAuth: []
      summary: Routines and skills as Markdown files, zipped
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: ZIP
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceFilesExport'
        '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'
  /v1/orgs/{id}/files/import:
    post:
      operationId: importWorkspaceFiles
      tags:
      - Files
      security:
      - bearerAuth: []
      summary: Create and update routines and skills from files (dry_run shows what would…
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportWorkspaceFilesRequest'
      responses:
        '200':
          description: Result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceFilesResult'
        '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'
  /v1/orgs/{id}/git-sync:
    get:
      operationId: getGitSync
      tags:
      - Files
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Git sync
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitSyncStatus'
        '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'
      summary: Get git sync
      x-summary-source: derived
    put:
      operationId: setGitSync
      tags:
      - Files
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetGitSyncRequest'
      responses:
        '200':
          description: Git sync
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitSyncStatus'
        '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'
      summary: Set git sync
      x-summary-source: derived
    delete:
      operationId: deleteGitSync
      tags:
      - Files
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Git sync
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitSyncStatus'
        '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'
      summary: Delete git sync
      x-summary-source: derived
  /v1/orgs/{id}/git-sync/run:
    post:
      operationId: runGitSync
      tags:
      - Files
      security:
      - bearerAuth: []
      summary: Sync on the worker's next minute
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Git sync
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitSyncStatus'
        '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'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    GitSyncStatus:
      type: object
      properties:
        configured:
          type: boolean
        repo:
          type:
          - string
          - 'null'
        branch:
          type:
          - string
          - 'null'
        path:
          type:
          - string
          - 'null'
        enabled:
          type: boolean
        has_token:
          type: boolean
        webhook_url:
          type:
          - string
          - 'null'
        webhook_secret:
          type:
          - string
          - 'null'
        last_synced_at:
          type:
          - string
          - 'null'
          format: date-time
        last_commit:
          type:
          - string
          - 'null'
        last_error:
          type:
          - string
          - 'null'
        open_pr_url:
          type:
          - string
          - 'null'
      required:
      - configured
      - repo
      - branch
      - path
      - enabled
      - has_token
      - webhook_url
      - webhook_secret
      - last_synced_at
      - last_commit
      - last_error
      - open_pr_url
    ImportWorkspaceFilesRequest:
      type: object
      properties:
        zip_base64:
          type: string
          maxLength: 70000000
        files:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
                minLength: 1
                maxLength: 1000
              content_base64:
                type: string
                maxLength: 14000000
            required:
            - path
            - content_base64
          maxItems: 5000
        dry_run:
          type: boolean
    WorkspaceFilesResult:
      type: object
      properties:
        created:
          type: array
          items:
            type: string
        updated:
          type: array
          items:
            type: string
        deleted:
          type: array
          items:
            type: string
        unchanged:
          type: integer
        errors:
          type: array
          items:
            type: string
        dry_run:
          type: boolean
      required:
      - created
      - updated
      - deleted
      - unchanged
      - errors
      - dry_run
    FileKeyCreated:
      allOf:
      - $ref: '#/components/schemas/FileKey'
      - type: object
        properties:
          key:
            type: string
            description: 'Read-only File Provider key (cfk_…), shown once. Send as Authorization: FileKey <key>'
        required:
        - key
    DeletedFileKey:
      type: object
      properties:
        deleted:
          type: string
          format: uuid
      required:
      - deleted
    SetGitSyncRequest:
      type: object
      properties:
        repo:
          type: string
          pattern: ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$
        branch:
          type: string
          minLength: 1
          maxLength: 200
        path:
          type: string
          maxLength: 200
        enabled:
          type: boolean
      required:
      - repo
    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
    FileKey:
      type: object
      properties:
        id:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        platform:
          type: string
          enum:
          - ios
          - macos
        label:
          type:
          - string
          - 'null'
          maxLength: 80
        last_used_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
      - id
      - org_id
      - platform
      - label
      - last_used_at
      - created_at
    WorkspaceFilesExport:
      type: object
      properties:
        zip_base64:
          type: string
        count:
          type: integer
        files:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              content_base64:
                type: string
            required:
            - path
            - content_base64
      required:
      - zip_base64
      - count
      - files
    FileKeyCreate:
      type: object
      properties:
        org_id:
          type: string
          format: uuid
        platform:
          type: string
          enum:
          - ios
          - macos
        label:
          type: string
          minLength: 1
          maxLength: 80
      required:
      - org_id
      - platform
    FileKeyList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/FileKey'
      required:
      - items
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase access token