Skip to content
Hoody.com

API tokens provide long-lived credentials for authenticating to the Hoody control plane from scripts, CI/CD pipelines, and external integrations. Each token carries fine-grained permissions, optional IP restrictions, optional realm scoping, and an optional expiration. Tokens support delegation—child tokens inherit a subset of the parent’s permissions and can be revoked independently.

Use the endpoints below to list, create, inspect, update, copy, and revoke tokens, and to manage their realm associations and public profile metadata.

List all auth tokens for the authenticated user. Token secret values are not included. The result may include tokens in the caller’s delegation subtree; if that fanout is capped, the top-level truncated flag is set to true.

This endpoint takes no parameters.

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

Get details for a specific auth token by its 24-character hex ID. Token secret value is not included.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the token
Terminal window
curl -X GET "https://api.hoody.com/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 host so realm-scoped tokens can bootstrap realm discovery.

This endpoint takes no parameters.

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

GET /api/v1/auth/tokens/public-profiles/{public_key}

Section titled “GET /api/v1/auth/tokens/public-profiles/{public_key}”

Resolve and retrieve an auth token’s public profile storage by its ED25519 public key. The public key must be exactly 64 hexadecimal characters.

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

List the permission-template catalog with each template’s resolved permission tree. This is read-only, contains no secrets, and is used by token-creation UIs to offer delegation without mirroring server templates client-side.

This endpoint takes no parameters.

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

Create a new long-term auth token with optional IP restrictions, expiration, and fine-grained permissions. The full token secret is returned only in this response—store it immediately.

If 2FA is enabled on the account and you are authenticating with a JWT (rather than another auth token), include otp_code in the body.

This endpoint takes no parameters.

FieldTypeRequiredDescription
aliasstringNoUser-friendly alias. Allowed characters: letters, numbers, spaces, underscores, hyphens. If omitted, a random animal name is generated.
public_keystring | nullNoED25519 public key as a 64-character hexadecimal string. Set to null to clear.
public_storageobject | nullNoArbitrary public JSON profile (max 64KB serialized). Set to null to clear.
ip_whitelistarray | stringNoIPv4 addresses or CIDR ranges, a comma-separated string, or * to allow all. Defaults to *.
permission_templatestringNoPredefined template name. Takes precedence over permissions. One of: full_access, external_customer, dev_team, finance_team, read_only.
permissionsobjectNoFine-grained permission tree. Any missing path defaults to deny.
realm_idsarrayNo24-character hex realm IDs this token is restricted to.
allow_no_realmbooleanNoWhether the token may be used on the base host. Defaults to true. Set to false for strict sub-account tokens.
vault_accessbooleanNoWhether the token can access user vault endpoints. Defaults to false.
event_accessbooleanNoWhether the token can access event streams and history. Defaults to true.
deny_reauthorizationbooleanNoOpt-in least-privilege belt. Strips create_tokens/vault permission leaves, forces vault_access=false, and forces a bounded expiry. Rejected with 400 if combined with explicit grants.
expires_atstring | numberNoISO 8601 string, Unix timestamp, "today", "tomorrow", or omit for non-expiring.
otp_codestringNoTOTP (6 digits) or backup code (10 alphanumeric). Required if account has 2FA enabled and you are authenticating via JWT.
Terminal window
curl -X POST "https://api.hoody.com/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
}'

Update an existing auth token. You may change the alias, public key/profile storage, IP restrictions, expiration, enabled status, and permissions.

If 2FA is enabled on the account and you are authenticating with a JWT (rather than another auth token), include otp_code in the body.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the token to update
FieldTypeRequiredDescription
aliasstringNoNew alias. Allowed characters: letters, numbers, spaces, underscores, hyphens.
public_keystring | nullNoNew ED25519 public key (64 hex chars), or null to clear.
public_storageobject | nullNoNew public JSON profile (max 64KB), or null to clear.
ip_whitelistarray | stringNoIPv4 addresses or CIDR ranges, comma-separated string, or *.
permissionsobjectNoReplacement permission tree. Missing paths default to deny.
realm_idsarrayNoReplacement list of 24-character hex realm IDs.
allow_no_realmbooleanNoWhether the token may be used on the base host.
vault_accessbooleanNoWhether the token can access user vault endpoints.
event_accessbooleanNoWhether the token can access event streams and history.
expires_atstring | number | nullNoISO 8601 string, Unix timestamp, "today", "tomorrow", or null.
is_enabledbooleanNoEnable or disable the token.
otp_codestringNoTOTP or backup code. Required if account has 2FA enabled and you are authenticating via JWT.
Terminal window
curl -X PUT "https://api.hoody.com/api/v1/auth/tokens/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"alias": "Updated Production Key",
"ip_whitelist": ["*"],
"vault_access": false,
"expires_at": null,
"is_enabled": false
}'

Copy an existing auth token’s configuration—permissions, realm restrictions, IP whitelist—into a new token with a fresh secret value. Optionally override the alias and expiration on the copy.

If 2FA is enabled on the account and you are authenticating with a JWT (rather than another auth token), include otp_code in the body.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the source token to copy
FieldTypeRequiredDescription
aliasstringNoAlias for the copied token. If omitted, a deterministic &lt;source&gt; copy alias is generated.
expires_atstring | number | nullNoExpiration override. If omitted, the source expiration is copied when still in the future.
otp_codestringNoTOTP or backup code. Required if account has 2FA enabled and you are authenticating via JWT.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/auth/tokens/507f1f77bcf86cd799439011/copy" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"alias": "Production API Key Copy"
}'

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

This endpoint takes no parameters.

FieldTypeRequiredDescription
public_keystring | nullNoNew ED25519 public key (64 hex chars), or null to clear.
public_storageobject | nullNoNew public JSON profile (max 64KB), or null to clear.
Terminal window
curl -X PUT "https://api.hoody.com/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"
}
}'

Atomically add a realm ID to an auth token’s realm_ids. Idempotent: if the realm is already present, the call succeeds without modification.

If 2FA is enabled on the account and you are authenticating with a JWT (rather than another auth token), include otp_code in the body.

NameInTypeRequiredDescription
idpathstringYesAuth token ID
FieldTypeRequiredDescription
realm_idstringYes24-character hex realm ID to add to the token.
otp_codestringNoTOTP or backup code. Required if account has 2FA enabled and you are authenticating via JWT.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/auth/tokens/507f1f77bcf86cd799439011/add-realm" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"realm_id": "507f1f77bcf86cd799439012"
}'

POST /api/v1/auth/tokens/{id}/remove-realm

Section titled “POST /api/v1/auth/tokens/{id}/remove-realm”

Atomically remove a realm ID from an auth token’s realm_ids. Idempotent: if the realm is not present, the call succeeds without modification.

If 2FA is enabled on the account and you are authenticating with a JWT (rather than another auth token), include otp_code in the body.

NameInTypeRequiredDescription
idpathstringYesAuth token ID
FieldTypeRequiredDescription
realm_idstringYes24-character hex realm ID to remove from the token.
otp_codestringNoTOTP or backup code. Required if account has 2FA enabled and you are authenticating via JWT.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/auth/tokens/507f1f77bcf86cd799439011/remove-realm" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"realm_id": "507f1f77bcf86cd799439012"
}'

Permanently delete an auth token. Once deleted, the token can no longer be used for authentication. This action cannot be undone—mint a new token if you need to restore access.

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