Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions fern/changelog/2026-03-05.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
tags: ["pods-api", "new-feature"]
---

## Summary

**Pod-scoped API keys** — create API keys that are restricted to a single pod. A pod-scoped key can only access resources within its pod, so multi-tenant platforms can issue narrower credentials per tenant instead of sharing an organization-wide key.

### What's new?

**New endpoints:**
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This changelog entry documents pod API key endpoints instead of the webhook update endpoint described by the PR, so it publishes the wrong feature in release notes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At fern/changelog/2026-03-05.mdx, line 11:

<comment>This changelog entry documents pod API key endpoints instead of the webhook update endpoint described by the PR, so it publishes the wrong feature in release notes.</comment>

<file context>
@@ -1,64 +1,62 @@
 
-**New endpoint:**
-- `PATCH /webhooks/{webhook_id}` - Update a webhook's inbox and pod subscriptions
+**New endpoints:**
+- `POST /pods/{pod_id}/api-keys` - Create an API key scoped to a pod
+- `GET /pods/{pod_id}/api-keys` - List API keys for a pod
</file context>
Fix with Cubic

- `POST /pods/{pod_id}/api-keys` - Create an API key scoped to a pod
- `GET /pods/{pod_id}/api-keys` - List API keys for a pod
- `DELETE /pods/{pod_id}/api-keys/{api_key}` - Delete a pod-scoped API key

**New field:**
- `pod_id` on API key objects — indicates the pod the key is scoped to. When set, the key can only access resources within that pod.

### Use cases

Build agents that:
- Issue per-tenant API keys so each customer's agent only accesses its own pod
- Rotate credentials at the pod level without affecting other tenants
- Enforce least-privilege access in multi-tenant platforms
- Audit API key usage per pod

<CodeBlocks>
```python title="Python"
from agentmail import AgentMail

client = AgentMail(api_key="your-api-key")

# create an api key scoped to a pod
response = client.pods.api_keys.create(
pod_id="pod_abc123",
name="tenant-agent-key"
)

# use the scoped key — it can only access this pod's resources
scoped_client = AgentMail(api_key=response.api_key)
inboxes = scoped_client.inboxes.list()
```

```typescript title="TypeScript"
import { AgentMail } from "agentmail";

const client = new AgentMail({ apiKey: "your-api-key" });

// create an api key scoped to a pod
const response = await client.pods.apiKeys.create("pod_abc123", {
name: "tenant-agent-key",
});

// use the scoped key — it can only access this pod's resources
const scopedClient = new AgentMail({ apiKey: response.apiKey });
const inboxes = await scopedClient.inboxes.list();
```
</CodeBlocks>

<Note>
Learn more about multi-tenant isolation in the [Pods](https://docs.agentmail.to/core-concepts/pods) documentation.
</Note>