Skip to main content

Overview

Formal provides SDKs for programmatic access to the platform. Use SDKs to build custom tools, automation, and integrations.
For most infrastructure management tasks, use the Terraform provider instead of SDKs.

Official SDKs

The official Formal SDK for Go is available:

Features

  • Create, read, update, delete Formal objects
  • Query logs and sessions programmatically
  • Manage policies dynamically
  • Integrate Formal into CI/CD pipelines
  • Build custom dashboards and reports

Go Example

Install the SDK:
List your Resources:
The client calls https://api.formal.ai by default.

HTTP API

You can also call the API directly. It uses the Connect protocol, not REST. Every method is a POST to https://api.formal.ai/<package>.<Service>/<Method> with a JSON body.

Authentication

Example Requests

The API requires HTTP/2. curl negotiates it automatically over HTTPS. HTTP/1.1-only clients receive a 464 error.

API Documentation

See the API Reference for complete endpoint documentation.