> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> Programmatic access to Formal with the Go SDK

## Overview

Formal provides SDKs for programmatic access to the platform. Use SDKs to build custom tools, automation, and integrations.

<Note>
  For most infrastructure management tasks, use the [Terraform
  provider](/docs/guides/configuration/terraform) instead of SDKs.
</Note>

## Official SDKs

The official Formal SDK for Go is available:

* **Go**: [github.com/formalco/go-sdk](https://github.com/formalco/go-sdk)

### 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

## REST API

Alternatively, use the Formal REST API directly:

### Authentication

```bash theme={null}
export FORMAL_API_KEY="your-api-key-here"
```

### Example Requests

<Tabs>
  <Tab title="List Resources">
    ```bash theme={null}
    curl -X GET "https://api.joinformal.com/v1/resources" \
      -H "X-API-KEY: $FORMAL_API_KEY"
    ```
  </Tab>

  <Tab title="Create User">
    ```bash theme={null}
    curl -X POST "https://api.joinformal.com/v1/users" \
      -H "X-API-KEY: $FORMAL_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Alice Smith",
        "email": "alice@example.com",
        "type": "human"
      }'
    ```
  </Tab>

  <Tab title="Query Logs">
    ```bash theme={null}
    curl -X GET "https://api.joinformal.com/v1/logs?query=user:alice@example.com" \
      -H "X-API-KEY: $FORMAL_API_KEY"
    ```
  </Tab>
</Tabs>

## API Documentation

See the [API Reference](/docs/api/introduction) for complete endpoint documentation.
