---
title: "IdentityHound API reference"
description: "Find any IdentityHound API operation by resource, with who may call it and the rules every operation follows."
url: "https://agentpost.tools/docs/identityhound/reference"
kind: reference
---

# IdentityHound API reference

Every operation IdentityHound serves, generated from its contract, so these pages match the API. Every request follows the [API basics](/docs/platform/api-basics.md). Start with the [IdentityHound quickstart](/docs/identityhound/quickstart.md) if you are new, and use the [SDK](/docs/identityhound/sdk.md) from TypeScript.

For tools that read OpenAPI, [/docs/identityhound/openapi.json](/docs/identityhound/openapi.json) describes every operation here as OpenAPI 3.1, with its credentials, schemas, examples, and error codes.

## Who may call

Each operation names who may call it. [Platform credentials](/docs/platform/concepts/credentials.md) explains each credential.

-   **Anyone** needs no IdentityHound credential, but the request still names your project: your server sends the secret key, and a browser or a native app sends the publishable key. A publishable key reaches only the five sign-in operations that start a session (`POST /auth/email-code`, `POST /auth/email-code/verify`, `POST /auth/oauth/:providerKey/start`, `POST /auth/oauth/:providerKey/callback`, and `POST /auth/guest`) and `POST /invitations/preview`, which lets a page show an invitation before the principal signs in.
-   **A signed-in principal** uses a session token, a user token, an API key, or a delegated token. IdentityHound checks its permissions.
-   **Your server** is the project’s secret key, which is trusted.

## Retrying a write

[Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule every API follows. IdentityHound adds two rules of its own. A refusal is a write’s answer too: it is kept and replayed with its `Idempotency-Key` for 24 hours, like a success. A refusal of the request, the caller, or the moment, such as `invalid_request`, `forbidden`, or `conflict`, is never replayed, and neither is [`throttled`](/docs/identityhound/errors.md#throttled), [`guest_limit`](/docs/identityhound/errors.md#guest_limit), [`provider_error`](/docs/identityhound/errors.md#provider_error), [`trusted_caller_required`](/docs/identityhound/errors.md#trusted_caller_required), or [`secret_key_invalid`](/docs/identityhound/errors.md#secret_key_invalid): a retry runs again.

A caller that is neither signed in nor your server, such as a browser with the publishable key, is known only by its IP address, which others may share. So IdentityHound saves no answer that holds a credential for such a caller: a retry of a sign-in, such as [Verify a sign-in code](/docs/identityhound/reference/auth.md#verify-a-sign-in-code), runs again.

## Conventions

What this API sets for every operation in this reference. [API basics](/docs/platform/api-basics.md) has the rules themselves, and its table compares the APIs.

-   **Base URL:** every path here starts with `https://api.agentpost.tools/v1/identity`.
-   **Idempotency:** Every write (`POST`, `PUT`, `PATCH`, `DELETE`) takes `Idempotency-Key`, except [Validate a config](/docs/identityhound/reference/config.md#validate-a-config), [Introspect a token](/docs/identityhound/reference/auth.md#introspect-a-token), [Preview an invitation](/docs/identityhound/reference/invitations.md#preview-an-invitation), [Check an entitlement](/docs/identityhound/reference/entitlements.md#check-an-entitlement), [Check access](/docs/identityhound/reference/access.md#check-access), and [Check access in a batch](/docs/identityhound/reference/access.md#check-access-in-a-batch), whose entries say why. A key’s first answer is kept for 24 hours. One operation adds its own rule, which its entry states: [Create a grant](/docs/identityhound/reference/grants.md#create-a-grant). It is required on [Create a grant](/docs/identityhound/reference/grants.md#create-a-grant). [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule, with the codes [`idempotency_mismatch`](/docs/identityhound/errors.md#idempotency_mismatch) and [`conflict`](/docs/identityhound/errors.md#conflict) it answers with.
-   **Lists:** Every list takes `limit`, 1 to 500, default 100. [List workspaces](/docs/identityhound/reference/workspaces.md#list-workspaces), [List members](/docs/identityhound/reference/members.md#list-members), [List invitations](/docs/identityhound/reference/invitations.md#list-invitations), [List resource roles](/docs/identityhound/reference/resource-roles.md#list-resource-roles), and [List grants](/docs/identityhound/reference/grants.md#list-grants) page with `next` and `after`. [Read the change feed](/docs/identityhound/reference/events.md#read-the-change-feed) is a feed. [List principals](/docs/identityhound/reference/principals.md#list-principals) and [List delegations](/docs/identityhound/reference/delegations.md#list-delegations) answer with no cursor. [Lists](/docs/platform/api-basics.md#lists) has the rule.
-   **IDs:** each ID starts with its kind’s prefix, as [IDs](#ids) lists.
-   **Errors:** An error’s `docs` link goes to its code’s entry on [IdentityHound errors](/docs/identityhound/errors.md). Any operation can answer with [`invalid_request`](/docs/identityhound/errors.md#invalid_request), [`payload_too_large`](/docs/identityhound/errors.md#payload_too_large), [`unauthenticated`](/docs/identityhound/errors.md#unauthenticated), or [`internal_error`](/docs/identityhound/errors.md#internal_error); each operation lists the other codes it can answer with. [Errors](/docs/platform/api-basics.md#errors) describes the body.

## IDs

| Kind | Looks like |
| --- | --- |
| Principal | `prn_…` |
| Identity | `idn_…` |
| Connection | `con_…` |
| Verification | `ver_…` |
| Session | `ses_…` |
| API key | `key_…` |
| Workspace | `wsp_…` |
| Membership | `mem_…` |
| Invitation | `inv_…` |
| Resource role | `rro_…` |
| Delegation | `dlg_…` |
| Grant | `grt_…` |

## Resources

Each resource has its own page, with its operations, their examples, and the objects they answer with.

| Resource | What it holds |
| --- | --- |
| [Config](/docs/identityhound/reference/config.md) | The project’s one versioned config: resource types and their actions, roles, entitlements, sign-in and sign-up, providers, and URLs. |
| [Sign-in](/docs/identityhound/reference/auth.md) | Emailed codes, OAuth providers, guests, sign-out, and introspection. The session-start operations, and an invitation’s preview, are the only ones a publishable key reaches. |
| [The signed-in principal](/docs/identityhound/reference/me.md) | The caller’s own profile, sign-in identities, and sessions. Of these, a delegated token reaches only `GET /me` and sign-out: a delegate acting for a principal never reaches the principal’s account. Elsewhere it acts within its delegation, such as in `POST /access/check` and `GET /access/permissions`. |
| [Principals](/docs/identityhound/reference/principals.md) | Principals and their sign-in methods. A principal may declare a kind, `human`, `agent`, or `service`, as a label it can change at any time. Roles, grants, and invitations treat every kind alike. |
| [API keys](/docs/identityhound/reference/api-keys.md) | A signed-in principal’s own credential. A key may be restricted to workspaces and permissions, which caps what it can do. |
| [Connected accounts](/docs/identityhound/reference/connections.md) | A principal’s accounts at OAuth providers, such as Twitch, held so a trusted caller or a delegate can act for it there. Connect one with `auth.oauthStart` and `purpose: connect`. |
| [Workspaces](/docs/identityhound/reference/workspaces.md) | Flat groups of principals, such as a team or a customer. The principal who creates one is its owner, and a workspace always keeps an owner. |
| [Members](/docs/identityhound/reference/members.md) | A workspace’s memberships and their roles. |
| [Invitations](/docs/identityhound/reference/invitations.md) | Invitations into a workspace, by email or by a code you pass on yourself. A principal previews an invitation, then accepts it. |
| [Project roles](/docs/identityhound/reference/project-roles.md) | Roles a principal holds across the project. Only your server assigns or removes them. Read them in the principal’s `projectRoles`. |
| [Resource roles](/docs/identityhound/reference/resource-roles.md) | A role on one resource, such as editor of one report, held by a principal, by every principal that is not a guest, or by every guest. |
| [Bundles](/docs/identityhound/reference/bundles.md) | Named sets of entitlements, such as a plan, granted together. |
| [Grants](/docs/identityhound/reference/grants.md) | What a principal, a workspace, every principal that is not a guest, or every guest has been given: a bundle, or one entitlement. |
| [Entitlements](/docs/identityhound/reference/entitlements.md) | Whether a principal holds an entitlement, through any grant to it, its workspace, or every principal that is not a guest (every guest, for a guest). |
| [Delegations](/docs/identityhound/reference/delegations.md) | Permission for one principal to act for another, within listed permissions, a workspace, and an expiry. The delegate exchanges its API key or session for short-lived delegated tokens, and every check and event keeps both identities. |
| [Access checks](/docs/identityhound/reference/access.md) | One decision for “may this principal do this to that resource?”, with a reason an app or an agent can act on. Every answer names its config version. |
| [Change feed](/docs/identityhound/reference/events.md) | Read IdentityHound’s retained changes after a cursor, in order, as CloudEvents. Each event keeps who acted and for whom. [Change feed retention](/docs/identityhound/concepts/change-feed.md#limits) explains how long the feed keeps changes and what happens when they expire. |
