---
title: "IdentityHound API: Config"
description: "Get the config, replace the config, or validate a config, with the IdentityHound API."
url: "https://agentpost.tools/docs/identityhound/reference/config"
kind: reference
---

# Config

The project’s one versioned config: resource types and their actions, roles, entitlements, sign-in and sign-up, providers, and URLs.

[Roles](/docs/identityhound/concepts/roles.md) explains resource types, permissions, and roles, and [Entitlements](/docs/identityhound/concepts/entitlements.md) the catalog.

Paths are relative to `https://api.agentpost.tools/v1/identity`, and every request follows the [API basics](/docs/platform/api-basics.md). [Who may call](/docs/identityhound/reference.md#who-may-call) explains each kind of caller.

## Get the config

`GET /config`

The current config and its version.

-   **Who may call:** Your server.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.config.get()`

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `config` | [`IamConfig`](/docs/identityhound/reference/config.md#the-iamconfig-object) | Always |  |

### Errors

-   [`trusted_caller_required`](/docs/identityhound/errors.md#trusted_caller_required) (403)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/identity/config \
  -H "Authorization: Bearer sk_test_…"
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'sk_test_…' });
const { config } = await client.config.get();
```

```json title="Response"
{
  "config": {
    "version": 3,
    "signUp": {
      "mode": "invite_only"
    },
    "signIn": {
      "emailCode": {
        "enabled": true,
        "codeTtl": "10m",
        "resendAfter": "30s"
      },
      "providers": {}
    },
    "sessions": {
      "idleTtl": "7d",
      "maxTtl": "30d"
    },
    "guests": {
      "enabled": false,
      "idleTtl": "30d",
      "createPerIpPerHour": 30
    },
    "accounts": {
      "merge": "off",
      "mergeTicketTtl": "10m"
    },
    "workspaces": {},
    "invitations": {
      "ttl": "7d"
    },
    "delegations": {
      "maxTtl": "30d",
      "tokenTtl": "15m"
    },
    "urls": {
      "signInLink": "https://app.example.com/sign-in",
      "invitationAccept": "https://app.example.com/invitations",
      "oauthReturn": ["https://app.example.com/auth/callback"]
    },
    "resourceTypes": {
      "report": {
        "actions": ["view", "edit", "export"]
      }
    },
    "roles": {
      "admin": {
        "name": "Admin",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:*",
          "identity.invitation:*",
          "identity.resource_role:*",
          "identity.grant:view"
        ]
      },
      "member": {
        "name": "Member",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:view",
          "identity.invitation:view",
          "report:view"
        ]
      },
      "editor": {
        "name": "Editor",
        "scope": "resource",
        "assignableTo": ["principal", "guest"],
        "permissions": ["report:view", "report:edit"]
      },
      "support": {
        "name": "Support",
        "scope": "project",
        "permissions": ["report:view"]
      }
    },
    "entitlements": {
      "reports.export": {
        "description": "Export reports",
        "resourceType": "report"
      },
      "reports.schedule": {
        "description": "Schedule reports by email"
      }
    },
    "updatedAt": "2026-11-13T09:30:00.000Z",
    "updatedBy": "trusted_caller"
  }
}
```

## Replace the config

`PUT /config`

Read the config, change your settings, and send the whole config back. Any read-only fields you send must match the current config. Omitting an existing provider app’s client secret keeps it. Send the version you read in `If-Match` to get `stale_version` if the config changed before your update.

-   **Who may call:** Your server.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.config.put(config, ifMatch)`
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.
-   **If-Match:** Optional. The config `version` you read, such as `3` or `"3"`: a whole number from 1. Anything else is `invalid_request`.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `signUp` | `object` | Yes |  |
| `signUp.mode` | `string` | Yes | One of `"open"`, `"invite_only"`, or `"closed"`. |
| `signIn` | `object` | Yes |  |
| `signIn.emailCode` | `object` | Yes |  |
| `signIn.emailCode.enabled` | `boolean` | Yes |  |
| `signIn.emailCode.codeTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `signIn.emailCode.resendAfter` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `signIn.providers` | `object` | Yes |  |
| `signIn.providers.{key}.provider` | `"twitch"` | Yes |  |
| `signIn.providers.{key}.enabled` | `boolean` | Yes |  |
| `signIn.providers.{key}.clientId` | `string` | Yes |  |
| `signIn.providers.{key}.clientSecret` | `string` | No |  |
| `signIn.providers.{key}.signIn` | `boolean` | Yes |  |
| `signIn.providers.{key}.signInScopes` | `string[]` | Yes |  |
| `signIn.providers.{key}.connectScopes` | `string[]` | Yes |  |
| `sessions` | `object` | Yes |  |
| `sessions.idleTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `sessions.maxTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `guests` | `object` | Yes |  |
| `guests.enabled` | `boolean` | Yes |  |
| `guests.idleTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `guests.createPerIpPerHour` | `integer` | Yes | At least 1. |
| `guests.maxActive` | `integer` | No | The most guests the project holds at once. Unset, there is no limit; at least 1. |
| `accounts` | `object` | Yes |  |
| `accounts.merge` | `"off"` or `"on"` | Yes | With `on`, a principal who links a sign-in method another principal holds gets a merge ticket, and `POST /me/merge` merges that account into its own. With `off`, linking it fails with no ticket and the merge is refused. |
| `accounts.mergeTicketTtl` | `string` | Yes | How long a merge ticket lasts once issued. |
| `workspaces` | `object` | Yes |  |
| `workspaces.maxOwnedPerPrincipal` | `integer` | No | The most active workspaces one principal may own. Unset, there is no limit; at least 1. |
| `invitations` | `object` | Yes |  |
| `invitations.ttl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `delegations` | `object` | Yes |  |
| `delegations.maxTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `delegations.tokenTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `urls` | `object` | Yes |  |
| `urls.signInLink` | `string` | No | The page a sign-in code notification links to, with `email` and `code` added. Unset, the notification carries no link. |
| `urls.invitationAccept` | `string` | No | The page an invitation notification links to, with `token` added. Unset, the notification carries no link. |
| `urls.oauthReturn` | `string[]` | Yes |  |
| `resourceTypes` | `object` | Yes |  |
| `resourceTypes.{key}.actions` | `string[]` | Yes | At least 1. |
| `resourceTypes.{key}.requiresEntitlement` | `object` | No | Each value is a `string`. |
| `roles` | `object` | Yes | Keyed by role. Ordinary roles require `name`, `scope`, and `permissions`. For `owner`, send the permissions it adds to its fixed ones, or omit the entry to add none. Its name, scope, assignee kinds, and built-in marker can be sent back as read. |
| `roles.{key}.name` | `string` | No |  |
| `roles.{key}.scope` | `string` | No | One of `"project"`, `"workspace"`, or `"resource"`. |
| `roles.{key}.permissions` | `string[]` | Yes |  |
| `roles.{key}.assignableTo` | `string[]` | No | Who may hold the role: `["principal"]`, `["guest"]`, or both. `principal` covers every principal that is not a guest, whatever kind it declares. Without a list, any principal that is not a guest may hold it. Each is one of `"principal"` or `"guest"`. |
| `roles.{key}.builtIn` | `boolean` | No |  |
| `entitlements` | `object` | Yes |  |
| `entitlements.{key}.description` | `string` | Yes |  |
| `entitlements.{key}.resourceType` | `string` | No |  |
| `version` | `integer` | No | If sent, the version must match the current config; at least 1. |
| `updatedAt` | `string` | No | If sent, the update time must match the current config. |
| `updatedBy` | `string` | No | If sent, the updater must match the current config. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `config` | [`IamConfig`](/docs/identityhound/reference/config.md#the-iamconfig-object) | Always |  |

### Errors

-   [`config_invalid`](/docs/identityhound/errors.md#config_invalid) (422)
-   [`stale_version`](/docs/identityhound/errors.md#stale_version) (409)
-   [`trusted_caller_required`](/docs/identityhound/errors.md#trusted_caller_required) (403)

Any operation can also answer with the codes [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X PUT https://api.agentpost.tools/v1/identity/config \
  -H "Authorization: Bearer sk_test_…" \
  -H "If-Match: 3" \
  -H "Content-Type: application/json" \
  -d '{
    "signUp": {
      "mode": "invite_only"
    },
    "signIn": {
      "emailCode": {
        "enabled": true,
        "codeTtl": "10m",
        "resendAfter": "30s"
      },
      "providers": {}
    },
    "sessions": {
      "idleTtl": "7d",
      "maxTtl": "30d"
    },
    "guests": {
      "enabled": false,
      "idleTtl": "30d",
      "createPerIpPerHour": 30
    },
    "accounts": {
      "merge": "off",
      "mergeTicketTtl": "10m"
    },
    "workspaces": {},
    "invitations": {
      "ttl": "7d"
    },
    "delegations": {
      "maxTtl": "30d",
      "tokenTtl": "15m"
    },
    "urls": {
      "signInLink": "https://app.example.com/sign-in",
      "invitationAccept": "https://app.example.com/invitations",
      "oauthReturn": [
        "https://app.example.com/auth/callback"
      ]
    },
    "resourceTypes": {
      "report": {
        "actions": [
          "view",
          "edit",
          "export"
        ]
      }
    },
    "roles": {
      "admin": {
        "name": "Admin",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:*",
          "identity.invitation:*",
          "identity.resource_role:*",
          "identity.grant:view"
        ]
      },
      "member": {
        "name": "Member",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:view",
          "identity.invitation:view",
          "report:view"
        ]
      },
      "editor": {
        "name": "Editor",
        "scope": "resource",
        "assignableTo": [
          "principal",
          "guest"
        ],
        "permissions": [
          "report:view",
          "report:edit"
        ]
      },
      "support": {
        "name": "Support",
        "scope": "project",
        "permissions": [
          "report:view"
        ]
      }
    },
    "entitlements": {
      "reports.export": {
        "description": "Export reports",
        "resourceType": "report"
      },
      "reports.schedule": {
        "description": "Schedule reports by email"
      }
    }
  }'
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'sk_test_…' });
const { config } = await client.config.put(
  {
    signUp: { mode: 'invite_only' },
    signIn: {
      emailCode: { enabled: true, codeTtl: '10m', resendAfter: '30s' },
      providers: {},
    },
    sessions: { idleTtl: '7d', maxTtl: '30d' },
    guests: { enabled: false, idleTtl: '30d', createPerIpPerHour: 30 },
    accounts: { merge: 'off', mergeTicketTtl: '10m' },
    workspaces: {},
    invitations: { ttl: '7d' },
    delegations: { maxTtl: '30d', tokenTtl: '15m' },
    urls: {
      signInLink: 'https://app.example.com/sign-in',
      invitationAccept: 'https://app.example.com/invitations',
      oauthReturn: ['https://app.example.com/auth/callback'],
    },
    resourceTypes: { report: { actions: ['view', 'edit', 'export'] } },
    roles: {
      admin: {
        name: 'Admin',
        scope: 'workspace',
        permissions: [
          'identity.workspace:view',
          'identity.member:*',
          'identity.invitation:*',
          'identity.resource_role:*',
          'identity.grant:view',
        ],
      },
      member: {
        name: 'Member',
        scope: 'workspace',
        permissions: [
          'identity.workspace:view',
          'identity.member:view',
          'identity.invitation:view',
          'report:view',
        ],
      },
      editor: {
        name: 'Editor',
        scope: 'resource',
        assignableTo: ['principal', 'guest'],
        permissions: ['report:view', 'report:edit'],
      },
      support: {
        name: 'Support',
        scope: 'project',
        permissions: ['report:view'],
      },
    },
    entitlements: {
      'reports.export': {
        description: 'Export reports',
        resourceType: 'report',
      },
      'reports.schedule': { description: 'Schedule reports by email' },
    },
  },
  3,
);
```

```json title="Response"
{
  "config": {
    "version": 4,
    "signUp": {
      "mode": "invite_only"
    },
    "signIn": {
      "emailCode": {
        "enabled": true,
        "codeTtl": "10m",
        "resendAfter": "30s"
      },
      "providers": {}
    },
    "sessions": {
      "idleTtl": "7d",
      "maxTtl": "30d"
    },
    "guests": {
      "enabled": false,
      "idleTtl": "30d",
      "createPerIpPerHour": 30
    },
    "accounts": {
      "merge": "off",
      "mergeTicketTtl": "10m"
    },
    "workspaces": {},
    "invitations": {
      "ttl": "7d"
    },
    "delegations": {
      "maxTtl": "30d",
      "tokenTtl": "15m"
    },
    "urls": {
      "signInLink": "https://app.example.com/sign-in",
      "invitationAccept": "https://app.example.com/invitations",
      "oauthReturn": ["https://app.example.com/auth/callback"]
    },
    "resourceTypes": {
      "report": {
        "actions": ["view", "edit", "export"]
      }
    },
    "roles": {
      "admin": {
        "name": "Admin",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:*",
          "identity.invitation:*",
          "identity.resource_role:*",
          "identity.grant:view"
        ]
      },
      "member": {
        "name": "Member",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:view",
          "identity.invitation:view",
          "report:view"
        ]
      },
      "editor": {
        "name": "Editor",
        "scope": "resource",
        "assignableTo": ["principal", "guest"],
        "permissions": ["report:view", "report:edit"]
      },
      "support": {
        "name": "Support",
        "scope": "project",
        "permissions": ["report:view"]
      }
    },
    "entitlements": {
      "reports.export": {
        "description": "Export reports",
        "resourceType": "report"
      },
      "reports.schedule": {
        "description": "Schedule reports by email"
      }
    },
    "updatedAt": "2026-11-13T09:30:00.000Z",
    "updatedBy": "trusted_caller"
  }
}
```

## Validate a config

`POST /config/validate`

Checks the settings without saving them. Saving compares any audit fields you send with the stored config and requires a client secret for each new provider app.

-   **Who may call:** Your server or a signed-in principal.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **SDK:** `client.config.validate(config)`
-   **Idempotency-Key:** not taken. This operation changes nothing, so IdentityHound runs it on every request and it takes no `Idempotency-Key`.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `signUp` | `object` | Yes |  |
| `signUp.mode` | `string` | Yes | One of `"open"`, `"invite_only"`, or `"closed"`. |
| `signIn` | `object` | Yes |  |
| `signIn.emailCode` | `object` | Yes |  |
| `signIn.emailCode.enabled` | `boolean` | Yes |  |
| `signIn.emailCode.codeTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `signIn.emailCode.resendAfter` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `signIn.providers` | `object` | Yes |  |
| `signIn.providers.{key}.provider` | `"twitch"` | Yes |  |
| `signIn.providers.{key}.enabled` | `boolean` | Yes |  |
| `signIn.providers.{key}.clientId` | `string` | Yes |  |
| `signIn.providers.{key}.clientSecret` | `string` | No |  |
| `signIn.providers.{key}.signIn` | `boolean` | Yes |  |
| `signIn.providers.{key}.signInScopes` | `string[]` | Yes |  |
| `signIn.providers.{key}.connectScopes` | `string[]` | Yes |  |
| `sessions` | `object` | Yes |  |
| `sessions.idleTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `sessions.maxTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `guests` | `object` | Yes |  |
| `guests.enabled` | `boolean` | Yes |  |
| `guests.idleTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `guests.createPerIpPerHour` | `integer` | Yes | At least 1. |
| `guests.maxActive` | `integer` | No | The most guests the project holds at once. Unset, there is no limit; at least 1. |
| `accounts` | `object` | Yes |  |
| `accounts.merge` | `"off"` or `"on"` | Yes | With `on`, a principal who links a sign-in method another principal holds gets a merge ticket, and `POST /me/merge` merges that account into its own. With `off`, linking it fails with no ticket and the merge is refused. |
| `accounts.mergeTicketTtl` | `string` | Yes | How long a merge ticket lasts once issued. |
| `workspaces` | `object` | Yes |  |
| `workspaces.maxOwnedPerPrincipal` | `integer` | No | The most active workspaces one principal may own. Unset, there is no limit; at least 1. |
| `invitations` | `object` | Yes |  |
| `invitations.ttl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `delegations` | `object` | Yes |  |
| `delegations.maxTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `delegations.tokenTtl` | `string` | Yes | A duration, such as “10m” or “7d”. |
| `urls` | `object` | Yes |  |
| `urls.signInLink` | `string` | No | The page a sign-in code notification links to, with `email` and `code` added. Unset, the notification carries no link. |
| `urls.invitationAccept` | `string` | No | The page an invitation notification links to, with `token` added. Unset, the notification carries no link. |
| `urls.oauthReturn` | `string[]` | Yes |  |
| `resourceTypes` | `object` | Yes |  |
| `resourceTypes.{key}.actions` | `string[]` | Yes | At least 1. |
| `resourceTypes.{key}.requiresEntitlement` | `object` | No | Each value is a `string`. |
| `roles` | `object` | Yes | Keyed by role. Ordinary roles require `name`, `scope`, and `permissions`. For `owner`, send the permissions it adds to its fixed ones, or omit the entry to add none. Its name, scope, assignee kinds, and built-in marker can be sent back as read. |
| `roles.{key}.name` | `string` | No |  |
| `roles.{key}.scope` | `string` | No | One of `"project"`, `"workspace"`, or `"resource"`. |
| `roles.{key}.permissions` | `string[]` | Yes |  |
| `roles.{key}.assignableTo` | `string[]` | No | Who may hold the role: `["principal"]`, `["guest"]`, or both. `principal` covers every principal that is not a guest, whatever kind it declares. Without a list, any principal that is not a guest may hold it. Each is one of `"principal"` or `"guest"`. |
| `roles.{key}.builtIn` | `boolean` | No |  |
| `entitlements` | `object` | Yes |  |
| `entitlements.{key}.description` | `string` | Yes |  |
| `entitlements.{key}.resourceType` | `string` | No |  |
| `version` | `integer` | No | If sent, the version must match the current config; at least 1. |
| `updatedAt` | `string` | No | If sent, the update time must match the current config. |
| `updatedBy` | `string` | No | If sent, the updater must match the current config. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `valid` | `boolean` | Always |  |
| `issues` | `object[]` | Always |  |
| `issues[].path` | `string` | Always |  |
| `issues[].message` | `string` | Always |  |

### Errors

Only the codes any operation can answer with, which [Conventions](/docs/identityhound/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/identity/config/validate \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "signUp": {
      "mode": "invite_only"
    },
    "signIn": {
      "emailCode": {
        "enabled": true,
        "codeTtl": "10m",
        "resendAfter": "30s"
      },
      "providers": {}
    },
    "sessions": {
      "idleTtl": "7d",
      "maxTtl": "30d"
    },
    "guests": {
      "enabled": false,
      "idleTtl": "30d",
      "createPerIpPerHour": 30
    },
    "accounts": {
      "merge": "off",
      "mergeTicketTtl": "10m"
    },
    "workspaces": {},
    "invitations": {
      "ttl": "7d"
    },
    "delegations": {
      "maxTtl": "30d",
      "tokenTtl": "15m"
    },
    "urls": {
      "signInLink": "https://app.example.com/sign-in",
      "invitationAccept": "https://app.example.com/invitations",
      "oauthReturn": [
        "https://app.example.com/auth/callback"
      ]
    },
    "resourceTypes": {
      "report": {
        "actions": [
          "view",
          "edit",
          "export"
        ]
      }
    },
    "roles": {
      "admin": {
        "name": "Admin",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:*",
          "identity.invitation:*",
          "identity.resource_role:*",
          "identity.grant:view"
        ]
      },
      "member": {
        "name": "Member",
        "scope": "workspace",
        "permissions": [
          "identity.workspace:view",
          "identity.member:view",
          "identity.invitation:view",
          "report:view"
        ]
      },
      "editor": {
        "name": "Editor",
        "scope": "resource",
        "assignableTo": [
          "principal",
          "guest"
        ],
        "permissions": [
          "report:view",
          "report:edit"
        ]
      },
      "support": {
        "name": "Support",
        "scope": "project",
        "permissions": [
          "report:view"
        ]
      }
    },
    "entitlements": {
      "reports.export": {
        "description": "Export reports",
        "resourceType": "report"
      },
      "reports.schedule": {
        "description": "Schedule reports by email"
      }
    }
  }'
```

```ts tab="SDK"
import { createClient } from '@agentpost-tools/identityhound-sdk';

const client = createClient({ token: 'sk_test_…' });
const { valid, issues } = await client.config.validate({
  signUp: { mode: 'invite_only' },
  signIn: {
    emailCode: { enabled: true, codeTtl: '10m', resendAfter: '30s' },
    providers: {},
  },
  sessions: { idleTtl: '7d', maxTtl: '30d' },
  guests: { enabled: false, idleTtl: '30d', createPerIpPerHour: 30 },
  accounts: { merge: 'off', mergeTicketTtl: '10m' },
  workspaces: {},
  invitations: { ttl: '7d' },
  delegations: { maxTtl: '30d', tokenTtl: '15m' },
  urls: {
    signInLink: 'https://app.example.com/sign-in',
    invitationAccept: 'https://app.example.com/invitations',
    oauthReturn: ['https://app.example.com/auth/callback'],
  },
  resourceTypes: { report: { actions: ['view', 'edit', 'export'] } },
  roles: {
    admin: {
      name: 'Admin',
      scope: 'workspace',
      permissions: [
        'identity.workspace:view',
        'identity.member:*',
        'identity.invitation:*',
        'identity.resource_role:*',
        'identity.grant:view',
      ],
    },
    member: {
      name: 'Member',
      scope: 'workspace',
      permissions: [
        'identity.workspace:view',
        'identity.member:view',
        'identity.invitation:view',
        'report:view',
      ],
    },
    editor: {
      name: 'Editor',
      scope: 'resource',
      assignableTo: ['principal', 'guest'],
      permissions: ['report:view', 'report:edit'],
    },
    support: {
      name: 'Support',
      scope: 'project',
      permissions: ['report:view'],
    },
  },
  entitlements: {
    'reports.export': { description: 'Export reports', resourceType: 'report' },
    'reports.schedule': { description: 'Schedule reports by email' },
  },
});
```

```json title="Response"
{
  "valid": true,
  "issues": []
}
```

## The IamConfig object

The project’s config in the API’s answer. Provider client secrets are write-only: `PUT /config` takes `clientSecret`, and the stored document holds `clientSecretEnc`, which never leaves the service.

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `version` | `number` | Always |  |
| `signUp` | `object` | Always |  |
| `signUp.mode` | `string` | Always | One of `"open"`, `"invite_only"`, or `"closed"`. |
| `signIn` | `object` | Always |  |
| `signIn.emailCode` | `object` | Always |  |
| `signIn.emailCode.enabled` | `boolean` | Always |  |
| `signIn.emailCode.codeTtl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `signIn.emailCode.resendAfter` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `signIn.providers` | `object` | Always |  |
| `signIn.providers.{key}.provider` | `"twitch"` | Always |  |
| `signIn.providers.{key}.enabled` | `boolean` | Always |  |
| `signIn.providers.{key}.clientId` | `string` | Always |  |
| `signIn.providers.{key}.signIn` | `boolean` | Always |  |
| `signIn.providers.{key}.signInScopes` | `string[]` | Always |  |
| `signIn.providers.{key}.connectScopes` | `string[]` | Always |  |
| `sessions` | `object` | Always |  |
| `sessions.idleTtl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `sessions.maxTtl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `guests` | `object` | Always |  |
| `guests.enabled` | `boolean` | Always |  |
| `guests.idleTtl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `guests.createPerIpPerHour` | `number` | Always |  |
| `guests.maxActive` | `number` | When set |  |
| `accounts` | `object` | Always |  |
| `accounts.merge` | `"off"` or `"on"` | Always |  |
| `accounts.mergeTicketTtl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `workspaces` | `object` | Always |  |
| `workspaces.maxOwnedPerPrincipal` | `number` | When set |  |
| `invitations` | `object` | Always |  |
| `invitations.ttl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `delegations` | `object` | Always |  |
| `delegations.maxTtl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `delegations.tokenTtl` | `string` | Always | A length of time as a request, a record, or a config holds it, such as `"30d"`. |
| `urls` | `object` | Always |  |
| `urls.signInLink` | `string` | When set |  |
| `urls.invitationAccept` | `string` | When set |  |
| `urls.oauthReturn` | `string[]` | Always |  |
| `resourceTypes` | `object` | Always |  |
| `resourceTypes.{key}.actions` | `string[]` | Always |  |
| `resourceTypes.{key}.requiresEntitlement` | `object` | When set | Each value is a `string`. |
| `roles` | `object` | Always |  |
| `roles.{key}.name` | `string` | Always |  |
| `roles.{key}.scope` | `string` | Always | One of `"project"`, `"workspace"`, or `"resource"`. |
| `roles.{key}.permissions` | `string[]` | Always |  |
| `roles.{key}.assignableTo` | `string[]` | When set | Each is one of `"principal"` or `"guest"`. |
| `roles.{key}.builtIn` | `true` | When set |  |
| `entitlements` | `object` | Always |  |
| `entitlements.{key}.description` | `string` | Always |  |
| `entitlements.{key}.resourceType` | `string` | When set |  |
| `updatedAt` | `string` | Always | An ISO 8601 date and time. |
| `updatedBy` | `string` | Always | Who saved this version: a principal’s ID, `trusted_caller` for your server’s secret key, or `adopt` for the config the project adopted IdentityHound with, which a project adopted before November 2026 shows as `system`. A principal ID, `prn_…`, or one of `"trusted_caller"`, `"adopt"`, or `"system"`. |

```json title="The IamConfig object"
{
  "version": 3,
  "signUp": {
    "mode": "invite_only"
  },
  "signIn": {
    "emailCode": {
      "enabled": true,
      "codeTtl": "10m",
      "resendAfter": "30s"
    },
    "providers": {}
  },
  "sessions": {
    "idleTtl": "7d",
    "maxTtl": "30d"
  },
  "guests": {
    "enabled": false,
    "idleTtl": "30d",
    "createPerIpPerHour": 30
  },
  "accounts": {
    "merge": "off",
    "mergeTicketTtl": "10m"
  },
  "workspaces": {},
  "invitations": {
    "ttl": "7d"
  },
  "delegations": {
    "maxTtl": "30d",
    "tokenTtl": "15m"
  },
  "urls": {
    "signInLink": "https://app.example.com/sign-in",
    "invitationAccept": "https://app.example.com/invitations",
    "oauthReturn": ["https://app.example.com/auth/callback"]
  },
  "resourceTypes": {
    "report": {
      "actions": ["view", "edit", "export"]
    }
  },
  "roles": {
    "admin": {
      "name": "Admin",
      "scope": "workspace",
      "permissions": [
        "identity.workspace:view",
        "identity.member:*",
        "identity.invitation:*",
        "identity.resource_role:*",
        "identity.grant:view"
      ]
    },
    "member": {
      "name": "Member",
      "scope": "workspace",
      "permissions": [
        "identity.workspace:view",
        "identity.member:view",
        "identity.invitation:view",
        "report:view"
      ]
    },
    "editor": {
      "name": "Editor",
      "scope": "resource",
      "assignableTo": ["principal", "guest"],
      "permissions": ["report:view", "report:edit"]
    },
    "support": {
      "name": "Support",
      "scope": "project",
      "permissions": ["report:view"]
    }
  },
  "entitlements": {
    "reports.export": {
      "description": "Export reports",
      "resourceType": "report"
    },
    "reports.schedule": {
      "description": "Schedule reports by email"
    }
  },
  "updatedAt": "2026-11-13T09:30:00.000Z",
  "updatedBy": "trusted_caller"
}
```
