Casama AI Comps API
The comps API from Casama AI, for comps.
Operations 10
POST
/v1/admin/comp-codes
Make a gift code for one plan and length; the code is shown only once (instance…
#
The comps API from Casama AI, for comps.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/casama-ai:casama-ai-comps-api"
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.
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: 3.2.0
info:
title: Casama Comps 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: comps
paths:
/v1/admin/comp-settings:
get:
operationId: adminCompSettings
tags:
- comps
security:
- bearerAuth: []
summary: Free plan settings (instance owner)
responses:
'200':
description: Settings
content:
application/json:
schema:
$ref: '#/components/schemas/CompSettings'
'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'
'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'
put:
operationId: setAdminCompSettings
tags:
- comps
security:
- bearerAuth: []
summary: Change free plan settings (instance owner)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CompSettings'
responses:
'200':
description: Settings
content:
application/json:
schema:
$ref: '#/components/schemas/CompSettings'
'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'
'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/admin/comps:
get:
operationId: listAdminComps
tags:
- comps
security:
- bearerAuth: []
summary: Free plans, running first (instance owner)
parameters:
- schema:
type: string
enum:
- 'true'
- 'false'
required: false
name: running
in: query
- schema:
type: integer
minimum: 1
maximum: 500
required: false
name: limit
in: query
responses:
'200':
description: Free plans
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Comp'
'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'
'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'
post:
operationId: grantAdminComp
tags:
- comps
security:
- bearerAuth: []
summary: Give someone a plan free for some months (instance owner)
description: 'Errors: 409 comps_off, 400 plan_not_allowed, 400 months_not_allowed, 404 user_not_found, 409 account_banned, 409 no_workspace, 409 comp_exists, 409 already_paying, 409 comp_limit.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GrantCompRequest'
responses:
'200':
description: Free plan
content:
application/json:
schema:
$ref: '#/components/schemas/Comp'
'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'
'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/admin/comps/{id}:
patch:
operationId: updateAdminComp
tags:
- comps
security:
- bearerAuth: []
summary: Extend or end a free plan (instance owner)
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCompRequest'
responses:
'200':
description: Free plan
content:
application/json:
schema:
$ref: '#/components/schemas/Comp'
'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'
'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/admin/comp-codes:
get:
operationId: listAdminCompCodes
tags:
- comps
security:
- bearerAuth: []
summary: Gift codes and how often they were used (instance owner)
responses:
'200':
description: Gift codes
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CompCode'
'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'
'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'
post:
operationId: createAdminCompCode
tags:
- comps
security:
- bearerAuth: []
summary: Make a gift code for one plan and length; the code is shown only once (instance…
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCompCodeRequest'
responses:
'200':
description: Gift code
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedCompCode'
'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'
'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/admin/comp-codes/{id}:
patch:
operationId: updateAdminCompCode
tags:
- comps
security:
- bearerAuth: []
summary: Disable a gift code or change its limits (instance owner)
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCompCodeRequest'
responses:
'200':
description: Gift code
content:
application/json:
schema:
$ref: '#/components/schemas/CompCode'
'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'
'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/comp/preview:
get:
operationId: previewCompCode
tags:
- comps
summary: What a gift code gives (no sign-in)
parameters:
- schema:
type: string
minLength: 1
maxLength: 200
required: true
name: code
in: query
responses:
'200':
description: Gift code
content:
application/json:
schema:
$ref: '#/components/schemas/CompCodePreview'
'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'
'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/comp/redeem:
post:
operationId: redeemCompCode
tags:
- comps
security:
- bearerAuth: []
summary: Redeem a gift code into a workspace you own (web and desktop only)
description: 'Errors: 404 comp_code_invalid, 409 comp_code_expired, 409 comp_code_used_up, 409 comp_code_used, 409 comp_exists, 409 already_paying, 409 comp_limit, 409 comps_off, 403 forbidden, 429 too_many_attempts.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RedeemCompRequest'
responses:
'200':
description: Free plan
content:
application/json:
schema:
$ref: '#/components/schemas/RedeemedComp'
'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'
'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'
components:
schemas:
CompSettings:
type: object
properties:
enabled:
type: boolean
grant_plans:
type: array
items:
type: string
minLength: 1
maxLength: 80
maxItems: 20
description: Plans an instance owner may give directly (monthly paid plans only)
code_plans:
type: array
items:
type: string
minLength: 1
maxLength: 80
maxItems: 20
description: Plans a gift code may carry (monthly paid plans only)
max_months:
type: integer
minimum: 1
maximum: 36
max_active:
type: integer
minimum: 1
maximum: 100000
required:
- enabled
- grant_plans
- code_plans
- max_months
- max_active
Comp:
type: object
properties:
id:
type: string
format: uuid
org_id:
type: string
format: uuid
org_name:
type:
- string
- 'null'
user_id:
type:
- string
- 'null'
format: uuid
email:
type:
- string
- 'null'
description: Masked, like fr••••@example.com
plan_code:
type: string
months:
type: integer
starts_at:
type: string
format: date-time
ends_at:
type: string
format: date-time
from:
type: string
enum:
- grant
- code
code_id:
type:
- string
- 'null'
format: uuid
note:
type:
- string
- 'null'
ended_at:
type:
- string
- 'null'
format: date-time
end_reason:
type:
- string
- 'null'
description: expired, revoked or replaced_by_purchase; null while it runs
created_at:
type: string
format: date-time
required:
- id
- org_id
- org_name
- user_id
- email
- plan_code
- months
- starts_at
- ends_at
- from
- code_id
- note
- ended_at
- end_reason
- created_at
UpdateCompCodeRequest:
type: object
properties:
disabled:
type: boolean
redeem_by:
type:
- string
- 'null'
format: date-time
max_redemptions:
type: integer
minimum: 1
maximum: 10000
CreateCompCodeRequest:
type: object
properties:
plan_code:
type: string
minLength: 1
maxLength: 80
months:
type: integer
minimum: 1
maximum: 36
max_redemptions:
type: integer
minimum: 1
maximum: 10000
default: 1
redeem_by:
type:
- string
- 'null'
format: date-time
note:
type:
- string
- 'null'
maxLength: 200
required:
- plan_code
- months
CompCodePreview:
type: object
properties:
plan_code:
type: string
plan_name:
type: string
months:
type: integer
required:
- plan_code
- plan_name
- months
RedeemedComp:
type: object
properties:
plan_code:
type: string
plan_name:
type: string
ends_at:
type: string
format: date-time
org_id:
type: string
format: uuid
required:
- plan_code
- plan_name
- ends_at
- org_id
CompCode:
type: object
properties:
id:
type: string
format: uuid
hint:
type: string
description: The code's last characters, like …7KQ2
plan_code:
type: string
months:
type: integer
max_redemptions:
type: integer
redeemed_count:
type: integer
redeem_by:
type:
- string
- 'null'
format: date-time
note:
type:
- string
- 'null'
disabled:
type: boolean
created_at:
type: string
format: date-time
required:
- id
- hint
- plan_code
- months
- max_redemptions
- redeemed_count
- redeem_by
- note
- disabled
- created_at
GrantCompRequest:
type: object
properties:
email:
type: string
maxLength: 320
format: email
user_id:
type: string
format: uuid
org_id:
type: string
format: uuid
description: 'The workspace; default: the oldest one the person owns'
plan_code:
type: string
minLength: 1
maxLength: 80
months:
type: integer
minimum: 1
maximum: 36
note:
type:
- string
- 'null'
maxLength: 200
required:
- plan_code
- months
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
RedeemCompRequest:
type: object
properties:
code:
type: string
minLength: 1
maxLength: 200
org_id:
type: string
format: uuid
required:
- code
- org_id
UpdateCompRequest:
type: object
properties:
extend_months:
type: integer
minimum: 1
maximum: 36
revoke:
type: boolean
enum:
- true
CreatedCompCode:
type: object
properties:
id:
type: string
format: uuid
hint:
type: string
description: The code's last characters, like …7KQ2
plan_code:
type: string
months:
type: integer
max_redemptions:
type: integer
redeemed_count:
type: integer
redeem_by:
type:
- string
- 'null'
format: date-time
note:
type:
- string
- 'null'
disabled:
type: boolean
created_at:
type: string
format: date-time
code:
type: string
description: 'The code, shown only now: G-XXXXX-XXXXX'
link:
type: string
description: casama.ai/g/<code>
required:
- id
- hint
- plan_code
- months
- max_redemptions
- redeemed_count
- redeem_by
- note
- disabled
- created_at
- code
- link
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: Supabase access token