# API: Agent platform

| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | `/v1/approvals` | The approval inbox: pending (default) or completed items, by agent, kind or assignee (assignee=me) | `agents:read` |
| GET | `/v1/approvals/:id` | One approval item | `agents:read` |
| POST | `/v1/approvals/:id/assign` | Give a pending item to someone else to decide (web app only) | `approvals:write` |
| POST | `/v1/approvals/:id/decide` | Approve (all calls, some, or edited) or reject an item. People in the web app only; send the version you saw. (web app only) | `approvals:write` |
| GET | `/v1/events` | Recent platform events (what triggers and webhooks see) | `agents:read` |
| GET | `/v1/home` | Home: approvals waiting and recent runs | `agents:read` |
| GET | `/v1/push/key` | The Web Push public key (VAPID), or null when push isn't set up (web app only) | — |
| DELETE | `/v1/push/subscriptions` | Unsubscribe this device (web app only) | — |
| POST | `/v1/push/subscriptions` | Subscribe this device to push for approvals (the browser's push endpoint only) (web app only) | — |
| GET | `/v1/runs/:id/scorecard` | The run's QA scorecard: checks and the model judge's score against the spec's rubric | `agents:read` |
| POST | `/v1/runs/:id/steps/:stepId/revert` | Undo a write step's changes (values changed since are left alone and listed) (web app only) | `agents:write` |
| GET | `/v1/secrets` | Secret names for workflow HTTP blocks (values are never returned) | `agents:read` |
| DELETE | `/v1/secrets/:name` | Remove a secret (web app only) | `security:write` |
| PUT | `/v1/secrets/:name` | Set a secret; agents use it as {"$secret": "name"} and only the call sees its value (web app only) | `security:write` |
| GET | `/v1/settings/approvals` | Approval settings | `settings:read` |
| PUT | `/v1/settings/approvals` | How long items wait before they expire (1–90 days, or null for never) (web app only) | `settings:write` |
| GET | `/v1/today` | Today: approvals waiting (tap to decide) and what happened while I was away | `agents:read` |
| GET | `/v1/tools` | Every tool agents (and MCP clients) can call: effect, integration, access level, and the organization's gates | `agents:read` |
| PATCH | `/v1/tools/:name` | Turn a tool off, require approval before each use, or restrict it to owners (web app only) | `settings:write` |
| GET | `/v1/tools/:name/history` | Recent changes to a tool's gates | `agents:read` |
| POST | `/v1/webhook-deliveries/:id/resend` | Send a delivery again | `security:write` |
| GET | `/v1/webhooks` | Outbound webhook endpoints | `settings:read` |
| POST | `/v1/webhooks` | Add an endpoint. The signing secret (whsec_…) is returned once. | `security:write` |
| DELETE | `/v1/webhooks/:id` | Remove an endpoint and its delivery log | `security:write` |
| PATCH | `/v1/webhooks/:id` | Change an endpoint, or pause it (enabled: false) | `security:write` |
| GET | `/v1/webhooks/:id/deliveries` | Deliveries of the last 30 days, newest first | `settings:read` |
| POST | `/v1/webhooks/:id/rotate-secret` | New signing secret; the old one also signs for 24 hours (force: true drops it now) | `security:write` |
| POST | `/v1/webhooks/:id/test` | Send a test event (webhook.test) | `security:write` |

## Examples

### GET /v1/approvals

The approval inbox: pending (default) or completed items, by agent, kind or assignee (assignee=me)

```bash
curl -s "https://api.ferryseal.com/v1/approvals" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/approvals`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/approvals/$ID

One approval item

```bash
curl -s "https://api.ferryseal.com/v1/approvals/$ID" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/approvals/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/events

Recent platform events (what triggers and webhooks see)

```bash
curl -s "https://api.ferryseal.com/v1/events" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/events`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/home

Home: approvals waiting and recent runs

```bash
curl -s "https://api.ferryseal.com/v1/home" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/home`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/runs/$ID/scorecard

The run's QA scorecard: checks and the model judge's score against the spec's rubric

```bash
curl -s "https://api.ferryseal.com/v1/runs/$ID/scorecard" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/runs/${id}/scorecard`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/secrets

Secret names for workflow HTTP blocks (values are never returned)

```bash
curl -s "https://api.ferryseal.com/v1/secrets" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/secrets`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/settings/approvals

Approval settings

```bash
curl -s "https://api.ferryseal.com/v1/settings/approvals" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/settings/approvals`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/today

Today: approvals waiting (tap to decide) and what happened while I was away

```bash
curl -s "https://api.ferryseal.com/v1/today" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/today`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/tools

Every tool agents (and MCP clients) can call: effect, integration, access level, and the organization's gates

```bash
curl -s "https://api.ferryseal.com/v1/tools" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/tools`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/tools/$NAME/history

Recent changes to a tool's gates

```bash
curl -s "https://api.ferryseal.com/v1/tools/$NAME/history" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/tools/${name}/history`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/webhook-deliveries/$ID/resend

Send a delivery again

```bash
curl -s -X POST "https://api.ferryseal.com/v1/webhook-deliveries/$ID/resend" \
  -H "Authorization: Bearer $FT_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhook-deliveries/${id}/resend`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/webhooks

Outbound webhook endpoints

```bash
curl -s "https://api.ferryseal.com/v1/webhooks" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhooks`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/webhooks

Add an endpoint. The signing secret (whsec_…) is returned once.

```bash
curl -s -X POST "https://api.ferryseal.com/v1/webhooks" \
  -H "Authorization: Bearer $FT_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhooks`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### DELETE /v1/webhooks/$ID

Remove an endpoint and its delivery log

```bash
curl -s -X DELETE "https://api.ferryseal.com/v1/webhooks/$ID" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhooks/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### PATCH /v1/webhooks/$ID

Change an endpoint, or pause it (enabled: false)

```bash
curl -s -X PATCH "https://api.ferryseal.com/v1/webhooks/$ID" \
  -H "Authorization: Bearer $FT_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhooks/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/webhooks/$ID/deliveries

Deliveries of the last 30 days, newest first

```bash
curl -s "https://api.ferryseal.com/v1/webhooks/$ID/deliveries" \
  -H "Authorization: Bearer $FT_API_KEY"
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhooks/${id}/deliveries`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/webhooks/$ID/rotate-secret

New signing secret; the old one also signs for 24 hours (force: true drops it now)

```bash
curl -s -X POST "https://api.ferryseal.com/v1/webhooks/$ID/rotate-secret" \
  -H "Authorization: Bearer $FT_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhooks/${id}/rotate-secret`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/webhooks/$ID/test

Send a test event (webhook.test)

```bash
curl -s -X POST "https://api.ferryseal.com/v1/webhooks/$ID/test" \
  -H "Authorization: Bearer $FT_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.ferryseal.com/v1/webhooks/${id}/test`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.FT_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

Request and response schemas: [https://www.ferryseal.com/openapi.json](https://www.ferryseal.com/openapi.json). All resources: [API reference](https://www.ferryseal.com/docs/api).
