Skip to main content
GET
/
guardrails
/
list-guardrails
List Guardrails
curl --request GET \
  --url https://api.enkryptai.com/guardrails/list-guardrails \
  --header 'apikey: <api-key>'
{
  "guardrails": [
    {
      "policy_id": "1234567890",
      "name": "My Guardrail",
      "description": "Guardrail for production chatbot",
      "created_at": "2025-03-01T09:28:52.651201+00:00",
      "updated_at": "2025-03-01T09:28:52.651201+00:00",
      "project_name": "default",
      "is_sample": false
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total_count": 25,
    "total_pages": 3,
    "has_next": true,
    "has_previous": false
  }
}

List Guardrails

Retrieve a paginated list of all guardrails in your account.

Query Parameters

ParameterTypeRequiredDefaultDescription
pageintegerNo1Page number (must be >= 1)
per_pageintegerNo10Number of items per page (must be between 1 and 100)

Example Request

curl -X GET "https://api.enkryptai.com/guardrails/list-guardrails?page=1&per_page=10" \
  -H "apikey: YOUR_API_KEY"

Example Response

{
  "guardrails": [
    {
      "policy_id": "1234567890",
      "name": "My Guardrail",
      "description": "Input/output guardrail for production",
      "created_at": "2025-02-21T09:28:52.651201+00:00",
      "updated_at": "2025-02-21T09:28:52.651201+00:00",
      "project_name": "default"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total_count": 25,
    "total_pages": 3,
    "has_next": true,
    "has_previous": false
  }
}

Pagination

The response includes pagination metadata to help you navigate through the results:
  • page: Current page number
  • per_page: Number of items per page
  • total_count: Total number of items across all pages
  • total_pages: Total number of pages
  • has_next: Boolean indicating if there’s a next page
  • has_previous: Boolean indicating if there’s a previous page
To get the next page, increment the page parameter:
GET /guardrails/list-guardrails?page=2&per_page=10

Authorizations

apikey
string
header
required

Query Parameters

page
integer
default:1

Page number (must be >= 1)

Required range: x >= 1
Example:

1

per_page
integer
default:10

Number of items per page (must be between 1 and 100)

Required range: 1 <= x <= 100
Example:

10

Response

Successful Response

guardrails
Guardrail Β· object[]
pagination
Pagination Β· object