Guardrails
Guardrails are safety and compliance checks that evaluate data flowing through integrations — detecting PII, moderating content, or applying custom AI-powered rules.
Guardrails are import resources with adaptorType: GuardrailImport. All CRUD operations use the /v1/imports endpoints. The guardrail object holds the type-specific configuration.
Guardrail schema
Returns all imports in the account, not just guardrails. Filter client-side by adaptorType: "GuardrailImport" to isolate guardrails.
Comma-separated list of fields to project into each returned record.
Triggers summary projection: the response contains a minimal identity
set (_id, name, plus resource-specific fields) with the requested
fields added on top. Supports dot notation for nested fields.
Mutually exclusive with exclude.
_integrationId,disabled,lastModifiedComma-separated list of fields to strip from the default response.
Unlike include, does not trigger summary projection — returns the
full record with the named fields removed. Protected identity fields
(e.g. name) cannot be stripped. Mutually exclusive with include.
createdAt,lastModifiedSuccessfully retrieved list of imports
No imports exist in the account
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
GET /v1/imports HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"_id": "69eb9f5078dbae2f1bb05f89",
"createdAt": "2026-04-24T16:50:24.073Z",
"lastModified": "2026-05-02T15:46:24.249Z",
"name": "PII Scanner",
"apiIdentifier": "i39ee734f7",
"sandbox": false,
"lookups": [],
"adaptorType": "GuardrailImport",
"guardrail": {
"type": "pii",
"confidenceThreshold": 0.7,
"pii": {
"entities": [
"email_address",
"phone_number",
"us_social_security_number"
],
"mask": true
}
}
},
{
"_id": "69eb9f666fbf339ed3bc66c3",
"createdAt": "2026-04-24T16:50:46.439Z",
"lastModified": "2026-04-24T16:50:53.525Z",
"name": "Content Moderator",
"_connectionId": "68ae48d6b5f755d2dd38c294",
"apiIdentifier": "i6a7acf995",
"sandbox": false,
"lookups": [],
"adaptorType": "GuardrailImport",
"guardrail": {
"type": "moderation",
"confidenceThreshold": 0.7,
"moderation": {
"categories": [
"hate",
"violence",
"harassment"
]
}
}
}
]Creates a new guardrail import. _connectionId is only needed for BYOK ai_agent guardrails.
Configuration for a guardrail import. _connectionId is only
required for BYOK ai_agent guardrails.
Display name for the guardrail.
PII ScannerOptional description of the guardrail's purpose.
Scans records for PII and masks detected values before import.Connection for BYOK (bring your own key). Only needed for ai_agent type guardrails. Optional — platform-managed credentials are used when omitted.
68ae48d6b5f755d2dd38c294Must be GuardrailImport.
GuardrailImportPossible values: Controls the shape of the input passed to the guardrail's
processing pipeline, exactly as on other imports. The UI writes
record explicitly on new guardrails; when the field is absent
the platform behaves as record.
recordPossible values: Guardrail created successfully
Guardrail import object as returned by the API.
Unique identifier for the resource. Format is a 24-character hexadecimal string.
5f8d43a1b9e5a80011a35f2cTimestamp when the resource was created. Set automatically and cannot be modified.
2023-04-01T09:15:32ZTimestamp when the resource was last updated. Changes whenever any property is modified.
2023-04-15T14:30:15ZTimestamp when the resource was soft-deleted. When null or absent, the resource is active.
2023-05-20T11:45:32ZReference to the specific integration instance that contains this resource.
This field is only populated for resources that are part of an integration app installation. It contains the unique identifier (_id) of the integration resource that was installed in the account.
The integration instance represents a specific installed instance of an integration app, with its own configuration, settings, and runtime environment.
This reference enables:
- Tracing the resource back to its parent integration instance
- Permission and access control based on integration ownership
- Lifecycle management (enabling/disabling, updating, or uninstalling)
5f9a7b2c3d4e5f6a7b8c9d0eReference to the integration app that defines this resource.
This field is only populated for resources that are part of an integration app. It contains the unique identifier (_id) of the integration app (connector) that defines the structure, behavior, and templates for this resource.
The integration app is the published template that can be installed multiple times across different accounts, with each installation creating a separate integration instance (referenced by _integrationId).
This reference enables:
- Identifying the source integration app for this resource
- Determining which template version is being used
- Linking to documentation, support, and marketplace information
5e8d43a1b9e5a80011a35f1bDisplay name for the guardrail. May be empty if created without one.
PII ScannerFree-text note describing the guardrail's purpose.
Scans records for PII and masks detected values before import.Always GuardrailImport for guardrails.
GuardrailImportPossible values: BYOK connection backing an ai_agent guardrail. Absent when platform-managed credentials are used.
68ae48d6b5f755d2dd38c294Source guardrail this one was cloned from. Present only on clones.
69a886183b213b3ac90860feInput shape for the guardrail's processing pipeline. Present when set; absence means record.
recordPossible values: Ten-character hex identifier used to invoke the guardrail over HTTP.
i894602e87Static lookup configurations. Guardrail (AI agent) imports support static lookups only; defaults to an empty array.
[]Import field mappings. Each entry requires a status field. Typically empty for guardrails.
[]Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
POST /v1/imports HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 199
{
"name": "PII Scanner",
"adaptorType": "GuardrailImport",
"guardrail": {
"type": "pii",
"confidenceThreshold": 0.7,
"pii": {
"entities": [
"email_address",
"phone_number",
"us_social_security_number"
],
"mask": true
}
}
}{
"_id": "6a1cfd72c7867992e6d5b021",
"createdAt": "2026-06-01T03:33:06.758Z",
"lastModified": "2026-06-01T03:33:06.851Z",
"name": "PII Scanner",
"apiIdentifier": "i894602e87",
"lookups": [],
"adaptorType": "GuardrailImport",
"guardrail": {
"type": "pii",
"confidenceThreshold": 0.7,
"pii": {
"entities": [
"email_address",
"phone_number"
],
"mask": true
}
}
}Returns the complete configuration of a specific guardrail import. The _id is from the imports collection — the same ID used for any import type.
The unique identifier of the guardrail import
5f8d43a1b9e5a80011a35f2cGuardrail retrieved successfully
Guardrail import object as returned by the API.
Unique identifier for the resource. Format is a 24-character hexadecimal string.
5f8d43a1b9e5a80011a35f2cTimestamp when the resource was created. Set automatically and cannot be modified.
2023-04-01T09:15:32ZTimestamp when the resource was last updated. Changes whenever any property is modified.
2023-04-15T14:30:15ZTimestamp when the resource was soft-deleted. When null or absent, the resource is active.
2023-05-20T11:45:32ZReference to the specific integration instance that contains this resource.
This field is only populated for resources that are part of an integration app installation. It contains the unique identifier (_id) of the integration resource that was installed in the account.
The integration instance represents a specific installed instance of an integration app, with its own configuration, settings, and runtime environment.
This reference enables:
- Tracing the resource back to its parent integration instance
- Permission and access control based on integration ownership
- Lifecycle management (enabling/disabling, updating, or uninstalling)
5f9a7b2c3d4e5f6a7b8c9d0eReference to the integration app that defines this resource.
This field is only populated for resources that are part of an integration app. It contains the unique identifier (_id) of the integration app (connector) that defines the structure, behavior, and templates for this resource.
The integration app is the published template that can be installed multiple times across different accounts, with each installation creating a separate integration instance (referenced by _integrationId).
This reference enables:
- Identifying the source integration app for this resource
- Determining which template version is being used
- Linking to documentation, support, and marketplace information
5e8d43a1b9e5a80011a35f1bDisplay name for the guardrail. May be empty if created without one.
PII ScannerFree-text note describing the guardrail's purpose.
Scans records for PII and masks detected values before import.Always GuardrailImport for guardrails.
GuardrailImportPossible values: BYOK connection backing an ai_agent guardrail. Absent when platform-managed credentials are used.
68ae48d6b5f755d2dd38c294Source guardrail this one was cloned from. Present only on clones.
69a886183b213b3ac90860feInput shape for the guardrail's processing pipeline. Present when set; absence means record.
recordPossible values: Ten-character hex identifier used to invoke the guardrail over HTTP.
i894602e87Static lookup configurations. Guardrail (AI agent) imports support static lookups only; defaults to an empty array.
[]Import field mappings. Each entry requires a status field. Typically empty for guardrails.
[]Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Not found. The requested resource does not exist or is not visible to the caller.
GET /v1/imports/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"_id": "69eb9f666fbf339ed3bc66c3",
"createdAt": "2026-04-24T16:50:46.439Z",
"lastModified": "2026-04-24T16:50:53.525Z",
"name": "Custom Validator",
"_connectionId": "68ae48d6b5f755d2dd38c294",
"apiIdentifier": "i6a7acf995",
"sandbox": false,
"lookups": [],
"adaptorType": "GuardrailImport",
"guardrail": {
"type": "ai_agent",
"confidenceThreshold": 0.7,
"aiAgent": {
"provider": "openai",
"openai": {
"instructions": "Validate that each record has a non-empty email field.",
"model": "gpt-4.1-mini-2025-04-14",
"tools": []
}
}
}
}Replaces the guardrail import with the provided configuration. This is a full replace -- include all fields you want to keep. adaptorType must remain GuardrailImport.
The unique identifier of the guardrail import
5f8d43a1b9e5a80011a35f2cConfiguration for a guardrail import. _connectionId is only
required for BYOK ai_agent guardrails.
Display name for the guardrail.
PII ScannerOptional description of the guardrail's purpose.
Scans records for PII and masks detected values before import.Connection for BYOK (bring your own key). Only needed for ai_agent type guardrails. Optional — platform-managed credentials are used when omitted.
68ae48d6b5f755d2dd38c294Must be GuardrailImport.
GuardrailImportPossible values: Controls the shape of the input passed to the guardrail's
processing pipeline, exactly as on other imports. The UI writes
record explicitly on new guardrails; when the field is absent
the platform behaves as record.
recordPossible values: Guardrail updated successfully
Guardrail import object as returned by the API.
Unique identifier for the resource. Format is a 24-character hexadecimal string.
5f8d43a1b9e5a80011a35f2cTimestamp when the resource was created. Set automatically and cannot be modified.
2023-04-01T09:15:32ZTimestamp when the resource was last updated. Changes whenever any property is modified.
2023-04-15T14:30:15ZTimestamp when the resource was soft-deleted. When null or absent, the resource is active.
2023-05-20T11:45:32ZReference to the specific integration instance that contains this resource.
This field is only populated for resources that are part of an integration app installation. It contains the unique identifier (_id) of the integration resource that was installed in the account.
The integration instance represents a specific installed instance of an integration app, with its own configuration, settings, and runtime environment.
This reference enables:
- Tracing the resource back to its parent integration instance
- Permission and access control based on integration ownership
- Lifecycle management (enabling/disabling, updating, or uninstalling)
5f9a7b2c3d4e5f6a7b8c9d0eReference to the integration app that defines this resource.
This field is only populated for resources that are part of an integration app. It contains the unique identifier (_id) of the integration app (connector) that defines the structure, behavior, and templates for this resource.
The integration app is the published template that can be installed multiple times across different accounts, with each installation creating a separate integration instance (referenced by _integrationId).
This reference enables:
- Identifying the source integration app for this resource
- Determining which template version is being used
- Linking to documentation, support, and marketplace information
5e8d43a1b9e5a80011a35f1bDisplay name for the guardrail. May be empty if created without one.
PII ScannerFree-text note describing the guardrail's purpose.
Scans records for PII and masks detected values before import.Always GuardrailImport for guardrails.
GuardrailImportPossible values: BYOK connection backing an ai_agent guardrail. Absent when platform-managed credentials are used.
68ae48d6b5f755d2dd38c294Source guardrail this one was cloned from. Present only on clones.
69a886183b213b3ac90860feInput shape for the guardrail's processing pipeline. Present when set; absence means record.
recordPossible values: Ten-character hex identifier used to invoke the guardrail over HTTP.
i894602e87Static lookup configurations. Guardrail (AI agent) imports support static lookups only; defaults to an empty array.
[]Import field mappings. Each entry requires a status field. Typically empty for guardrails.
[]Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Not found. The requested resource does not exist or is not visible to the caller.
Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
PUT /v1/imports/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 192
{
"name": "PII Scanner",
"adaptorType": "GuardrailImport",
"guardrail": {
"type": "pii",
"confidenceThreshold": 0.8,
"pii": {
"entities": [
"email_address",
"phone_number",
"credit_card_number"
],
"mask": true
}
}
}{
"_id": "69eb9f5078dbae2f1bb05f89",
"createdAt": "2026-04-24T16:50:24.073Z",
"lastModified": "2026-05-02T16:12:08.114Z",
"name": "PII Scanner",
"apiIdentifier": "i39ee734f7",
"sandbox": false,
"lookups": [],
"adaptorType": "GuardrailImport",
"guardrail": {
"type": "pii",
"confidenceThreshold": 0.8,
"pii": {
"entities": [
"email_address",
"phone_number",
"credit_card_number"
],
"mask": true
}
}
}Deletes a guardrail import. Soft-deleted and retained in the recycle bin for 30 days before permanent removal.
The unique identifier of the guardrail import
5f8d43a1b9e5a80011a35f2cGuardrail deleted successfully
No content
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Not found. The requested resource does not exist or is not visible to the caller.
The resource has dependents that must be deleted first. Each entry
in the errors array names one blocking resource.
DELETE /v1/imports/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Returns the set of resources that depend on the specified guardrail import. The response is an object whose keys are dependent-resource types (e.g. flows, imports) and whose values are arrays of dependency entries.
An empty object {} means no other resources depend on the target. This is also returned for a well-formatted but nonexistent id.
Resource ID.
66a1f2c3b4d5e6f7a8b9c0d1Dependency map. Keys are resource-type strings; values are arrays
of dependency entries. Returns {} when no dependents exist.
Map of dependent-resource types to arrays of dependency entries.
Keys are plural resource type strings (e.g. flows, imports,
connections). An empty object {} means no dependents.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
GET /v1/imports/{_id}/dependencies HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{}Last updated
Was this helpful?