Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

Config

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

Roles explains resource types, permissions, and roles, and Entitlements the catalog.

Paths are relative to https://api.agentpost.tools/v1/identity, and every request follows the API basics. 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 Always

Errors

Any operation can also answer with the codes Conventions lists.

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

Errors

Any operation can also answer with the codes Conventions lists.

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 lists.

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".