---
title: "Agent Accounts and Account Management API"
canonical: "https://test.abhinandan.one/node-sdk-api-client/node-sdk-account-resource"
markdown_url: "https://test.abhinandan.one/node-sdk-api-client/node-sdk-account-resource.md"
publisher: "Primitive SDKs"
kind: "guide"
content_type: "reference"
category: "Node.js SDK"
parent: "node-sdk-api-client"
description: "client.account (AccountResource) reads and updates org account details and storage stats, and rotates the webhook secret; client.inbox reports inbox readiness."
keywords: ["client.account", "AccountResource", "InboxResource", "client.inbox", "rotate webhook secret", "PrimitiveApiClient account"]
last_modified: "2026-08-11T18:54:50.587841+00:00"
published_at: "2026-08-11T18:54:50.245531+00:00"
source_files:
  - "sdk-node/src/api/index.ts"
sections:
  - {anchor: "fetch-account-details", title: "Fetch account details"}
  - {anchor: "fetch-the-webhook-signing-secret", title: "Fetch the webhook signing secret"}
  - {anchor: "check-inbox-readiness", title: "Check inbox readiness"}
  - {anchor: "next-steps", title: "Next steps"}
---

> Documentation index: https://test.abhinandan.one/llms.txt

# Agent Accounts and Account Management API

Use client.account and client.inbox to read and update org-level account settings, storage stats, and the webhook secret, and to check inbox readiness, the account-management surface beyond client.agent's create/upgrade lifecycle.

Use the generated account operations to read your org's account record and fetch the webhook signing secret, alongside the `client.agent` lifecycle. Reach for this page when you need account-level data that the high-level `send`/`reply`/`forward` client doesn't expose.

The account operations are part of the [generated API client](https://test.abhinandan.one/python-generated-api-client.md), the OpenAPI-codegenerated surface exported from `@primitivedotdev/sdk/api`. Creating a zero-touch account and upgrading it is covered separately in [Agent Accounts](https://test.abhinandan.one/node-sdk-agent-accounts.md).

## Fetch account details

Call the generated `getAccount` operation with a `PrimitiveApiClient`, the host-aware authenticated request client, to read your org's account record.

```typescript
import { PrimitiveApiClient, getAccount } from "@primitivedotdev/sdk/api";

const api = new PrimitiveApiClient({ apiKey: process.env.PRIMITIVE_API_KEY });
const result = await getAccount({ client: api.client });

console.log(result.data);
```

Every operation returns the server's `{ success, data }` envelope. On a non-2xx response the generated client surfaces the error rather than throwing a plain `Error`; see [Node.js SDK Errors](https://test.abhinandan.one/node-sdk-errors.md) for the `PrimitiveApiError` shape and how to read `code`, `status`, and `requestId`.

> **Tip:** Use `createPrimitiveClient({ apiKey })` from `@primitivedotdev/sdk/api` instead when you also want the higher-level helpers on the same client, such as [Primitive Memories](https://test.abhinandan.one/node-sdk-api-client.md) under `client.memories`.

## Fetch the webhook signing secret

The secret used to verify the `Primitive-Signature` header comes from `GET /account/webhook-secret`, and it is a UTF-8 string you use as-is.

```typescript
import { PrimitiveApiClient } from "@primitivedotdev/sdk/api";

const api = new PrimitiveApiClient({ apiKey: process.env.PRIMITIVE_API_KEY });
const response = await api.request("GET", "/account/webhook-secret");

console.log(response);
```

> **Warning:** The secret's output looks base64-shaped (for example `XNHBBW8VqoBjRfNs1tkZj11jTk...`) but it is not base64. Use it verbatim as a UTF-8 string for the HMAC key; base64-decoding it first silently produces mismatched signatures.

Once you have the secret, [Webhook Signature Verification](https://test.abhinandan.one/node-sdk-webhook-signing.md) covers how it verifies the `Primitive-Signature: t=<unix-seconds>,v1=<hex>` header, including the 300-second replay tolerance.

## Check inbox readiness

Inbox readiness reports whether inbound mail can actually reach your webhook endpoint, which is worth checking right after account creation or a DNS change.

The CLI exposes this directly:

```bash
primitive inbox-status
```

See [Inbox Setup and Status](https://test.abhinandan.one/cli-inbox.md) for the fields it reports (receiving readiness, processing readiness, domains, endpoints). Domain and route configuration itself is a platform concept covered in [Primitive Functions and Recipient Routing](https://test.abhinandan.one/functions-and-routing-concepts.md); readiness reporting only tells you the current state, it does not configure anything.
