> For the complete documentation index, see [llms.txt](https://docs.sedona.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sedona.fun/fleet-configuration.md).

# Configure the Fleet provider

[← Back to dashboard](https://www.sedona.fun/dashboard/api-keys)

Create one Fleet provider value and pass it to `createClient`.

```ts
import { createClient } from "openblue";
import { fleet } from "@sedonadotfun/openblue-fleet";

const client = createClient(
  fleet({
    baseUrl: "https://fleet-api-production-fleet-api.up.railway.app",
    apiKey: () => process.env.FLEET_API_KEY!,
    lineId: process.env.FLEET_LINE_ID,
    webhookSecret: process.env.FLEET_WEBHOOK_SECRET,
    connectionName: "production",
    timeoutMs: 30_000,
  }),
  { transportPolicy: "require_imessage" },
);
```

## Options

| Option           | Required          | Meaning                                      |
| ---------------- | ----------------- | -------------------------------------------- |
| `baseUrl`        | yes               | HTTPS Fleet origin, with no `/v0` path       |
| `apiKey`         | yes               | Bearer credential string or secret resolver  |
| `lineId`         | for address sends | Default sending line                         |
| `webhookSecret`  | for verification  | Show-once webhook signing secret             |
| `timeoutMs`      | no                | Fleet HTTP request budget                    |
| `connectionName` | no                | Local label stamped onto resource references |

A secret resolver is called for each authenticated Fleet request. Rotation is observed only when the resolver itself returns a new value; wrapping a static process environment does not make the environment refresh automatically.

## API-key authorization

Fleet currently has two named-user roles:

* `admin`: may use administrator routes and is quota-exempt;
* `user`: may use ordinary routes only for assigned lines.

Line grants scope user access. An out-of-scope line is intentionally indistinguishable from a missing line. Fleet does not currently expose developer-defined scopes, key labels, key expiry, or an atomic rotation operation. Rotation means minting another key for the same user, updating the consumer, then soft-revoking the old key.

A normal API key is returned once when minted and is not recoverable later. Revocation is immediate for future requests. Fleet records best-effort key usage telemetry on authenticated requests.

## Request authentication

The SDK uses the conventional environment variable `FLEET_API_KEY` and sends:

```http
Authorization: Bearer <key>
```

Do not place keys in command arguments, logs, fixtures, documentation, or source control.

Continue with [Send messages](/send-messages.md) or [Receive webhooks](/webhooks.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sedona.fun/fleet-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
