Skip to main content
GET
/
guardrails
/
{guardrailId}
Get a specific guardrail
curl --request GET \
  --url https://api.portkey.ai/v1/guardrails/{guardrailId} \
  --header 'x-portkey-api-key: <api-key>'
{
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "active",
  "created_at": "2023-11-07T05:31:56Z",
  "last_updated_at": "2023-11-07T05:31:56Z",
  "owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "checks": [
    {
      "id": "default.jwt",
      "parameters": "<any>",
      "name": "<string>",
      "is_enabled": true
    }
  ],
  "actions": {
    "deny": false,
    "async": false,
    "on_success": {
      "feedback": {
        "value": 5,
        "weight": 1,
        "metadata": ""
      }
    },
    "on_fail": {
      "feedback": {
        "value": -5,
        "weight": 1,
        "metadata": ""
      }
    }
  }
}

Authorizations

x-portkey-api-key
string
header
required

Path Parameters

guardrailId
string
required

Guardrail UUID or slug (with guard_ prefix)

Response

Guardrail details retrieved successfully

id
string
required

Unique identifier of the guardrail

name
string
required

Name of the guardrail

slug
string
required

URL-friendly slug

created_at
string<date-time>
required

Creation timestamp

last_updated_at
string<date-time>
required

Last update timestamp

owner_id
string<uuid>
required

UUID of the user who created the guardrail

organisation_id
string<uuid>

Organisation UUID

workspace_id
string<uuid> | null

Workspace UUID (null for organisation-level guardrails)

status
enum<string>

Current status of the guardrail

Available options:
active,
archived
updated_by
string<uuid> | null

UUID of the user who last updated the guardrail

checks
object[]

Array of configured guardrail checks

actions
object

Actions to take when guardrail checks fail or pass

I