Secure AI Policy API

The Policy API from Secure AI — 3 operation(s) for policy.

GitHub OpenAPI

Operations 5

GET /policy The rules in force #
PUT /policy Replace the rules #
POST /policy/allow Stop flagging a value #
GET /policy/templates Starting policies #
POST /policy/templates Apply a template #

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/secureai-one:secureai-one-policy-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

secureai-one-policy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Secure AI Policy API
  version: 1.0.0
  description: 'Data loss prevention for AI agents. Inspects what an agent is about to do — the tool call, with its arguments — and allows, redacts or blocks it according to rules the account holds. Every inspected action is logged as kinds and locations, never as values.


    The detector half is still here on its own: /redact swaps the people in a piece of text for plausible stand-ins before it reaches a model, and /restore puts them back.'
  contact:
    url: https://secureai.one/developers
servers:
- url: https://secureai.one/v1
security:
- apiKey: []
tags:
- name: Policy
paths:
  /policy:
    get:
      summary: The rules in force
      operationId: getPolicy
      responses:
        '200':
          description: The account's policy, or the default if none has been set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  policy:
                    $ref: '#/components/schemas/Policy'
                  source:
                    type: string
                    enum:
                    - account
                    - default
                    - unreadable
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Policy
    put:
      summary: Replace the rules
      description: Refuses the whole policy when any rule is malformed, naming the index — a parser that dropped the rule it could not read would hand back a policy weaker than the one its author believed they saved.
      operationId: setPolicy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                policy:
                  $ref: '#/components/schemas/Policy'
      responses:
        '200':
          description: Stored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  policy:
                    $ref: '#/components/schemas/Policy'
        '400':
          description: The policy could not be parsed. The message names the offending rule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Policy
  /policy/allow:
    post:
      summary: Stop flagging a value
      description: Exempts a literal value — a shared mailbox, your own domain — for every agent on the account from the next action onward. A leading "@" exempts a whole domain.
      operationId: allowValue
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: string
                  maxLength: 200
                  example: '@ourcompany.com'
              required:
              - value
      responses:
        '200':
          description: Added.
          content:
            application/json:
              schema:
                type: object
                properties:
                  policy:
                    $ref: '#/components/schemas/Policy'
                  added:
                    type: string
        '400':
          description: No value, or one longer than 200 characters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Policy
  /policy/templates:
    get:
      summary: Starting policies
      description: 'Balanced, PCI DSS, HIPAA, GDPR, client confidentiality, and one that refuses everything.


        A template configures one control in one system. It is a starting point, not certification, and no template makes an organisation compliant with anything — every one carries that caveat with it.'
      operationId: listTemplates
      responses:
        '200':
          description: The list, without policy bodies.
          content:
            application/json:
              schema:
                type: object
                properties:
                  templates:
                    type: array
                    items:
                      $ref: '#/components/schemas/Template'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Policy
    post:
      summary: Apply a template
      description: 'Replaces the rules wholesale rather than merging — a template somebody chose deliberately should be what they get. The account''s own value allowlist, gateway destinations and webhook are kept: those are facts about their estate, not opinions about risk.'
      operationId: applyTemplate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
              - id
      responses:
        '200':
          description: The new policy, and the caveat that came with the template.
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No template with that id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Policy
components:
  schemas:
    Policy:
      type: object
      properties:
        version:
          type: integer
          enum:
          - 1
        fallback:
          type: string
          enum:
          - allow
          - redact
          - approve
          - block
          description: What happens to a kind no rule mentions.
        rules:
          type: array
          items:
            $ref: '#/components/schemas/Rule'
          maxItems: 200
        denyTools:
          type: array
          items:
            type: string
          description: Tools that may not be called at all, whatever is inside them.
        allow:
          type: array
          items:
            type: string
          maxItems: 500
          description: Literal values that are never sensitive here. A leading "@" exempts a whole domain. These are stored, unlike anything in the audit trail.
        gatewayAllow:
          type: array
          items:
            type: string
          maxItems: 200
          description: Hosts the gateway may forward to. Empty or absent means any public host. A leading "." matches a domain and its subdomains. Private-address rules still apply and cannot be opened up from here.
        webhook:
          type: object
          description: Where to POST when an action is refused. The payload is the audit record, which holds kinds and locations and never values.
          properties:
            url:
              type: string
              description: https only. Private and link-local addresses are refused, as everywhere else.
            'on':
              type: array
              items:
                type: string
                enum:
                - allow
                - redact
                - block
              description: Which decisions to send. Defaults to blocks only — a notification on every allowed action is one nobody reads.
            secret:
              type: string
              maxLength: 200
              description: 'When set, each delivery carries X-Secure-AI-Signature: sha256=<hmac of the body>.'
          required:
          - url
        approvalTtlSeconds:
          type: integer
          minimum: 30
          maximum: 86400
          description: How long a held action waits before it is denied. Expiry is a denial and never a release — an action somebody wanted reviewed must not proceed because nobody had time to review it.
      required:
      - version
      - fallback
      - rules
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type:
              - string
              - 'null'
            param:
              type:
              - string
              - 'null'
    Template:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        caveat:
          type: string
          description: The honest limit of what applying it achieves. Render it as a warning, not as prose.
        rules:
          type: integer
      required:
      - id
      - name
      - description
      - caveat
    Rule:
      type: object
      description: One line of policy. When two rules match the same finding, the later one wins.
      properties:
        kind:
          type: string
          enum:
          - secret
          - card
          - iban
          - ssn
          - govid
          - email
          - phone
          - address
          - postcode
          - name
          - host
        decision:
          type: string
          enum:
          - allow
          - redact
          - approve
          - block
        tools:
          type: array
          items:
            type: string
          description: Only these tools. Exact, or a single trailing "*". Absent means all.
        direction:
          type: string
          enum:
          - outbound
          - inbound
          description: Absent means both.
      required:
      - kind
      - decision
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: A key created in Settings → Developer. Shown once; what is stored is its SHA-256.