Permit.io Policy Guards (EAP) API

The Policy Guards (EAP) API from Permit.io, for policy guards (eap).

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

GET /v2/policy_guards/scopes List Policy Guard Scopes #
POST /v2/policy_guards/scopes Create Policy Guard Scope #
GET /v2/policy_guards/scopes/{policy_guard_scope_id} Get Policy Guard Scope #
DELETE /v2/policy_guards/scopes/{policy_guard_scope_id} Delete Policy Guard Scope #
POST /v2/policy_guards/scopes/{policy_guard_scope_id}/associate Associate Policy Guard Scope #
DELETE /v2/policy_guards/scopes/{policy_guard_scope_id}/disassociate Disassociate Policy Guard Scope #
POST /v2/policy_guards/scopes/{policy_guard_scope_id}/rules Create Policy Guard Rule #
DELETE /v2/policy_guards/scopes/{policy_guard_scope_id}/rules Delete Policy Guard Rule #
GET /v2/policy_guards/scopes/{policy_guard_scope_id}/rules List Policy Guard Rules #

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/permitio:permitio-policy-guards-eap-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

permitio-policy-guards-eap-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Permit.io Policy Guards (EAP) API
  description: Authorization as a service
  version: 2.0.0
tags:
- name: Policy Guards (EAP)
paths:
  /v2/policy_guards/scopes:
    get:
      tags:
      - Policy Guards (EAP)
      summary: List Policy Guard Scopes
      description: List all guarding policies scopes.
      operationId: list_policy_guard_scopes
      security:
      - HTTPBearer: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number of the results to fetch, starting at 1.
          default: 1
          title: Page
        description: Page number of the results to fetch, starting at 1.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: The number of results per page (max 100).
          default: 30
          title: Per Page
        description: The number of results per page (max 100).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PolicyGuardScopeRead'
                title: Response List Policy Guard Scopes V2 Policy Guards Scopes Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Policy Guards (EAP)
      summary: Create Policy Guard Scope
      description: Create a new Policy guard scope.
      operationId: create_policy_guard_scope
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyGuardScopeCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyGuardScopeRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/policy_guards/scopes/{policy_guard_scope_id}:
    get:
      tags:
      - Policy Guards (EAP)
      summary: Get Policy Guard Scope
      description: Get a Policy guard scope.
      operationId: get_policy_guard_scope
      security:
      - HTTPBearer: []
      parameters:
      - name: policy_guard_scope_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
          title: Policy Guard Scope Id
        description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
        example: my_policy_guard_scope
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyGuardScopeRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Policy Guards (EAP)
      summary: Delete Policy Guard Scope
      description: 'Delete a Policy guard scope.


        No environment of the organization stays guarded: an organization has at most one scope, so

        none is left to guard them.'
      operationId: delete_policy_guard_scope
      security:
      - HTTPBearer: []
      parameters:
      - name: policy_guard_scope_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
          title: Policy Guard Scope Id
        description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
        example: my_policy_guard_scope
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/policy_guards/scopes/{policy_guard_scope_id}/associate:
    post:
      tags:
      - Policy Guards (EAP)
      summary: Associate Policy Guard Scope
      description: associate a project to a Policy guard scope.
      operationId: associate_policy_guard_scope
      security:
      - HTTPBearer: []
      parameters:
      - name: policy_guard_scope_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
          title: Policy Guard Scope Id
        description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
        example: my_policy_guard_scope
      - name: wait
        in: query
        required: false
        schema:
          type: number
          description: Time in seconds to wait for the task to complete. Default is 0, means no wait.
          lte: 60
          default: 0
          title: Wait
        description: Time in seconds to wait for the task to complete. Default is 0, means no wait.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyGuardScopeAssociate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResult_PolicyGuardScopeRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/policy_guards/scopes/{policy_guard_scope_id}/disassociate:
    delete:
      tags:
      - Policy Guards (EAP)
      summary: Disassociate Policy Guard Scope
      description: Disassociate a project from a Policy guard scope.
      operationId: disassociate_policy_guard_scope
      security:
      - HTTPBearer: []
      parameters:
      - name: policy_guard_scope_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
          title: Policy Guard Scope Id
        description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
        example: my_policy_guard_scope
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyGuardScopeAssociate'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/policy_guards/scopes/{policy_guard_scope_id}/rules:
    post:
      tags:
      - Policy Guards (EAP)
      summary: Create Policy Guard Rule
      description: Create a policy guard rule.
      operationId: create_policy_guard_rule
      security:
      - HTTPBearer: []
      parameters:
      - name: policy_guard_scope_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
          title: Policy Guard Scope Id
        description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
        example: my_policy_guard_scope
      - name: wait
        in: query
        required: false
        schema:
          type: number
          description: Time in seconds to wait for the task to complete. Default is 0, means no wait.
          lte: 60
          default: 0
          title: Wait
        description: Time in seconds to wait for the task to complete. Default is 0, means no wait.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyGuardRuleCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResult_PolicyGuardScopeRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Policy Guards (EAP)
      summary: Delete Policy Guard Rule
      description: Remove a policy guard rule.
      operationId: delete_policy_guard_rule
      security:
      - HTTPBearer: []
      parameters:
      - name: policy_guard_scope_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
          title: Policy Guard Scope Id
        description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
        example: my_policy_guard_scope
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyGuardRuleItem'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Policy Guards (EAP)
      summary: List Policy Guard Rules
      description: List all rules for a Policy guard scope.
      operationId: list_policy_guard_rules
      security:
      - HTTPBearer: []
      parameters:
      - name: policy_guard_scope_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
          title: Policy Guard Scope Id
        description: 'Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").'
        example: my_policy_guard_scope
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number of the results to fetch, starting at 1.
          default: 1
          title: Page
        description: Page number of the results to fetch, starting at 1.
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: The number of results per page (max 100).
          default: 30
          title: Per Page
        description: The number of results per page (max 100).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PolicyGuardRuleRead'
                title: Response List Policy Guard Rules V2 Policy Guards Scopes  Policy Guard Scope Id  Rules Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PolicyGuardRuleRead:
      properties:
        is_allowed:
          type: boolean
          title: Is Allowed
          description: If True, the permission will be allowed for the role in the policy guard across all projectswithin the policy scope, and the permission will be locked from further editing.
        resource_key:
          type: string
          title: Resource Key
          description: The key of the resource.
        role_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Role Key
          description: The key of the role.
        action_key:
          type: string
          title: Action Key
          description: The key of the action.
        resource_set:
          anyOf:
          - $ref: '#/components/schemas/ConditionSet'
          - type: 'null'
          description: The resource set that the permission will be applied to.
        user_set:
          anyOf:
          - $ref: '#/components/schemas/ConditionSet'
          - type: 'null'
          description: The user set that the permission will be applied to.
        scope_id:
          type: string
          format: uuid
          title: Scope Id
          description: The unique identifier of the policy guard.
        organization_id:
          type: string
          format: uuid
          title: Organization Id
          description: Unique id of the organization that the ScopeConfig belongs to.
        id:
          type: string
          format: uuid
          title: Id
          description: Unique id of the ScopeConfig
      additionalProperties: false
      type: object
      required:
      - is_allowed
      - resource_key
      - action_key
      - scope_id
      - organization_id
      - id
      title: PolicyGuardRuleRead
      example:
        action_key: read
        id: c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f
        is_allowed: true
        org_id: c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f
        resource_key: document
        resource_set:
          attribute: document_country
          key: country_condition
          operator: equals
          value: US
        role_key: admin
        scope_id: c3b6f5d7-8b1e-4c6d-9e9f-hgk4f8e0c8f
        user_set:
          attribute: city
          key: city_condition
          operator: equals
          value: New York
    PolicyGuardRuleItem:
      properties:
        resource_key:
          type: string
          title: Resource Key
          description: The key of the resource.
        role_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Role Key
          description: The key of the role.
        action_key:
          type: string
          title: Action Key
          description: The key of the action.
        resource_set:
          anyOf:
          - $ref: '#/components/schemas/ConditionSet'
          - type: 'null'
          description: The resource set that the permission will be applied to.
        user_set:
          anyOf:
          - $ref: '#/components/schemas/ConditionSet'
          - type: 'null'
          description: The user set that the permission will be applied to.
      additionalProperties: false
      type: object
      required:
      - resource_key
      - action_key
      title: PolicyGuardRuleItem
      example:
        action_key: read
        resource_key: document
        role_key: admin
    PolicyGuardRuleCreate:
      properties:
        is_allowed:
          type: boolean
          title: Is Allowed
          description: If True, the permission will be allowed for the role in the policy guard across all projectswithin the policy scope, and the permission will be locked from further editing.
        resource_key:
          type: string
          title: Resource Key
          description: The key of the resource.
        role_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Role Key
          description: The key of the role.
        action_key:
          type: string
          title: Action Key
          description: The key of the action.
        resource_set:
          anyOf:
          - $ref: '#/components/schemas/ConditionSet'
          - type: 'null'
          description: The resource set that the permission will be applied to.
        user_set:
          anyOf:
          - $ref: '#/components/schemas/ConditionSet'
          - type: 'null'
          description: The user set that the permission will be applied to.
      additionalProperties: false
      type: object
      required:
      - is_allowed
      - resource_key
      - action_key
      title: PolicyGuardRuleCreate
      example:
        action_key: read
        is_allowed: true
        resource_key: document
        role_key: admin
    TaskResult_PolicyGuardScopeRead_:
      properties:
        task_id:
          type: string
          title: Task Id
          description: The unique id of the task.
        status:
          $ref: '#/components/schemas/TaskStatus'
          description: The status of the task.
        result:
          anyOf:
          - $ref: '#/components/schemas/PolicyGuardScopeRead'
          - type: 'null'
          description: The result of the task when the task finished.
        error:
          anyOf:
          - $ref: '#/components/schemas/ErrorDetails'
          - type: 'null'
          description: The error details when the task failed.
      additionalProperties: false
      type: object
      required:
      - task_id
      - status
      title: TaskResult[PolicyGuardScopeRead]
    PolicyGuardScopeDetail:
      properties:
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: Unique id of the project that the ScopeConfig belongs to.
      additionalProperties: false
      type: object
      required:
      - project_id
      title: PolicyGuardScopeDetail
    PolicyGuardScopeAssociate:
      properties:
        project_id:
          type: string
          title: Project Id
          description: The unique identifier of the project of this policy scope.
      additionalProperties: false
      type: object
      required:
      - project_id
      title: PolicyGuardScopeAssociate
    ConditionSet:
      properties:
        key:
          type: string
          title: Key
          description: The key of the condition set.
        attribute:
          type: string
          title: Attribute
          description: The attribute of the condition set.
        operator:
          type: string
          title: Operator
          description: The operator of the condition set.
        value:
          type: string
          title: Value
          description: The value of the condition set.
      additionalProperties: false
      type: object
      required:
      - key
      - attribute
      - operator
      - value
      title: ConditionSet
    PolicyGuardScopeRead:
      properties:
        key:
          type: string
          title: Key
          description: The unique key of the policy guard scope.
        id:
          type: string
          format: uuid
          title: Id
          description: Unique id of the ScopeConfig
        organization_id:
          type: string
          format: uuid
          title: Organization Id
          description: Unique id of the organization that the ScopeConfig belongs to.
        policy_guard_scope_details:
          anyOf:
          - items:
              $ref: '#/components/schemas/PolicyGuardScopeDetail'
            type: array
          - type: 'null'
          title: Policy Guard Scope Details
          description: list of projects that this policy guard is assigned to.
          default: []
      additionalProperties: false
      type: object
      required:
      - key
      - id
      - organization_id
      title: PolicyGuardScopeRead
      example:
        id: c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f
        key: policy_guard_acme
        org_id: c3b6f5d7-8b1e-4c6d-9e9f-8c9d6f8e0c8f
        policy_guard_scope_details:
        - project_id: c3b6f5d78b1e4c6d9e9f8c9d6f8e0c8f
    ErrorCode:
      type: string
      enum:
      - INVALID_INPUT
      - INVALID_JWKS_CONFIGURATION
      - UNEXPECTED_ERROR
      - NOT_FOUND
      - DUPLICATE_ENTITY
      - EMPTY_DECISION_LOGS
      - MISSING_REQUEST_ATTRIBUTE
      - FORBIDDEN_ACCESS
      - INVALID_PERMISSION_FORMAT
      - MISSING_PERMISSIONS
      - UNSUPPORTED_ATTRIBUTE_TYPE
      - MISSING_RESOURCE_ATTRIBUTE
      - MISMATCH_ATTRIBUTES_TYPES
      - INVALID_POLICY_REPO_STATUS
      - INVALID_SMTP_CONFIGURATION
      - MISMATCH_RESOURCE_INSTANCES_TENANTS
      - PAGINATION_SIZE_OVERREACHED
      - MISMATCH_RELATION_TYPE
      - CONCURRENT_OPERATION_DISALLOWED
      - UNAUTHORIZED
      - CONDITION_SET_OVER_DEPTH
      - POLICY_GUARD_PROTECTED
      - KEY_SCOPE
      - NOT_PROVISIONED
      title: ErrorCode
    ErrorDetails:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        support_link:
          anyOf:
          - type: string
            maxLength: 65536
            minLength: 1
            format: uri
          - type: 'null'
          title: Support Link
        error_code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
          default: ''
        additional_info:
          title: Additional Info
      type: object
      required:
      - id
      - title
      - error_code
      title: ErrorDetails
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    TaskStatus:
      type: string
      enum:
      - processing
      - success
      - failure
      - cancelled
      title: TaskStatus
    PolicyGuardScopeDetailCreate:
      properties:
        project_id:
          type: string
          title: Project Id
          description: The unique identifier of the project of this policy scope.
      additionalProperties: false
      type: object
      required:
      - project_id
      title: PolicyGuardScopeDetailCreate
    PolicyGuardScopeCreate:
      properties:
        policy_guard_scope_details:
          anyOf:
          - items:
              $ref: '#/components/schemas/PolicyGuardScopeDetailCreate'
            type: array
          - type: 'null'
          title: Policy Guard Scope Details
          description: list of projects that this policy guard is assigned to.
          default: []
        key:
          type: string
          title: Key
          description: The unique key of the policy guard scope.
      additionalProperties: false
      type: object
      required:
      - key
      title: PolicyGuardScopeCreate
      example:
        key: policy_guard_acme
        policy_guard_scope_details:
        - project_id: c3b6f5d78b1e4c6d9e9f8c9d6f8e0c8f
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: 'Authorization header, we support the bearer authentication scheme (see: RFC 6750)'
      scheme: bearer
      bearerFormat: JWT