# FlowGuard

import {Head, Link} from "zudoku/components";

<Head>
  <title>Developer documentation | FlowGuard</title>
</Head>

Use the FlowGuard REST API to query request logs and manage your team's rules, actions, proxies, and IP lists.

Looking for help with the proxy or control plane? Go to the [FlowGuard documentation](/flowguard/introduction).

## Make your first request

Every request needs a bearer access token. Use a team access token for a service owned by one team, a personal access token for a private script, or OAuth when your application connects other users' accounts. The [token guide](/developers/authentication) explains how to create and protect each token type.

Give the token only the [FlowGuard scopes](/developers/flowguard/scopes) its requests need. The production API base URL is:

```text
https://flowguard.network/api/v1
```

Start by retrieving the rule capabilities for the current API. This read-only request needs `flowguard:rules:read`:

```http
GET /api/v1/rules/capabilities HTTP/1.1
Host: flowguard.network
Authorization: Bearer $TOKEN
Accept: application/json
```

The response lists the supported condition operators, match types, action results, server scope modes, and maximum rule-group depth. Use it when building a rule editor instead of hard-coding those values.

## API documentation

<div className="not-prose my-6 grid gap-4 sm:grid-cols-2">
  <Link
    to="/developers/flowguard/scopes"
    className="rounded-xl border bg-card p-5 text-card-foreground transition-colors hover:border-primary/50 hover:bg-muted/50"
  >
    <div className="font-semibold">API scopes</div>
    <p className="mt-1.5 text-sm text-muted-foreground">
      Give a token only the FlowGuard permissions the integration needs.
    </p>
  </Link>
  <Link
    to="/api/flowguard"
    className="rounded-xl border bg-card p-5 text-card-foreground transition-colors hover:border-primary/50 hover:bg-muted/50"
  >
    <div className="font-semibold">REST API reference</div>
    <p className="mt-1.5 text-sm text-muted-foreground">
      Browse endpoints, request fields, response schemas, and required permissions.
    </p>
  </Link>
</div>
