> For the complete documentation index, see [llms.txt](https://black-sheep-finance.gitbook.io/black-sheep-finance-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://black-sheep-finance.gitbook.io/black-sheep-finance-docs/rest-api/overview.md).

# Overview

The public REST API lives under:

```
https://blacksheepfinance.money/api/public/v1
```

All routes:

* Accept `application/json`.
* Return `application/json`.
* Require `Authorization: Bearer bs_live_...` (see [Authentication](/black-sheep-finance-docs/rest-api/authentication.md)).
* Are versioned via the URL (`/v1`). Breaking changes ship as `/v2`.

## Endpoints

| Method | Path                   | Description                                 |
| ------ | ---------------------- | ------------------------------------------- |
| GET    | `/agents`              | List agent wallets                          |
| POST   | `/agents`              | Create an agent wallet (+ optional policy)  |
| GET    | `/agents/:id`          | Agent details, balance, policy              |
| POST   | `/agents/:id/send`     | Send USDC — runs through policy + approvals |
| GET    | `/transactions`        | Last 100 transactions across the account    |
| GET    | `/wallets/:id/balance` | Live SOL + USDC balance                     |

See the dedicated pages:

* [Agents](/black-sheep-finance-docs/rest-api/agents.md)
* [Transactions](/black-sheep-finance-docs/rest-api/transactions.md)
* [Wallets & balances](/black-sheep-finance-docs/rest-api/wallets.md)
* [Errors](/black-sheep-finance-docs/rest-api/errors.md)
* [Rate limits](/black-sheep-finance-docs/rest-api/rate-limits.md)

## Conventions

* All amounts are **whole USDC** (or SOL), exposed as `number`. Internally USDC is 6-decimal on Solana — the API does the math for you.
* All timestamps are **ISO 8601 in UTC**.
* All IDs are **UUIDv4**.
* All public keys are **base58**.

## Try it

```bash
curl https://blacksheepfinance.money/api/public/v1/agents \
  -H "Authorization: Bearer $BS_API_KEY"
```


---

# 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://black-sheep-finance.gitbook.io/black-sheep-finance-docs/rest-api/overview.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.
