naftiko: 1.0.0-alpha2 info: label: Permit.io API — Organizations description: 'Permit.io API — Organizations. 7 operations. Lead operation: List Organizations. Self-contained Naftiko capability covering one Permit Io business surface.' tags: - Permit Io - Organizations created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PERMIT_IO_API_KEY: PERMIT_IO_API_KEY capability: consumes: - type: http namespace: permit-io-organizations baseUri: '' description: Permit.io API — Organizations business capability. Self-contained, no shared references. resources: - name: v2-orgs path: /v2/orgs operations: - name: listorganizations method: GET description: List Organizations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: search in: query type: string description: Text search for the org name or key or id - name: page in: query type: integer description: Page number of the results to fetch, starting at 1. - name: per_page in: query type: integer description: The number of results per page (max 100). - name: createorganization method: POST description: Create Organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: page_full_url in: cookie type: string - name: body in: body type: object description: Request body (JSON). required: true - name: v2-orgs-active-org path: /v2/orgs/active/org operations: - name: getactiveorganization method: GET description: Get Active Organization outputRawFormat: json outputParameters: - name: result type: object value: $. - name: v2-orgs-org_id path: /v2/orgs/{org_id} operations: - name: getorganization method: GET description: Get Organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: 'Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug").' required: true - name: deleteorganization method: DELETE description: Delete Organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: 'Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug").' required: true - name: updateorganization method: PATCH description: Update Organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: 'Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug").' required: true - name: body in: body type: object description: Request body (JSON). required: true - name: v2-orgs-org_id-stats path: /v2/orgs/{org_id}/stats operations: - name: statsorganization method: GET description: Stats Organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: org_id in: path type: string description: 'Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the "slug").' required: true authentication: type: bearer token: '{{env.PERMIT_IO_API_KEY}}' exposes: - type: rest namespace: permit-io-organizations-rest port: 8080 description: REST adapter for Permit.io API — Organizations. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v2/orgs name: v2-orgs description: REST surface for v2-orgs. operations: - method: GET name: listorganizations description: List Organizations call: permit-io-organizations.listorganizations with: search: rest.search page: rest.page per_page: rest.per_page outputParameters: - type: object mapping: $. - method: POST name: createorganization description: Create Organization call: permit-io-organizations.createorganization with: page_full_url: rest.page_full_url body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v2/orgs/active/org name: v2-orgs-active-org description: REST surface for v2-orgs-active-org. operations: - method: GET name: getactiveorganization description: Get Active Organization call: permit-io-organizations.getactiveorganization outputParameters: - type: object mapping: $. - path: /v1/v2/orgs/{org-id} name: v2-orgs-org-id description: REST surface for v2-orgs-org_id. operations: - method: GET name: getorganization description: Get Organization call: permit-io-organizations.getorganization with: org_id: rest.org_id outputParameters: - type: object mapping: $. - method: DELETE name: deleteorganization description: Delete Organization call: permit-io-organizations.deleteorganization with: org_id: rest.org_id outputParameters: - type: object mapping: $. - method: PATCH name: updateorganization description: Update Organization call: permit-io-organizations.updateorganization with: org_id: rest.org_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v2/orgs/{org-id}/stats name: v2-orgs-org-id-stats description: REST surface for v2-orgs-org_id-stats. operations: - method: GET name: statsorganization description: Stats Organization call: permit-io-organizations.statsorganization with: org_id: rest.org_id outputParameters: - type: object mapping: $. - type: mcp namespace: permit-io-organizations-mcp port: 9090 transport: http description: MCP adapter for Permit.io API — Organizations. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-organizations description: List Organizations hints: readOnly: true destructive: false idempotent: true call: permit-io-organizations.listorganizations with: search: tools.search page: tools.page per_page: tools.per_page outputParameters: - type: object mapping: $. - name: create-organization description: Create Organization hints: readOnly: false destructive: false idempotent: false call: permit-io-organizations.createorganization with: page_full_url: tools.page_full_url body: tools.body outputParameters: - type: object mapping: $. - name: get-active-organization description: Get Active Organization hints: readOnly: true destructive: false idempotent: true call: permit-io-organizations.getactiveorganization outputParameters: - type: object mapping: $. - name: get-organization description: Get Organization hints: readOnly: true destructive: false idempotent: true call: permit-io-organizations.getorganization with: org_id: tools.org_id outputParameters: - type: object mapping: $. - name: delete-organization description: Delete Organization hints: readOnly: false destructive: true idempotent: true call: permit-io-organizations.deleteorganization with: org_id: tools.org_id outputParameters: - type: object mapping: $. - name: update-organization description: Update Organization hints: readOnly: false destructive: false idempotent: true call: permit-io-organizations.updateorganization with: org_id: tools.org_id body: tools.body outputParameters: - type: object mapping: $. - name: stats-organization description: Stats Organization hints: readOnly: true destructive: false idempotent: true call: permit-io-organizations.statsorganization with: org_id: tools.org_id outputParameters: - type: object mapping: $.