Skip to content
Hoody.com

The API tokens endpoints let you mint, inspect, update, copy, and revoke long-lived authentication tokens used for programmatic access and automation. Use them to issue scoped credentials for CI jobs, external integrations, and delegated sub-accounts, with optional IP restrictions, realm scoping, and time-bound expiry.

Return all auth tokens belonging to the authenticated user. Token values are never included in the response — only metadata, permissions, and usage state.

This endpoint takes no parameters.

Terminal window
curl https://api.hoody.icu/api/v1/auth/tokens \
-H "Authorization: Bearer <token>"

Retrieve the full metadata of a single auth token by its ID. The token value itself is not returned.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the token
Terminal window
curl https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H "Authorization: Bearer <token>"

Return metadata, permissions, and realm restrictions for the currently authenticated auth token. This endpoint is allowed on the base API for realm-scoped tokens to bootstrap realm discovery.

This endpoint takes no parameters.

Terminal window
curl https://api.hoody.icu/api/v1/auth/tokens/me \
-H "Authorization: Bearer <token>"

Get auth token public profile by public key

Section titled “Get auth token public profile by public key”

Resolve and retrieve an auth token public profile storage object by ED25519 public key.

NameInTypeRequiredDescription
public_keypathstringYesED25519 public key to resolve
Terminal window
curl https://api.hoody.icu/api/v1/auth/tokens/public-profiles/a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 \
-H "Authorization: Bearer <token>"

List the permission-template catalog with each template’s resolved permission tree (read-only; no secrets). Used by the token-creation UI to offer delegation without mirroring server templates client-side.

This endpoint takes no parameters.

Terminal window
curl https://api.hoody.icu/api/v1/auth/tokens/templates \
-H "Authorization: Bearer <token>"

Create a new long-term authentication token with optional IP restrictions, realm scoping, and expiration. The full token value is returned exactly once in the response.

This endpoint takes no parameters.

NameTypeRequiredDescription
aliasstringNoUser-friendly alias for the token. If not provided, a random animal name is generated (e.g., clever-dolphin).
public_keystring | nullNoOptional ED25519 public key as a 64-character hexadecimal string.
public_storageobject | nullNoOptional public JSON profile storage, max 64KB serialized.
ip_whitelistarray | stringNoIPv4 addresses/CIDR ranges, comma-separated string, or *. Defaults to *.
permission_templatestringNoOptional template name. Takes precedence over permissions if provided. Templates: full_access, external_customer, dev_team, finance_team, read_only.
permissionsobjectNoFine-grained permissions for this token. Missing paths default to false (deny).
realm_idsarrayNoList of realm IDs this token is restricted to.
allow_no_realmbooleanNoWhether this token can be used without a realm scope. Defaults to true.
vault_accessbooleanNoWhether this token can access user vault endpoints. Defaults to false.
event_accessbooleanNoWhether this token can access event streams and history. Defaults to true.
deny_reauthorizationbooleanNoProduce a locked-down leaf: strips create_tokens and vault, forces vault_access to false, forces a non-permanent expiry. Rejected with 400 if combined with explicit create_tokens/vault/vault_access grants.
expires_atstring | string | numberNoISO 8601 date, Unix timestamp, today, or tomorrow. Omit for non-expiring.
otp_codestringNoTOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
Terminal window
curl -X POST https://api.hoody.icu/api/v1/auth/tokens \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"alias": "Production API Key",
"public_key": "a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234",
"public_storage": {
"display_name": "Production Integrations",
"tier": "gold"
},
"ip_whitelist": ["192.168.1.0/24", "10.0.0.1"],
"vault_access": true,
"expires_at": 1767225599000
}'

Atomically add a realm ID to an auth token. Idempotent — if the realm is already present, returns success without modification.

NameInTypeRequiredDescription
idpathstringYesAuth token ID
NameTypeRequiredDescription
realm_idstringYesRealm ID to add to the token.
otp_codestringNoTOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
Terminal window
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/add-realm \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"realm_id": "507f1f77bcf86cd799439033"
}'

Copy an existing auth token’s configuration (permissions, realm restrictions, IP whitelist) into a new token with a new secret value.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the token
NameTypeRequiredDescription
aliasstringNoOptional alias for the copied token. If omitted, a deterministic alias like &lt;source&gt; copy is generated.
expires_atstring | string | number | nullNoOptional expiration override. If omitted, the source expiration is copied when still in the future.
otp_codestringNoTOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
Terminal window
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/copy \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"alias": "Production API Key Copy"
}'

Atomically remove a realm ID from an auth token. Idempotent — if the realm is not present, returns success without modification.

NameInTypeRequiredDescription
idpathstringYesAuth token ID
NameTypeRequiredDescription
realm_idstringYesRealm ID to remove from the token.
otp_codestringNoTOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
Terminal window
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/remove-realm \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"realm_id": "507f1f77bcf86cd799439033"
}'

Update an existing auth token’s alias, public key/profile storage, IP restrictions, permissions, realm scope, expiration, or enabled status.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the token to update
NameTypeRequiredDescription
aliasstringNoUser-friendly alias for the token.
public_keystring | nullNoED25519 public key as a 64-character hexadecimal string, or null to clear.
public_storageobject | nullNoPublic JSON profile storage (max 64KB), or null to clear.
ip_whitelistarray | stringNoIPv4 addresses/CIDR ranges, comma-separated string, or *.
permissionsobjectNoFine-grained permissions. Missing paths default to false.
realm_idsarrayNoList of realm IDs this token is restricted to.
allow_no_realmbooleanNoWhether this token can be used without a realm scope.
vault_accessbooleanNoWhether this token can access user vault endpoints.
event_accessbooleanNoWhether this token can access event streams and history.
expires_atstring | string | number | nullNoISO 8601 date, Unix timestamp, today, tomorrow, or null for non-expiring.
is_enabledbooleanNoEnable or disable the token.
otp_codestringNoTOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
Terminal window
curl -X PUT https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"alias": "Updated Production Key",
"ip_whitelist": ["*"],
"vault_access": false,
"is_enabled": false
}'

Update the current auth token’s public_key and public_storage payload. Requires the resources.auth_token_public_profile permission on the token.

This endpoint takes no parameters.

NameTypeRequiredDescription
public_keystring | nullNoED25519 public key as a 64-character hexadecimal string, or null to clear.
public_storageobject | nullNoPublic JSON profile storage (max 64KB), or null to clear.

At least one of public_key or public_storage must be supplied.

Terminal window
curl -X PUT https://api.hoody.icu/api/v1/auth/tokens/me/public-profile \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"public_key": "a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234",
"public_storage": {
"username_hint": "acme-team",
"avatar": "https://cdn.example.com/avatar.png"
}
}'

Permanently delete an auth token. After deletion, the token can no longer be used for authentication.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the token
Terminal window
curl -X DELETE https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H "Authorization: Bearer <token>"