Casama AI Action Rules API
The action-rules API from Casama AI, for action-rules.
The action-rules API from Casama AI, for action-rules.
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-action-rules-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 Action Rules 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: action-rules
paths:
/v1/action-rules:
get:
operationId: listActionRules
tags:
- action-rules
security:
- bearerAuth: []
summary: A bot's rules plus the workspace's (or only the workspace's without bot_id)
parameters:
- schema:
type: string
format: uuid
required: true
name: org_id
in: query
- schema:
type: string
format: uuid
required: false
name: bot_id
in: query
responses:
'200':
description: Rules
content:
application/json:
schema:
$ref: '#/components/schemas/ActionRuleList'
'401':
description: Not authenticated
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
post:
operationId: createActionRule
tags:
- action-rules
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateActionRuleRequest'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ActionRule'
'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: Create action rule
x-summary-source: derived
/v1/action-rules/{id}:
delete:
operationId: deleteActionRule
tags:
- action-rules
security:
- bearerAuth: []
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
responses:
'200':
description: Deleted
content:
application/json:
schema:
$ref: '#/components/schemas/DeletedRule'
'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'
summary: Delete action rule
x-summary-source: derived
/v1/action-rules/bundles/{id}/end:
post:
operationId: endActionRuleBundle
tags:
- action-rules
security:
- bearerAuth: []
summary: End an active overnight permission bundle early
parameters:
- schema:
type: string
format: uuid
required: true
name: id
in: path
responses:
'200':
description: Ended
content:
application/json:
schema:
$ref: '#/components/schemas/EndedRuleBundle'
'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:
DeletedRule:
type: object
properties:
deleted:
type: string
format: uuid
required:
- deleted
ActionRuleTarget:
type:
- object
- 'null'
properties:
domains:
type: array
items:
type: string
minLength: 3
maxLength: 253
maxItems: 20
recipients:
type: array
items:
type: string
format: email
maxItems: 50
max_amount:
type: number
minimum: 0
paths:
type: array
items:
type: string
minLength: 1
maxLength: 300
maxItems: 20
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
ActionRuleList:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/ActionRule'
required:
- items
ActionRule:
type: object
properties:
id:
type: string
format: uuid
org_id:
type: string
format: uuid
bot_id:
type:
- string
- 'null'
format: uuid
match_kind:
type: string
enum:
- tool
- group
- category
match_value:
type: string
target:
$ref: '#/components/schemas/ActionRuleTarget'
rule:
type: string
enum:
- allow
- allow_within_limits
- ask
- hand_off
preview:
type: string
description: In plain language, e.g. Sends messages to anyone at acme.com without asking
expires_at:
type:
- string
- 'null'
format: date-time
bundle_id:
type:
- string
- 'null'
format: uuid
scope_run_id:
type:
- string
- 'null'
format: uuid
scope_conversation_id:
type:
- string
- 'null'
format: uuid
scope_routine_id:
type:
- string
- 'null'
format: uuid
scope_project_id:
type:
- string
- 'null'
format: uuid
created_at:
type: string
format: date-time
required:
- id
- org_id
- bot_id
- match_kind
- match_value
- target
- rule
- preview
- created_at
EndedRuleBundle:
type: object
properties:
ended:
type: integer
minimum: 0
required:
- ended
CreateActionRuleRequest:
type: object
properties:
org_id:
type: string
format: uuid
bot_id:
type:
- string
- 'null'
format: uuid
description: 'Null or missing: the whole workspace (admins)'
match_kind:
type: string
enum:
- tool
- group
- category
match_value:
type: string
minLength: 1
maxLength: 200
target:
$ref: '#/components/schemas/ActionRuleTarget'
rule:
type: string
enum:
- allow
- allow_within_limits
- ask
- hand_off
required:
- org_id
- match_kind
- match_value
- rule
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: Supabase access token