Permit.io Proxy Config API

Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ.

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 5

GET /v2/facts/{proj_id}/{env_id}/proxy_configs List Proxy Configs #
POST /v2/facts/{proj_id}/{env_id}/proxy_configs Create Proxy Config #
GET /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id} Get Proxy Config #
PATCH /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id} Update Proxy Config #
DELETE /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id} Delete Proxy Config #

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-proxy-config-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-proxy-config-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Permit.io Proxy Config API
  description: Authorization as a service
  version: 2.0.0
tags:
- name: Proxy Config
  description: Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ.
paths:
  /v2/facts/{proj_id}/{env_id}/proxy_configs:
    get:
      tags:
      - Proxy Config
      summary: List Proxy Configs
      description: Lists all the proxy configs defined within an environment.
      operationId: list_proxy_configs
      security:
      - HTTPBearer: []
      parameters:
      - name: proj_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
          title: Proj Id
        description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
      - name: env_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          title: Env Id
        description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
      - 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/ProxyConfigRead'
                title: Response List Proxy Configs V2 Facts  Proj Id   Env Id  Proxy Configs Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Proxy Config
      summary: Create Proxy Config
      description: 'Creates a new proxy config inside the Permit.io system.


        A proxy config key that already exists in the environment answers 409.'
      operationId: create_proxy_config
      security:
      - HTTPBearer: []
      parameters:
      - name: proj_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
          title: Proj Id
        description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
      - name: env_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          title: Env Id
        description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProxyConfigCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProxyConfigRead'
        '403':
          description: 'Nothing is written. The caller may not change the environment''s proxy configs, or the environment is protected by a policy guard: then this route refuses every caller allowed to change them, with error code `POLICY_GUARD_PROTECTED`, until an organization admin removes its project from the policy guard scope (an organization with no scope clears the flag by creating one and deleting it). Every proxy config write on a guarded environment, a secret rotation included, needs that'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/facts/{proj_id}/{env_id}/proxy_configs/{proxy_config_id}:
    get:
      tags:
      - Proxy Config
      summary: Get Proxy Config
      description: Gets a proxy config, if such proxy config exists. Otherwise returns 404.
      operationId: get_proxy_config
      security:
      - HTTPBearer: []
      parameters:
      - name: proxy_config_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the "slug").'
          title: Proxy Config Id
        description: 'Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the "slug").'
      - name: proj_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
          title: Proj Id
        description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
      - name: env_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          title: Env Id
        description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProxyConfigRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Proxy Config
      summary: Update Proxy Config
      description: 'Partially updates the proxy config definition.

        Fields that will be provided will be completely overwritten.'
      operationId: update_proxy_config
      security:
      - HTTPBearer: []
      parameters:
      - name: proxy_config_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the "slug").'
          title: Proxy Config Id
        description: 'Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the "slug").'
      - name: proj_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
          title: Proj Id
        description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
      - name: env_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          title: Env Id
        description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProxyConfigUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProxyConfigRead'
        '403':
          description: 'Nothing is written. The caller may not change the environment''s proxy configs, or the environment is protected by a policy guard: then this route refuses every caller allowed to change them, with error code `POLICY_GUARD_PROTECTED`, until an organization admin removes its project from the policy guard scope (an organization with no scope clears the flag by creating one and deleting it). Every proxy config write on a guarded environment, a secret rotation included, needs that'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Proxy Config
      summary: Delete Proxy Config
      description: Deletes the proxy config and all its related data.
      operationId: delete_proxy_config
      security:
      - HTTPBearer: []
      parameters:
      - name: proxy_config_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the "slug").'
          title: Proxy Config Id
        description: 'Either the unique id of the proxy config, or the URL-friendly key of the proxy config (i.e: the "slug").'
      - name: proj_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
          title: Proj Id
        description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
        example: my_project
      - name: env_id
        in: path
        required: true
        schema:
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          title: Env Id
        description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
        example: my_environment
      responses:
        '204':
          description: Successful Response
        '403':
          description: 'Nothing is written. The caller may not change the environment''s proxy configs, or the environment is protected by a policy guard: then this route refuses every caller allowed to change them, with error code `POLICY_GUARD_PROTECTED`, until an organization admin removes its project from the policy guard scope (an organization with no scope clears the flag by creating one and deleting it). Every proxy config write on a guarded environment, a secret rotation included, needs that'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AuthMechanism:
      type: string
      enum:
      - Bearer
      - Basic
      - Headers
      title: AuthMechanism
    MappingRuleUpdate:
      properties:
        url:
          type: string
          title: Url
          description: The URL to match against the request URL
        url_type:
          anyOf:
          - type: string
            enum:
            - regex
          - type: 'null'
          title: Url Type
          description: The URL type to match against the request URL can be, 'regex' or none
        http_method:
          $ref: '#/components/schemas/Methods'
          description: The HTTP method to match against the request method
        resource:
          type: string
          pattern: ^[A-Za-z0-9\-_]+$
          title: Resource
          description: The resource to match against the request resource
        headers:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Headers
          description: The headers to match against the request headers
          default: {}
        action:
          anyOf:
          - type: string
          - type: 'null'
          title: Action
          description: The action to match against the request action
        priority:
          anyOf:
          - type: integer
          - type: 'null'
          title: Priority
          description: The priority of the mapping rule. The higher the priority, the higher the precedence
        should_delete:
          type: boolean
          title: Should Delete
          description: If true, this mapping rule will be deleted during update.
          default: false
      additionalProperties: false
      type: object
      required:
      - url
      - http_method
      - resource
      title: MappingRuleUpdate
    Methods:
      type: string
      enum:
      - get
      - post
      - put
      - patch
      - delete
      - head
      - options
      title: Methods
    ProxyConfigUpdate:
      properties:
        secret:
          anyOf:
          - additionalProperties:
              type: string
            type: object
            title: HeadersAuth
            description: HeadersAuth is a dictionary of headers to be sent with the request.
          - type: string
            pattern: ^.+:.+$
            title: BasicAuth
            description: BasicAuth is a string of the form 'username:password'.
          - type: string
            minLength: 1
            title: BearerAuth
            description: BearerAuth is a string of the token to be sent with the request.
          - type: 'null'
          title: Secret
          description: Proxy config secret is set to enable the Permit Proxy to make proxied requests to the backend service.
        name:
          type: string
          title: Name
          description: 'The name of the proxy config, for example: ''Stripe API'''
        mapping_rules:
          items:
            $ref: '#/components/schemas/MappingRuleUpdate'
          type: array
          title: Mapping Rules
          description: Proxy config mapping rules, with optional should_delete flag to indicate deletion.
          default: []
        auth_mechanism:
          anyOf:
          - $ref: '#/components/schemas/AuthMechanism'
          - type: 'null'
          description: 'Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request.


            Bearer injects the secret into the Authorization header as a Bearer token,


            Basic injects the secret into the Authorization header as a Basic user:password,


            Headers injects plain headers into the request.'
          default: Bearer
      additionalProperties: false
      type: object
      title: ProxyConfigUpdate
      example:
        mapping_rules:
        - action: create
          headers:
            required_header: strict
          http_method: post
          resource: customers
          should_delete: true
          url: https://api.stripe.com/v1/customers
        - action: read
          headers:
            required_header: strict
          http_method: get
          resource: invoices
          should_delete: false
          url: https://api.stripe.com/v1/invoices
    ProxyConfigRead:
      properties:
        key:
          type: string
          title: Key
          description: Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ.
        id:
          type: string
          format: uuid
          title: Id
          description: Unique id of the proxy config
        organization_id:
          type: string
          format: uuid
          title: Organization Id
          description: Unique id of the organization that the proxy config belongs to.
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: Unique id of the project that the proxy config belongs to.
        environment_id:
          type: string
          format: uuid
          title: Environment Id
          description: Unique id of the environment that the proxy config belongs to.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Date and time when the proxy config was created (ISO_8601 format).
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Date and time when the proxy config was last updated/modified (ISO_8601 format).
        secret:
          anyOf:
          - additionalProperties:
              type: string
            type: object
            title: HeadersAuth
            description: HeadersAuth is a dictionary of headers to be sent with the request.
          - type: string
            pattern: ^.+:.+$
            title: BasicAuth
            description: BasicAuth is a string of the form 'username:password'.
          - type: string
            minLength: 1
            title: BearerAuth
            description: BearerAuth is a string of the token to be sent with the request.
          - type: 'null'
          title: Secret
          description: Proxy config secret is set to enable the Permit Proxy to make proxied requests to the backend service.
        name:
          type: string
          title: Name
          description: 'The name of the proxy config, for example: ''Stripe API'''
        mapping_rules:
          items:
            $ref: '#/components/schemas/MappingRule'
          type: array
          title: Mapping Rules
          description: Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method.
          default: []
        auth_mechanism:
          anyOf:
          - $ref: '#/components/schemas/AuthMechanism'
          - type: 'null'
          description: 'Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request.


            Bearer injects the secret into the Authorization header as a Bearer token,


            Basic injects the secret into the Authorization header as a Basic user:password,


            Headers injects plain headers into the request.'
          default: Bearer
      additionalProperties: false
      type: object
      required:
      - key
      - id
      - organization_id
      - project_id
      - environment_id
      - created_at
      - updated_at
      - secret
      - name
      title: ProxyConfigRead
      example:
        created_at: '2019-08-24T14:15:22Z'
        environment_id: 40ef0e48-a11f-4963-a229-e396c9f7e7c4
        id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
        key: stripe
        mapping_rules:
        - action: create
          headers:
            required_header: strict
          http_method: post
          resource: customers
          url: https://api.stripe.com/v1/customers
        name: Stripe API
        organization_id: 7c60d51f-b44e-4682-87d6-449835ea4de6
        project_id: 405d8375-3514-403b-8c43-83ae74cfe0e9
        updated_at: '2019-08-24T14:15:22Z'
    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
    MappingRule:
      properties:
        url:
          type: string
          title: Url
          description: The URL to match against the request URL
        url_type:
          anyOf:
          - type: string
            enum:
            - regex
          - type: 'null'
          title: Url Type
          description: The URL type to match against the request URL can be, 'regex' or none
        http_method:
          $ref: '#/components/schemas/Methods'
          description: The HTTP method to match against the request method
        resource:
          type: string
          pattern: ^[A-Za-z0-9\-_]+$
          title: Resource
          description: The resource to match against the request resource
        headers:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Headers
          description: The headers to match against the request headers
          default: {}
        action:
          anyOf:
          - type: string
          - type: 'null'
          title: Action
          description: The action to match against the request action
        priority:
          anyOf:
          - type: integer
          - type: 'null'
          title: Priority
          description: The priority of the mapping rule. The higher the priority, the higher the precedence
      additionalProperties: false
      type: object
      required:
      - url
      - http_method
      - resource
      title: MappingRule
    ProxyConfigCreate:
      properties:
        secret:
          anyOf:
          - additionalProperties:
              type: string
            type: object
            title: HeadersAuth
            description: HeadersAuth is a dictionary of headers to be sent with the request.
          - type: string
            pattern: ^.+:.+$
            title: BasicAuth
            description: BasicAuth is a string of the form 'username:password'.
          - type: string
            minLength: 1
            title: BearerAuth
            description: BearerAuth is a string of the token to be sent with the request.
          - type: 'null'
          title: Secret
          description: Proxy config secret is set to enable the Permit Proxy to make proxied requests to the backend service.
        key:
          type: string
          pattern: ^[A-Za-z0-9\-_]+$
          title: Key
          description: Proxy Config is set to enable the Permit Proxy to make proxied requests as part of the Frontend AuthZ.
        name:
          type: string
          title: Name
          description: 'The name of the proxy config, for example: ''Stripe API'''
        mapping_rules:
          items:
            $ref: '#/components/schemas/MappingRule'
          type: array
          title: Mapping Rules
          description: Proxy config mapping rules will include the rules that will be used to map the request to the backend service by a URL and a http method.
          default: []
        auth_mechanism:
          anyOf:
          - $ref: '#/components/schemas/AuthMechanism'
          - type: 'null'
          description: 'Proxy config auth mechanism will define the authentication mechanism that will be used to authenticate the request.


            Bearer injects the secret into the Authorization header as a Bearer token,


            Basic injects the secret into the Authorization header as a Basic user:password,


            Headers injects plain headers into the request.'
          default: Bearer
      additionalProperties: false
      type: object
      required:
      - secret
      - key
      - name
      title: ProxyConfigCreate
      example:
        key: stripe
        mapping_rules:
        - action: create
          headers:
            required_header: strict
          http_method: post
          resource: customers
          url: https://api.stripe.com/v1/customers
        name: Stripe API
        secret: access_token_xxxxxx
    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