> ## Documentation Index
> Fetch the complete documentation index at: https://checkfu.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an ActionPolicy

> Create one ActionPolicy carrying 1 to 256 rules, each naming a subject kind and id, resource kind and id, permission, and optional surface scope, with an effect of allow, require_approval, or deny. Every pattern is a glob in which `*` and `?` are the only operators, and rule ids must be unique inside the ActionPolicy. ActionPolicies are immutable, so replace rather than edit one. Accepts an Idempotency-Key.

Checkfu support posture: alpha; hosted. Required evidence journey: governance-registry. Deployment-specific readiness and the latest proven release are available from GET /v1/support/capabilities.



## OpenAPI

````yaml /openapi.json post /v1/action-policies
openapi: 3.1.0
info:
  title: Checkfu API
  version: '2026-08-27'
  description: >-
    Authentication is declared per operation: API-key, runtime, or connector
    bearer; Automation signature; or credential-free pairing redemption. Every
    general Checkfu REST request requires the dated `Checkfu-Version` header
    (one of: 2026-08-27); the three MCP JSON-RPC transports use
    `MCP-Protocol-Version`, A2A uses `A2A-Version`, and the provider OAuth
    callback carries neither Checkfu header. API keys resolve one Workspace
    without a request selector; authenticated responses identify it with
    `Checkfu-Workspace-Id`.
servers:
  - url: https://api.checkfu.com
security:
  - bearerAuth: []
tags:
  - name: organizations
  - name: sourceRepositories
  - name: tenants
  - name: workspaces
  - name: principals
  - name: principalGroups
  - name: principalAccessCredentials
  - name: apiKeys
  - name: agents
  - name: harnesses
  - name: harnessRuntime
  - name: computerProfiles
  - name: permissionAssignments
  - name: actionPolicies
  - name: files
  - name: memoryStores
  - name: dreams
  - name: modelCredentials
  - name: modelRoutingProfiles
  - name: blueprintInstallations
  - name: toolSources
  - name: skills
  - name: skillSources
  - name: agentSources
  - name: skillProposals
  - name: instructionProposals
  - name: catalog
  - name: concepts
  - name: support
  - name: connections
  - name: connectionVaults
  - name: connectionAssignments
  - name: connectedRuntimes
  - name: projects
  - name: collaboration
  - name: automationGraphs
  - name: automations
  - name: actionApprovals
  - name: standingApprovals
  - name: usage
  - name: models
  - name: outcomes
  - name: budgets
  - name: billing
  - name: sessions
  - name: audit
  - name: sessionExports
  - name: runs
  - name: runnerPools
  - name: transcripts
  - name: sessionWatches
  - name: sessionHandoffs
  - name: sessionCapsules
  - name: sessionTrajectories
  - name: webhookEndpoints
  - name: integrationGateway
  - name: agentDeployments
  - name: workEnvironments
  - name: computers
  - name: computerScreens
  - name: computerBrowserObservations
  - name: computerBrowserActions
  - name: environments
  - name: vaults
  - name: apiMcp
  - name: a2a
paths:
  /v1/action-policies:
    post:
      tags:
        - actionPolicies
      summary: Create an ActionPolicy
      description: >-
        Create one ActionPolicy carrying 1 to 256 rules, each naming a subject
        kind and id, resource kind and id, permission, and optional surface
        scope, with an effect of allow, require_approval, or deny. Every pattern
        is a glob in which `*` and `?` are the only operators, and rule ids must
        be unique inside the ActionPolicy. ActionPolicies are immutable, so
        replace rather than edit one. Accepts an Idempotency-Key.


        Checkfu support posture: alpha; hosted. Required evidence journey:
        governance-registry. Deployment-specific readiness and the latest proven
        release are available from GET /v1/support/capabilities.
      operationId: actionPolicies.createActionPolicy
      parameters:
        - name: checkfu-version
          in: header
          schema:
            type: string
            enum:
              - '2026-08-27'
          required: true
        - name: idempotency-key
          in: header
          schema:
            type: string
            allOf:
              - maxLength: 255
          required: false
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  allOf:
                    - minLength: 1
                    - maxLength: 255
                rules:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 255
                      effect:
                        $ref: '#/components/schemas/Union_104'
                      subject_kind:
                        $ref: '#/components/schemas/Union_105'
                      subject_id:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 255
                          - pattern: ^[^\p{Cc}]+$
                      resource_kind:
                        $ref: '#/components/schemas/Union_106'
                      resource_id:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 255
                          - pattern: ^[^\p{Cc}]+$
                      permission:
                        type: string
                        allOf:
                          - minLength: 1
                          - maxLength: 255
                          - pattern: ^[^\p{Cc}]+$
                      surface_scope_id:
                        $ref: '#/components/schemas/Union_107'
                      surface_scope_kind:
                        type: string
                        enum:
                          - root
                          - team
                          - channel
                          - personal
                      argument_conditions:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              $ref: '#/components/schemas/Arrays_18'
                            predicate:
                              anyOf:
                                - $ref: '#/components/schemas/Objects_47'
                                - $ref: '#/components/schemas/Objects_48'
                                - $ref: '#/components/schemas/Objects_49'
                                - $ref: '#/components/schemas/OrderedArgumentRange'
                                - $ref: '#/components/schemas/Objects_50'
                                - $ref: '#/components/schemas/Objects_51'
                                - $ref: '#/components/schemas/Objects_52'
                          required:
                            - path
                            - predicate
                          additionalProperties: false
                        allOf:
                          - maxItems: 16
                    required:
                      - id
                      - effect
                      - subject_kind
                      - subject_id
                      - resource_kind
                      - resource_id
                      - permission
                      - surface_scope_id
                    additionalProperties: false
                  allOf:
                    - minItems: 1
                    - maxItems: 256
              required:
                - name
                - rules
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    $ref: '#/components/schemas/ActionPolicyId'
                  workspace_id:
                    $ref: '#/components/schemas/WorkspaceId'
                  name:
                    type: string
                    allOf:
                      - minLength: 1
                      - maxLength: 255
                  state:
                    type: string
                    enum:
                      - active
                      - disabled
                  rules:
                    $ref: '#/components/schemas/Arrays_20'
                  version:
                    type: integer
                    allOf:
                      - exclusiveMinimum: 0
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - id
                  - workspace_id
                  - name
                  - state
                  - rules
                  - version
                  - created_at
                  - updated_at
                additionalProperties: false
          headers:
            checkfu-workspace-id:
              description: The Workspace resolved from the authenticated bearer credential.
              required: true
              schema:
                $ref: '#/components/schemas/WorkspaceId'
        '400':
          description: Typed Checkfu wire error
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - validation.malformed
                      message:
                        type: string
                      more:
                        type: string
                        enum:
                          - >-
                            https://docs.checkfu.com/reference/errors#validation-malformed
                        description: >-
                          Stable public documentation and remedy for this error
                          type.
                    required:
                      - type
                      - message
                      - more
                    additionalProperties: false
                additionalProperties: false
        '401':
          description: Typed Checkfu wire error
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - type
                      - message
                      - more
                    properties:
                      type:
                        type: string
                        enum:
                          - auth.invalid_key
                      message:
                        type: string
                      more:
                        type: string
                        enum:
                          - >-
                            https://docs.checkfu.com/reference/errors#auth-invalid-key
                        description: >-
                          Stable public documentation and remedy for this error
                          type.
                    additionalProperties: false
                additionalProperties: false
        '403':
          description: >-
            The organization, tenant, or workspace backing this key is
            administratively disabled. | Deployment governance or retention
            policy denied the request.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - error
                    properties:
                      error:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - auth.disabled_tenancy
                          message:
                            type: string
                          more:
                            type: string
                            enum:
                              - >-
                                https://docs.checkfu.com/reference/errors#auth-disabled-tenancy
                            description: >-
                              Stable public documentation and remedy for this
                              error type.
                        required:
                          - type
                          - message
                          - more
                        additionalProperties: false
                    additionalProperties: false
                  - $ref: '#/components/schemas/PolicyDeniedError'
        '404':
          description: >-
            The requested resource does not exist in the resolved deployment
            boundary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationNotFoundError'
        '409':
          description: >-
            The request conflicts with the resource's current state. | An
            idempotent mutation conflicts with a completed or in-progress
            request for the same key.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationConflictError'
                  - $ref: '#/components/schemas/IdempotencyConflictError'
        '429':
          description: Typed Checkfu wire error
          headers:
            retry-after:
              description: >-
                Delay in seconds for rate limits or deployment quotas with a
                known release or UTC reset boundary
              required: false
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - type
                      - message
                      - more
                    properties:
                      type:
                        type: string
                        enum:
                          - budget.exceeded
                      message:
                        type: string
                      more:
                        type: string
                        enum:
                          - >-
                            https://docs.checkfu.com/reference/errors#budget-exceeded
                        description: >-
                          Stable public documentation and remedy for this error
                          type.
                    additionalProperties: false
                additionalProperties: false
        '500':
          description: >-
            An unexpected internal failure occurred; the message contains an
            opaque incident reference.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeInternalError'
      security:
        - bearerAuth: []
components:
  schemas:
    Union_104:
      type: string
      enum:
        - allow
        - require_approval
        - deny
    Union_105:
      anyOf:
        - type: string
          enum:
            - '*'
        - $ref: '#/components/schemas/Union_99'
    Union_106:
      anyOf:
        - type: string
          enum:
            - '*'
        - $ref: '#/components/schemas/Union_95'
    Union_107:
      anyOf:
        - type: string
          allOf:
            - minLength: 1
            - maxLength: 255
            - pattern: ^[^\p{Cc}]+$
        - type: 'null'
    Arrays_18:
      type: array
      items:
        type: string
        allOf:
          - minLength: 1
          - maxLength: 128
          - pattern: ^[^\p{Cc}]+$
      allOf:
        - minItems: 1
        - maxItems: 8
    Objects_47:
      type: object
      properties:
        op:
          type: string
          enum:
            - exact
        to:
          $ref: '#/components/schemas/Union_108'
      required:
        - op
        - to
      additionalProperties: false
    Objects_48:
      type: object
      properties:
        op:
          type: string
          enum:
            - one_of
        values:
          $ref: '#/components/schemas/Arrays_19'
      required:
        - op
        - values
      additionalProperties: false
    Objects_49:
      type: object
      properties:
        op:
          type: string
          enum:
            - not_one_of
        values:
          $ref: '#/components/schemas/Arrays_19'
      required:
        - op
        - values
      additionalProperties: false
    OrderedArgumentRange:
      type: object
      properties:
        op:
          type: string
          enum:
            - range
        min:
          anyOf:
            - type: number
            - type: 'null'
        max:
          anyOf:
            - type: number
            - type: 'null'
      required:
        - op
        - min
        - max
      additionalProperties: false
    Objects_50:
      type: object
      properties:
        op:
          type: string
          enum:
            - prefix
        value:
          $ref: '#/components/schemas/Union_108'
      required:
        - op
        - value
      additionalProperties: false
    Objects_51:
      type: object
      properties:
        op:
          type: string
          enum:
            - contains
        value:
          $ref: '#/components/schemas/Union_108'
      required:
        - op
        - value
      additionalProperties: false
    Objects_52:
      type: object
      properties:
        op:
          type: string
          enum:
            - subset
        of:
          $ref: '#/components/schemas/Arrays_19'
      required:
        - op
        - of
      additionalProperties: false
    ActionPolicyId:
      type: string
      allOf:
        - pattern: ^apol_[0-9a-f]{32}$
    WorkspaceId:
      type: string
      allOf:
        - pattern: ^wrkspc_[0-9a-f]{32}$
    Arrays_20:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            allOf:
              - minLength: 1
              - maxLength: 255
          effect:
            $ref: '#/components/schemas/Union_104'
          subject_kind:
            $ref: '#/components/schemas/Union_105'
          subject_id:
            type: string
            allOf:
              - minLength: 1
              - maxLength: 255
              - pattern: ^[^\p{Cc}]+$
          resource_kind:
            $ref: '#/components/schemas/Union_106'
          resource_id:
            type: string
            allOf:
              - minLength: 1
              - maxLength: 255
              - pattern: ^[^\p{Cc}]+$
          permission:
            type: string
            allOf:
              - minLength: 1
              - maxLength: 255
              - pattern: ^[^\p{Cc}]+$
          surface_scope_id:
            $ref: '#/components/schemas/Union_107'
          surface_scope_kind:
            type: string
            enum:
              - root
              - team
              - channel
              - personal
          argument_conditions:
            type: array
            items:
              type: object
              properties:
                path:
                  $ref: '#/components/schemas/Arrays_18'
                predicate:
                  anyOf:
                    - $ref: '#/components/schemas/Objects_47'
                    - $ref: '#/components/schemas/Objects_48'
                    - $ref: '#/components/schemas/Objects_49'
                    - type: object
                      properties:
                        op:
                          type: string
                          enum:
                            - range
                        min:
                          anyOf:
                            - type: number
                            - type: 'null'
                        max:
                          anyOf:
                            - type: number
                            - type: 'null'
                      required:
                        - op
                        - min
                        - max
                      additionalProperties: false
                    - $ref: '#/components/schemas/Objects_50'
                    - $ref: '#/components/schemas/Objects_51'
                    - $ref: '#/components/schemas/Objects_52'
              required:
                - path
                - predicate
              additionalProperties: false
            allOf:
              - maxItems: 16
        required:
          - id
          - effect
          - subject_kind
          - subject_id
          - resource_kind
          - resource_id
          - permission
          - surface_scope_id
        additionalProperties: false
      allOf:
        - minItems: 1
        - maxItems: 256
    PolicyDeniedError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - policy.denied
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#policy-denied
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: Deployment governance or retention policy denied the request.
    ValidationNotFoundError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.not_found
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#validation-not-found
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        The requested resource does not exist in the resolved deployment
        boundary.
    ValidationConflictError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.conflict
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#validation-conflict
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: The request conflicts with the resource's current state.
    IdempotencyConflictError:
      anyOf:
        - $ref: '#/components/schemas/ValidationIdempotencyConflictError'
        - $ref: '#/components/schemas/ValidationIdempotencyInProgressError'
      description: >-
        An idempotent mutation conflicts with a completed or in-progress request
        for the same key.
    RuntimeInternalError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - runtime.internal
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#runtime-internal
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        An unexpected internal failure occurred; the message contains an opaque
        incident reference.
    Union_99:
      type: string
      enum:
        - principal
        - group
        - agent_definition
        - agent_installation
        - surface_scope
        - session
    Union_95:
      type: string
      enum:
        - agent-definition
        - connection
        - tool-source
        - skill
        - memory-store
        - model-binding
        - harness
        - sandbox-profile
        - surface
    Union_108:
      anyOf:
        - type: object
          properties:
            source:
              type: string
              enum:
                - literal
            value:
              $ref: '#/components/schemas/Union_109'
          required:
            - source
            - value
          additionalProperties: false
        - type: object
          properties:
            source:
              type: string
              enum:
                - fact
            fact:
              type: string
              enum:
                - workspace_id
                - acted_as
                - surface_scope_id
                - connection_provider
          required:
            - source
            - fact
          additionalProperties: false
    Arrays_19:
      type: array
      items:
        $ref: '#/components/schemas/Union_109'
      allOf:
        - minItems: 1
        - maxItems: 64
    ValidationIdempotencyConflictError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.idempotency_conflict
            message:
              type: string
            more:
              type: string
              enum:
                - >-
                  https://docs.checkfu.com/reference/errors#validation-idempotency-conflict
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: The Idempotency-Key is already bound to a different request.
    ValidationIdempotencyInProgressError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.idempotency_in_progress
            message:
              type: string
            more:
              type: string
              enum:
                - >-
                  https://docs.checkfu.com/reference/errors#validation-idempotency-in-progress
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        An identical idempotent request is still in progress and may be retried
        later.
    Union_109:
      anyOf:
        - type: string
          allOf:
            - maxLength: 512
        - type: number
        - type: boolean
        - type: 'null'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````