Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

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, on that operation’s SDK tab.

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 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:

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

@agentpost-tools/identityhound-ui has the email sign-in component, 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 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 that decides where the principal’s session is kept.

Clients has each client’s methods, credentials, per-call options, and errors.