API Reference
Integrate Terraform security checks into any workflow
Policy Engine uses API key authentication. Include your key in the
Authorization header of every request.
You can find your API key in your Profile page. The /api/check endpoint also works without
a key for anonymous (rate-limited) checks.
To ensure fair usage, API requests are rate-limited per user.
| Plan | Requests / Hour | Max Code Size |
|---|---|---|
| Anonymous | 10 | 50 KB |
| Free Account | 100 | 500 KB |
| Pro | 1,000 | 5 MB |
When you exceed the limit, you'll receive a
429 Too Many Requests response with a Retry-After header.
Policy Engine uses standard HTTP status codes.
| Code | Meaning |
|---|---|
| 200 | Request successful |
| 400 | Bad Request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 404 | Not Found — resource does not exist |
| 422 | Unprocessable — code could not be parsed |
| 429 | Too Many Requests — rate limit exceeded |
| 500 | Internal Server Error |
Analyzes Terraform HCL code and returns a list of security violations grouped by severity. Works anonymously (rate-limited) or authenticated.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | required | The Terraform HCL code to analyze |
| filename | string | optional | Label for the check (e.g., "main.tf") for history records |
Example Request
200 Success Response
400 Error Response
Returns all built-in and custom policy rules available in the system, organized by resource type.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| resource_type | string | optional | Filter by resource type (e.g., aws_s3_bucket) |
Example Request
200 Success Response
Returns the authenticated user's policy check history. Requires a valid API key.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | optional | Max results to return (default: 20, max: 100) |
| offset | integer | optional | Pagination offset (default: 0) |
Example Request
200 Success Response
Returns the current health and version information. No authentication required. Useful for monitoring and uptime checks.