Permit Elements API overview
Call the Permit Elements APIs from your backend to run approval workflows without the embedded UI. This section is for developers who build their own interface on top of Permit Elements, the embeddable UI components for user management, access requests, and approvals. Most element API calls take the ID of an element configuration, so start by listing the elements in your environment.
Prerequisites
- An environment API key. See Get your API key.
- The ID or key of your project and environment. See Get the project and environment IDs.
- At least one element created in the Permit dashboard. See Embed Permit Elements.
List the elements in an environment
Send a GET request to /v2/elements/{proj_id}/{env_id}/config. Replace <project_id>, <env_id>, and <API secret key> with your project ID or key, environment ID or key, and API key.
curl 'https://api.permit.io/v2/elements/<project_id>/<env_id>/config' \
-H 'authorization: Bearer <API secret key>' \
-H 'origin: https://app.permit.io'
The response lists each element configuration in the environment. Each item includes these fields:
| Field | Description |
|---|---|
id | Unique ID of the element configuration. Use it as elements_config_id in the other element API calls. |
key | URL-friendly key of the element configuration. The API also accepts the key in place of the ID. |
name | The element name shown in the dashboard. |
elements_type | The element type: user_management, audit_log, approval_flow, operation_approval, or approval_management. |
is_active | Whether the element is active. |
The endpoint accepts the page and per_page query parameters (default 30, maximum 100 per page).
Element API pages
| Page | Use it to |
|---|---|
| Operation Approval API | Create, review, approve, deny, and cancel operation approvals as a signed-in element user. |
| Access Request API | Create, review, approve, deny, and cancel access requests as a signed-in element user. |
| Access Request API with an API key | Run the same access request operations from a backend with your API key, without an element user session. |
For every element endpoint and schema, see Elements Configs in the API reference.