---
title: "IdentityHound SDK"
description: "Learn what the IdentityHound SDK's packages and entry points hold, which client to create on your server and which in a browser or phone app, and where each part is described."
url: "https://agentpost.tools/docs/identityhound/sdk"
kind: sdk
---

# IdentityHound SDK

`@agentpost-tools/identityhound-sdk` is the TypeScript library for IdentityHound’s HTTP API. The API client uses `fetch` and runs in Node 24, browsers, and React Native without a UI framework. Each operation’s own call is in the [API reference](/docs/identityhound/reference.md), on that operation’s SDK tab.

```sh
npm i @agentpost-tools/identityhound-sdk
```

## Entry points

| Import | What it has |
| --- | --- |
| `@agentpost-tools/identityhound-sdk` | `createClient`, whose methods send each API operation; `IdentityhoundApiError`; and `HOSTED_BASE_URL` |
| `@agentpost-tools/identityhound-sdk/server` | `createVerifier`, which finds out who a request acts for, and `createSessions` and `errorBody`, which keep a principal’s session on your server. Server-only: they take your secret key |
| `@agentpost-tools/identityhound-sdk/workflows` | `createIdentity` and the sign-in, account-merge, invitation, and workspace workflows, with no UI framework and no DOM; and the session strategies, `serverSession` and `deviceSession` |
| `@agentpost-tools/identityhound-sdk/notices` | `securityNotice`, which turns a change-feed event into a [security notice](/docs/identityhound/guides/security-notices.md) your app turned on, and `noticeRecipients`, which reads the addresses to send it to |

Two packages build on it. `@agentpost-tools/identityhound-react` has `IdentityhoundProvider` and thin hooks over the workflows, such as `useSession`, for React and React Native:

```sh
npm i @agentpost-tools/identityhound-react @agentpost-tools/identityhound-sdk react
```

`@agentpost-tools/identityhound-ui` has the [email sign-in component](/docs/identityhound/components/email-sign-in.md#install-and-set-up), whose reference gives the install commands for React and Web Components.

## Create a client

Create the client that fits where your code runs:

-   **On your server,** create `createClient({ token: key })` with your project’s secret key, `key` (`sk_test_…` or `sk_live_…`). Add the [server helpers](/docs/identityhound/sdk/server.md) where you check requests or keep sessions.
-   **In a browser or a phone app,** create `createIdentity({ publishableKey, session })` from `./workflows`, with your publishable key, `publishableKey`, and a [session strategy](/docs/identityhound/sdk/session-strategies.md) that decides where the principal’s session is kept.

[Clients](/docs/identityhound/sdk/clients.md) has each client’s methods, credentials, per-call options, and errors.
