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.
curl https://api.hoody.icu/api/v1/auth/tokens \
-H " Authorization: Bearer <token> "
const tokens = await client . api . authTokens . listIterator ();
" message " : " Auth tokens retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " Production API Key " ,
" ip_whitelist " : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
" expires_at " : " 2025-12-31T23:59:59.000Z " ,
" last_used_at " : " 2025-10-28T12:00:00.000Z " ,
" last_used_ip " : " 198.51.100.1 " ,
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" id " : " 507f1f77bcf86cd799439022 " ,
" alias " : " Development Token " ,
" realm_ids " : [ " 507f1f77bcf86cd799439011 " ],
" created_at " : " 2025-01-10T08:00:00.000Z " ,
" updated_at " : " 2025-01-10T08:00:00.000Z "
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
Retrieve the full metadata of a single auth token by its ID. The token value itself is not returned.
Name In Type Required Description idpath string Yes Unique identifier of the token
curl https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H " Authorization: Bearer <token> "
const token = await client . api . authTokens . get ( " 507f1f77bcf86cd799439011 " );
" message " : " Auth token retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " Production API Key " ,
" ip_whitelist " : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
" expires_at " : " 2025-12-31T23:59:59.000Z " ,
" last_used_at " : " 2025-10-28T12:00:00.000Z " ,
" last_used_ip " : " 198.51.100.1 " ,
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" message " : " Invalid ID format "
Error Code Title Description Resolution INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f)
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
" message " : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
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.
curl https://api.hoody.icu/api/v1/auth/tokens/me \
-H " Authorization: Bearer <token> "
const me = await client . api . authTokens . getCurrent ();
" message " : " Current auth token retrieved successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " External Customer Token " ,
" realm_ids " : [ " 507f1f77bcf86cd799439012 " ],
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T10:30:00.000Z "
" has_realm_restrictions " : true ,
" requires_realm_scope " : true ,
" allowed_realm_ids " : [ " 507f1f77bcf86cd799439012 " ],
" active_realm_id " : " 507f1f77bcf86cd799439012 "
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
" message " : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access
Resolve and retrieve an auth token public profile storage object by ED25519 public key.
Name In Type Required Description public_keypath string Yes ED25519 public key to resolve
curl https://api.hoody.icu/api/v1/auth/tokens/public-profiles/a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 \
-H " Authorization: Bearer <token> "
const profile = await client . api . authTokens . getPublicProfile (
" a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 "
" message " : " Auth token public profile retrieved successfully " ,
" public_key " : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
" display_name " : " Acme Integrations " ,
" message " : " Invalid public key format "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
" message " : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
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.
curl https://api.hoody.icu/api/v1/auth/tokens/templates \
-H " Authorization: Bearer <token> "
const templates = await client . api . authTokens . listAuthTokenPermissionTemplates ();
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.
Name Type Required Description aliasstring No User-friendly alias for the token. If not provided, a random animal name is generated (e.g., clever-dolphin). public_keystring | null No Optional ED25519 public key as a 64-character hexadecimal string. public_storageobject | null No Optional public JSON profile storage, max 64KB serialized. ip_whitelistarray | string No IPv4 addresses/CIDR ranges, comma-separated string, or *. Defaults to *. permission_templatestring No Optional template name. Takes precedence over permissions if provided. Templates: full_access, external_customer, dev_team, finance_team, read_only. permissionsobject No Fine-grained permissions for this token. Missing paths default to false (deny). realm_idsarray No List of realm IDs this token is restricted to. allow_no_realmboolean No Whether this token can be used without a realm scope. Defaults to true. vault_accessboolean No Whether this token can access user vault endpoints. Defaults to false. event_accessboolean No Whether this token can access event streams and history. Defaults to true. deny_reauthorizationboolean No Produce 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 | number No ISO 8601 date, Unix timestamp, today, or tomorrow. Omit for non-expiring. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "Production API Key",
"public_key": "a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234",
"display_name": "Production Integrations",
"ip_whitelist": ["192.168.1.0/24", "10.0.0.1"],
"expires_at": 1767225599000
const created = await client . api . authTokens . create ({
alias : " Production API Key " ,
public_key : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
display_name : " Production Integrations " ,
ip_whitelist : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
expires_at : 1767225599000
" message " : " Auth token created successfully " ,
" token " : " hdy_a1b2c3d4e5f67890abcdef1234567890 " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " Production API Key " ,
" public_key " : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
" ip_whitelist " : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
" expires_at " : " 2025-12-31T23:59:59.000Z " ,
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T10:30:00.000Z "
" message " : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input MISSING_REQUIRED_FIELDRequired field missing One or more required fields are missing from the request Include all required fields as specified in the API documentation OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_ALIAS_FORMATInvalid alias format Token alias must contain only letters, numbers, spaces, underscores, and hyphens Use only allowed characters: letters (a-z, A-Z), numbers (0-9), spaces, underscores (_), and hyphens (-) INVALID_IP_FORMATInvalid IP address format IP whitelist must contain valid IPv4 addresses or CIDR ranges Provide valid IPv4 addresses (e.g., 192.168.1.1) or CIDR ranges (e.g., 192.168.1.0/24), or use * for all IPs INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011) INVALID_EXPIRATION_FORMATInvalid expiration format Expiration must be an ISO 8601 date, Unix timestamp, today, tomorrow, or null Use a valid date format: ISO 8601 string, Unix timestamp (seconds/milliseconds), today, tomorrow, or null for non-expiring INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format PUBLIC_STORAGE_TOO_LARGEPublic storage exceeds size limit public_storage must not exceed 64KB serialized JSONReduce the size of the public storage payload and retry EXPIRATION_IN_PASTExpiration date in the past The expiration date cannot be in the past Provide a future date for token expiration DUPLICATE_ALIASToken alias already exists You already have an authentication token with this alias Choose a different unique alias for this token
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
Atomically add a realm ID to an auth token. Idempotent — if the realm is already present, returns success without modification.
Name In Type Required Description idpath string Yes Auth token ID
Name Type Required Description realm_idstring Yes Realm ID to add to the token. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/add-realm \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"realm_id": "507f1f77bcf86cd799439033"
const updated = await client . api . authTokens . addRealm (
" 507f1f77bcf86cd799439011 " ,
{ realm_id : " 507f1f77bcf86cd799439033 " }
" message " : " Realm added to auth token successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " Production API Key " ,
" ip_whitelist " : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
" realm_ids " : [ " 507f1f77bcf86cd799439033 " ],
" expires_at " : " 2025-12-31T23:59:59.000Z " ,
" last_used_at " : " 2025-10-28T12:00:00.000Z " ,
" last_used_ip " : " 198.51.100.1 " ,
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" message " : " 2FA verification required for this operation "
Error Code Title Description Resolution OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011)
" message " : " Authentication token required "
" message " : " Authentication token not found "
Copy an existing auth token’s configuration (permissions, realm restrictions, IP whitelist) into a new token with a new secret value.
Name In Type Required Description idpath string Yes Unique identifier of the token
Name Type Required Description aliasstring No Optional alias for the copied token. If omitted, a deterministic alias like <source> copy is generated. expires_atstring | string | number | null No Optional expiration override. If omitted, the source expiration is copied when still in the future. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/copy \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "Production API Key Copy"
const copy = await client . api . authTokens . copy (
" 507f1f77bcf86cd799439011 " ,
{ alias : " Production API Key Copy " }
" message " : " Auth token copied successfully " ,
" token " : " hdy_f0e1d2c3b4a5968778695a4b3c2d1e0f1234567890abcdef " ,
" id " : " 507f1f77bcf86cd799439099 " ,
" alias " : " Production API Key Copy " ,
" ip_whitelist " : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
" realm_ids " : [ " 507f1f77bcf86cd799439011 " ],
" expires_at " : " 2025-12-31T23:59:59.000Z " ,
" created_at " : " 2025-01-20T08:30:00.000Z " ,
" updated_at " : " 2025-01-20T08:30:00.000Z "
" message " : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f) OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_ALIAS_FORMATInvalid alias format Token alias must contain only letters, numbers, spaces, underscores, and hyphens Use only allowed characters: letters (a-z, A-Z), numbers (0-9), spaces, underscores (_), and hyphens (-) INVALID_EXPIRATION_FORMATInvalid expiration format Expiration must be an ISO 8601 date, Unix timestamp, today, tomorrow, or null Use a valid date format: ISO 8601 string, Unix timestamp (seconds/milliseconds), today, tomorrow, or null for non-expiring EXPIRATION_IN_PASTExpiration date in the past The expiration date cannot be in the past Provide a future date for token expiration DUPLICATE_ALIASToken alias already exists You already have an authentication token with this alias Choose a different unique alias for this token
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
" message " : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status
" message " : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
Atomically remove a realm ID from an auth token. Idempotent — if the realm is not present, returns success without modification.
Name In Type Required Description idpath string Yes Auth token ID
Name Type Required Description realm_idstring Yes Realm ID to remove from the token. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
curl -X POST https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011/remove-realm \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"realm_id": "507f1f77bcf86cd799439033"
const updated = await client . api . authTokens . removeRealm (
" 507f1f77bcf86cd799439011 " ,
{ realm_id : " 507f1f77bcf86cd799439033 " }
" message " : " Realm removed from auth token successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " Production API Key " ,
" ip_whitelist " : [ " 192.168.1.0/24 " , " 10.0.0.1 " ],
" expires_at " : " 2025-12-31T23:59:59.000Z " ,
" last_used_at " : " 2025-10-28T12:00:00.000Z " ,
" last_used_ip " : " 198.51.100.1 " ,
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" message " : " 2FA verification required for this operation "
Error Code Title Description Resolution OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011)
" message " : " Authentication token required "
" message " : " Authentication token not found "
Update an existing auth token’s alias, public key/profile storage, IP restrictions, permissions, realm scope, expiration, or enabled status.
Name In Type Required Description idpath string Yes Unique identifier of the token to update
Name Type Required Description aliasstring No User-friendly alias for the token. public_keystring | null No ED25519 public key as a 64-character hexadecimal string, or null to clear. public_storageobject | null No Public JSON profile storage (max 64KB), or null to clear. ip_whitelistarray | string No IPv4 addresses/CIDR ranges, comma-separated string, or *. permissionsobject No Fine-grained permissions. Missing paths default to false. realm_idsarray No List of realm IDs this token is restricted to. allow_no_realmboolean No Whether this token can be used without a realm scope. vault_accessboolean No Whether this token can access user vault endpoints. event_accessboolean No Whether this token can access event streams and history. expires_atstring | string | number | null No ISO 8601 date, Unix timestamp, today, tomorrow, or null for non-expiring. is_enabledboolean No Enable or disable the token. otp_codestring No TOTP code (6 digits) or backup code (10 alphanumeric). Required if 2FA is enabled and authenticating via JWT.
curl -X PUT https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "Updated Production Key",
const updated = await client . api . authTokens . update (
" 507f1f77bcf86cd799439011 " ,
alias : " Updated Production Key " ,
" message " : " Auth token updated successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " Updated Production Key " ,
" public_key " : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
" last_used_at " : " 2025-10-28T12:00:00.000Z " ,
" last_used_ip " : " 198.51.100.1 " ,
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T14:45:00.000Z "
" message " : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f) OTP_REQUIRED2FA verification required This operation requires 2FA verification because your account has 2FA enabled Provide an otp_code field with a valid TOTP code or backup code INVALID_ALIAS_FORMATInvalid alias format Token alias must contain only letters, numbers, spaces, underscores, and hyphens Use only allowed characters: letters (a-z, A-Z), numbers (0-9), spaces, underscores (_), and hyphens (-) INVALID_IP_FORMATInvalid IP address format IP whitelist must contain valid IPv4 addresses or CIDR ranges Provide valid IPv4 addresses (e.g., 192.168.1.1) or CIDR ranges (e.g., 192.168.1.0/24), or use * for all IPs INVALID_REALM_ID_FORMATInvalid realm ID format Realm IDs must be 24-character hexadecimal strings Ensure all realm IDs are valid 24-character hex strings (e.g., 507f1f77bcf86cd799439011) INVALID_EXPIRATION_FORMATInvalid expiration format Expiration must be an ISO 8601 date, Unix timestamp, today, tomorrow, or null Use a valid date format: ISO 8601 string, Unix timestamp (seconds/milliseconds), today, tomorrow, or null for non-expiring INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format PUBLIC_STORAGE_TOO_LARGEPublic storage exceeds size limit public_storage must not exceed 64KB serialized JSONReduce the size of the public storage payload and retry EXPIRATION_IN_PASTExpiration date in the past The expiration date cannot be in the past Provide a future date for token expiration DUPLICATE_ALIASToken alias already exists You already have an authentication token with this alias Choose a different unique alias for this token
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
" message " : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists
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.
Name Type Required Description public_keystring | null No ED25519 public key as a 64-character hexadecimal string, or null to clear. public_storageobject | null No Public JSON profile storage (max 64KB), or null to clear.
At least one of public_key or public_storage must be supplied.
curl -X PUT https://api.hoody.icu/api/v1/auth/tokens/me/public-profile \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"public_key": "a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234",
"username_hint": "acme-team",
"avatar": "https://cdn.example.com/avatar.png"
const updated = await client . api . authTokens . updatePublicProfile ({
public_key : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
username_hint : " acme-team " ,
avatar : " https://cdn.example.com/avatar.png "
" message " : " Public profile updated successfully " ,
" id " : " 507f1f77bcf86cd799439011 " ,
" alias " : " External Customer Token " ,
" public_key " : " a1b2c3d4e5f6789012345678901234567890abcdefabcdefabcdefabcdef1234 " ,
" username_hint " : " acme-team " ,
" avatar " : " https://cdn.example.com/avatar.png "
" realm_ids " : [ " 507f1f77bcf86cd799439012 " ],
" created_at " : " 2025-01-15T10:30:00.000Z " ,
" updated_at " : " 2025-01-15T15:00:00.000Z "
" message " : " Validation failed "
Error Code Title Description Resolution VALIDATION_ERRORInvalid input parameters One or more request parameters failed validation Check the error message for specific field requirements and correct your input INVALID_PUBLIC_KEY_FORMATInvalid public key format Public key must be exactly 64 hexadecimal characters (ED25519 format) Provide a valid 64-character ED25519 public key in hexadecimal format PUBLIC_STORAGE_TOO_LARGEPublic storage exceeds size limit public_storage must not exceed 64KB serialized JSONReduce the size of the public storage payload and retry
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
" message " : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access
Permanently delete an auth token. After deletion, the token can no longer be used for authentication.
Name In Type Required Description idpath string Yes Unique identifier of the token
curl -X DELETE https://api.hoody.icu/api/v1/auth/tokens/507f1f77bcf86cd799439011 \
-H " Authorization: Bearer <token> "
await client . api . authTokens . delete ( " 507f1f77bcf86cd799439011 " );
" message " : " Auth token deleted successfully "
" message " : " Invalid ID format "
Error Code Title Description Resolution INVALID_ID_FORMATInvalid ID format The provided ID must be a 24-character hexadecimal string Ensure the ID is exactly 24 characters long and contains only hexadecimal characters (0-9, a-f)
" message " : " Authentication token required "
Error Code Title Description Resolution MISSING_TOKENAuthentication token missing No authentication token was provided in the request Include a valid JWT token in the Authorization header as Bearer <token> INVALID_TOKENInvalid authentication token The provided authentication token is malformed or invalid Obtain a new token by logging in again or using a valid auth token TOKEN_EXPIREDAuthentication token expired The provided authentication token has expired Obtain a new token by logging in again or refreshing your session
" message " : " Insufficient permissions "
Error Code Title Description Resolution INSUFFICIENT_PERMISSIONSInsufficient permissions You do not have the required permissions to perform this action Contact the resource owner or administrator to request access ACCOUNT_BANNEDAccount banned Your account has been banned and cannot access this resource Contact support for information about your account status
" message " : " Authentication token not found "
Error Code Title Description Resolution TOKEN_NOT_FOUNDAuthentication token not found The requested authentication token does not exist or has been deleted Verify the token ID is correct and that the token still exists