Permit.io · Capability
Permit.io API — Tenants
Permit.io API — Tenants. 8 operations. Lead operation: List Tenants. Self-contained Naftiko capability covering one Permit Io business surface.
What You Can Do
GET
Listtenants
— List Tenants
/v1/v2/facts/{proj-id}/{env-id}/tenants
POST
Createtenant
— Create Tenant
/v1/v2/facts/{proj-id}/{env-id}/tenants
GET
Gettenant
— Get Tenant
/v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}
DELETE
Deletetenant
— Delete Tenant
/v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}
PATCH
Updatetenant
— Update Tenant
/v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}
GET
Listtenantusers
— List Tenant Users
/v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}/users
POST
Addusertotenant
— Add User To Tenant
/v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}/users
DELETE
Deletetenantuser
— Delete Tenant User
/v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}/users/{user-id}
MCP Tools
list-tenants
List Tenants
read-only
idempotent
create-tenant
Create Tenant
get-tenant
Get Tenant
read-only
idempotent
delete-tenant
Delete Tenant
idempotent
update-tenant
Update Tenant
idempotent
list-tenant-users
List Tenant Users
read-only
idempotent
add-user-tenant
Add User To Tenant
delete-tenant-user
Delete Tenant User
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Permit.io API — Tenants
description: 'Permit.io API — Tenants. 8 operations. Lead operation: List Tenants. Self-contained Naftiko capability covering
one Permit Io business surface.'
tags:
- Permit Io
- Tenants
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-tenants
baseUri: ''
description: Permit.io API — Tenants business capability. Self-contained, no shared references.
resources:
- name: v2-facts-proj_id-env_id-tenants
path: /v2/facts/{proj_id}/{env_id}/tenants
operations:
- name: listtenants
method: GET
description: List Tenants
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
- name: search
in: query
type: string
description: Text search for the tenant name or key
- name: include_total_count
in: query
type: boolean
description: Include total count in response
- 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: createtenant
method: POST
description: Create Tenant
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: v2-facts-proj_id-env_id-tenants-tenant_id
path: /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}
operations:
- name: gettenant
method: GET
description: Get Tenant
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: tenant_id
in: path
type: string
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
- name: deletetenant
method: DELETE
description: Delete Tenant
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: tenant_id
in: path
type: string
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
- name: updatetenant
method: PATCH
description: Update Tenant
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: tenant_id
in: path
type: string
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: v2-facts-proj_id-env_id-tenants-tenant_id-users
path: /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users
operations:
- name: listtenantusers
method: GET
description: List Tenant Users
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: tenant_id
in: path
type: string
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
- name: search
in: query
type: string
description: Text search for the email field
- name: role
in: query
type: string
description: Match users with a specific role
- name: include_resource_instance_roles
in: query
type: boolean
description: Should add resource instance roles
- 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: addusertotenant
method: POST
description: Add User To Tenant
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: tenant_id
in: path
type: string
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: v2-facts-proj_id-env_id-tenants-tenant_id-users-user_id
path: /v2/facts/{proj_id}/{env_id}/tenants/{tenant_id}/users/{user_id}
operations:
- name: deletetenantuser
method: DELETE
description: Delete Tenant User
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: tenant_id
in: path
type: string
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
- name: user_id
in: path
type: string
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
- name: proj_id
in: path
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
- name: env_id
in: path
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
authentication:
type: bearer
token: '{{env.PERMIT_IO_API_KEY}}'
exposes:
- type: rest
namespace: permit-io-tenants-rest
port: 8080
description: REST adapter for Permit.io API — Tenants. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/v2/facts/{proj-id}/{env-id}/tenants
name: v2-facts-proj-id-env-id-tenants
description: REST surface for v2-facts-proj_id-env_id-tenants.
operations:
- method: GET
name: listtenants
description: List Tenants
call: permit-io-tenants.listtenants
with:
proj_id: rest.proj_id
env_id: rest.env_id
search: rest.search
include_total_count: rest.include_total_count
page: rest.page
per_page: rest.per_page
outputParameters:
- type: object
mapping: $.
- method: POST
name: createtenant
description: Create Tenant
call: permit-io-tenants.createtenant
with:
proj_id: rest.proj_id
env_id: rest.env_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}
name: v2-facts-proj-id-env-id-tenants-tenant-id
description: REST surface for v2-facts-proj_id-env_id-tenants-tenant_id.
operations:
- method: GET
name: gettenant
description: Get Tenant
call: permit-io-tenants.gettenant
with:
tenant_id: rest.tenant_id
proj_id: rest.proj_id
env_id: rest.env_id
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: deletetenant
description: Delete Tenant
call: permit-io-tenants.deletetenant
with:
tenant_id: rest.tenant_id
proj_id: rest.proj_id
env_id: rest.env_id
outputParameters:
- type: object
mapping: $.
- method: PATCH
name: updatetenant
description: Update Tenant
call: permit-io-tenants.updatetenant
with:
tenant_id: rest.tenant_id
proj_id: rest.proj_id
env_id: rest.env_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}/users
name: v2-facts-proj-id-env-id-tenants-tenant-id-users
description: REST surface for v2-facts-proj_id-env_id-tenants-tenant_id-users.
operations:
- method: GET
name: listtenantusers
description: List Tenant Users
call: permit-io-tenants.listtenantusers
with:
tenant_id: rest.tenant_id
proj_id: rest.proj_id
env_id: rest.env_id
search: rest.search
role: rest.role
include_resource_instance_roles: rest.include_resource_instance_roles
page: rest.page
per_page: rest.per_page
outputParameters:
- type: object
mapping: $.
- method: POST
name: addusertotenant
description: Add User To Tenant
call: permit-io-tenants.addusertotenant
with:
tenant_id: rest.tenant_id
proj_id: rest.proj_id
env_id: rest.env_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/v2/facts/{proj-id}/{env-id}/tenants/{tenant-id}/users/{user-id}
name: v2-facts-proj-id-env-id-tenants-tenant-id-users-user-id
description: REST surface for v2-facts-proj_id-env_id-tenants-tenant_id-users-user_id.
operations:
- method: DELETE
name: deletetenantuser
description: Delete Tenant User
call: permit-io-tenants.deletetenantuser
with:
tenant_id: rest.tenant_id
user_id: rest.user_id
proj_id: rest.proj_id
env_id: rest.env_id
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: permit-io-tenants-mcp
port: 9090
transport: http
description: MCP adapter for Permit.io API — Tenants. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: list-tenants
description: List Tenants
hints:
readOnly: true
destructive: false
idempotent: true
call: permit-io-tenants.listtenants
with:
proj_id: tools.proj_id
env_id: tools.env_id
search: tools.search
include_total_count: tools.include_total_count
page: tools.page
per_page: tools.per_page
outputParameters:
- type: object
mapping: $.
- name: create-tenant
description: Create Tenant
hints:
readOnly: false
destructive: false
idempotent: false
call: permit-io-tenants.createtenant
with:
proj_id: tools.proj_id
env_id: tools.env_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: get-tenant
description: Get Tenant
hints:
readOnly: true
destructive: false
idempotent: true
call: permit-io-tenants.gettenant
with:
tenant_id: tools.tenant_id
proj_id: tools.proj_id
env_id: tools.env_id
outputParameters:
- type: object
mapping: $.
- name: delete-tenant
description: Delete Tenant
hints:
readOnly: false
destructive: true
idempotent: true
call: permit-io-tenants.deletetenant
with:
tenant_id: tools.tenant_id
proj_id: tools.proj_id
env_id: tools.env_id
outputParameters:
- type: object
mapping: $.
- name: update-tenant
description: Update Tenant
hints:
readOnly: false
destructive: false
idempotent: true
call: permit-io-tenants.updatetenant
with:
tenant_id: tools.tenant_id
proj_id: tools.proj_id
env_id: tools.env_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: list-tenant-users
description: List Tenant Users
hints:
readOnly: true
destructive: false
idempotent: true
call: permit-io-tenants.listtenantusers
with:
tenant_id: tools.tenant_id
proj_id: tools.proj_id
env_id: tools.env_id
search: tools.search
role: tools.role
include_resource_instance_roles: tools.include_resource_instance_roles
page: tools.page
per_page: tools.per_page
outputParameters:
- type: object
mapping: $.
- name: add-user-tenant
description: Add User To Tenant
hints:
readOnly: false
destructive: false
idempotent: false
call: permit-io-tenants.addusertotenant
with:
tenant_id: tools.tenant_id
proj_id: tools.proj_id
env_id: tools.env_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: delete-tenant-user
description: Delete Tenant User
hints:
readOnly: false
destructive: true
idempotent: true
call: permit-io-tenants.deletetenantuser
with:
tenant_id: tools.tenant_id
user_id: tools.user_id
proj_id: tools.proj_id
env_id: tools.env_id
outputParameters:
- type: object
mapping: $.